diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-08 23:40:46 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-08 23:40:46 +0800 |
commit | 98e8105ec5a629ce67f34216df72e11422649c4e (patch) | |
tree | a30bc127779789aae5eff5457366264d09a9e31b /packages/subproviders/src/globals.d.ts | |
parent | 4a94a2b4e81d8b5d773ebeaa671b78ac4bf9a408 (diff) | |
parent | 03902b0b26fe443705dde20c42e78e1cb4bd3c4b (diff) | |
download | dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.gz dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.bz2 dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.lz dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.xz dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.zst dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.zip |
Merge branch 'development' into extractDocs
* development:
Added base-contract package to README
Update yarn.lock
Improve README
Feedback
README on derivation path
Use our dev seed derivation path.
README
Add ledger-node package as optional dependency
Force shouldGetChainCode to true in types
Nuke tests for now
Remove old ledger
Update ledgerco packages
Remove only
Fix a typo
Add PR name
Improve an error message when an inorrect number of constructor params is passed
Diffstat (limited to 'packages/subproviders/src/globals.d.ts')
-rw-r--r-- | packages/subproviders/src/globals.d.ts | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts index 6f344dcd3..d59ee9e67 100644 --- a/packages/subproviders/src/globals.d.ts +++ b/packages/subproviders/src/globals.d.ts @@ -32,32 +32,38 @@ interface ECSignature { r: string; s: string; } -declare module 'ledgerco' { - interface comm { - close_async(): Promise<void>; - } - export class comm_node implements comm { - public static create_async(timeoutMilliseconds?: number): Promise<comm_node>; - public close_async(): Promise<void>; - } - export class comm_u2f implements comm { - public static create_async(): Promise<comm_u2f>; - public close_async(): Promise<void>; - } - export class eth { - public comm: comm; - constructor(comm: comm); - public getAddress_async( + +interface LedgerTransport { + close(): Promise<void>; +} + +declare module '@ledgerhq/hw-app-eth' { + class Eth { + public transport: LedgerTransport; + constructor(transport: LedgerTransport); + public getAddress( path: string, - display?: boolean, - chaincode?: boolean, + boolDisplay?: boolean, + boolChaincode?: boolean, ): Promise<{ publicKey: string; address: string; chainCode: string }>; - public signTransaction_async(path: string, rawTxHex: string): Promise<ECSignatureString>; - public getAppConfiguration_async(): Promise<{ - arbitraryDataEnabled: number; - version: string; - }>; - public signPersonalMessage_async(path: string, messageHex: string): Promise<ECSignature>; + public signTransaction(path: string, rawTxHex: string): Promise<ECSignatureString>; + public getAppConfiguration(): Promise<{ arbitraryDataEnabled: number; version: string }>; + public signPersonalMessage(path: string, messageHex: string): Promise<ECSignature>; + } + export default Eth; +} + +declare module '@ledgerhq/hw-transport-u2f' { + export default class TransportU2F implements LedgerTransport { + public static create(): Promise<LedgerTransport>; + public close(): Promise<void>; + } +} + +declare module '@ledgerhq/hw-transport-node-hid' { + export default class TransportNodeHid implements LedgerTransport { + public static create(): Promise<LedgerTransport>; + public close(): Promise<void>; } } |