From 51211a21ba64d81c50eb4e13146b1246c8da46e0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 27 Jun 2018 18:33:32 +0200 Subject: Improve `ganache-core`'s `GanacheOpts` type and require it instead of `any` --- packages/subproviders/src/subproviders/ganache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/subproviders/src') diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts index 61b6bb5e9..79c43bc68 100644 --- a/packages/subproviders/src/subproviders/ganache.ts +++ b/packages/subproviders/src/subproviders/ganache.ts @@ -15,7 +15,7 @@ export class GanacheSubprovider extends Subprovider { * Instantiates a GanacheSubprovider * @param opts The desired opts with which to instantiate the Ganache provider */ - constructor(opts: any) { + constructor(opts: Ganache.GanacheOpts) { super(); this._ganacheProvider = Ganache.provider(opts); } -- cgit v1.2.3 From 654b0486027ed42662bbc907a72806046ec7697e Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Fri, 29 Jun 2018 11:52:15 -0700 Subject: Export LedgerEthereumClient type in subproviders --- packages/subproviders/src/index.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/subproviders/src') diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 6cc650a4d..9194c1341 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -20,6 +20,7 @@ export { ErrorCallback, NextCallback, LedgerCommunicationClient, + LedgerEthereumClient, NonceSubproviderErrors, LedgerSubproviderConfigs, } from './types'; -- cgit v1.2.3 From e58e35e098952259c0c3f59ea1132669aab7d36d Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Fri, 29 Jun 2018 12:38:57 -0700 Subject: Move ledgerhq module declarations to typescript-typings --- packages/subproviders/src/globals.d.ts | 48 ---------------------------------- 1 file changed, 48 deletions(-) (limited to 'packages/subproviders/src') diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts index 4b3ecdf3c..c00dc4099 100644 --- a/packages/subproviders/src/globals.d.ts +++ b/packages/subproviders/src/globals.d.ts @@ -3,54 +3,6 @@ // tslint:disable:async-suffix // tslint:disable:completed-docs -// Ethereumjs-tx declarations - -// Ledgerco declarations -interface ECSignatureString { - v: string; - r: string; - s: string; -} -interface ECSignature { - v: number; - r: string; - s: string; -} - -interface LedgerTransport { - close(): Promise; -} - -declare module '@ledgerhq/hw-app-eth' { - class Eth { - public transport: LedgerTransport; - 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; - public getAppConfiguration(): Promise<{ arbitraryDataEnabled: number; version: string }>; - public signPersonalMessage(path: string, messageHex: string): Promise; - } - export default Eth; -} - -declare module '@ledgerhq/hw-transport-u2f' { - export default class TransportU2F implements LedgerTransport { - public static create(): Promise; - public close(): Promise; - } -} - -declare module '@ledgerhq/hw-transport-node-hid' { - export default class TransportNodeHid implements LedgerTransport { - public static create(): Promise; - public close(): Promise; - } -} - declare module '*.json' { const json: any; /* tslint:disable */ -- cgit v1.2.3