aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/globals.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders/src/globals.d.ts')
-rw-r--r--packages/subproviders/src/globals.d.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts
index 6f344dcd3..0c8b3fed3 100644
--- a/packages/subproviders/src/globals.d.ts
+++ b/packages/subproviders/src/globals.d.ts
@@ -32,6 +32,28 @@ interface ECSignature {
r: string;
s: string;
}
+
+interface LedgerTransport {
+ close(): Promise<void>
+}
+
+declare module '@ledgerhq/hw-app-eth' {
+ export class Eth {
+ constructor(transport: LedgerTransport);
+ public getAddress(path: string, boolDisplay?: boolean, boolChaincode?: boolean): Promise<{ publicKey: string; address: string; chainCode: string }>;
+ public signTransaction(path: string, rawTxHex: string): Promise<ECSignatureString>;
+ public getAppConfiguration(): Promise<{ arbitraryDataEnabled: number; version: string; }>;
+ public signPersonalMessage(path: string, messageHex: string): Promise<ECSignature>;
+ transport: LedgerTransport;
+ }
+}
+declare module '@ledgerhq/hw-transport-u2f' {
+ export class TransportU2F implements LedgerTransport {
+ public static create(): Promise<TransportU2F>;
+ public close(): Promise<void>;
+ }
+}
+
declare module 'ledgerco' {
interface comm {
close_async(): Promise<void>;