From 7ce1e9b18d30cb76dd61f3859164cb09d091a3dd Mon Sep 17 00:00:00 2001 From: Cavan Date: Mon, 4 Jun 2018 14:48:18 -0600 Subject: Add eth-lightwallet subprovider and tests --- packages/subproviders/src/globals.d.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'packages/subproviders/src/globals.d.ts') diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts index 4b3ecdf3c..1e104053f 100644 --- a/packages/subproviders/src/globals.d.ts +++ b/packages/subproviders/src/globals.d.ts @@ -16,6 +16,11 @@ interface ECSignature { r: string; s: string; } +interface ECSignatureBuffer { + v: number; + r: Buffer; + s: Buffer; +} interface LedgerTransport { close(): Promise; @@ -57,3 +62,26 @@ declare module '*.json' { export default json; /* tslint:enable */ } + +// eth-lightwallet declarations +declare module 'eth-lightwallet' { + export class signing { + public static signTx(keystore: keystore, pwDerivedKey: Uint8Array, rawTx: string, signingAddress: string): string; + public static signMsg(keystore: keystore, pwDerivedKey: Uint8Array, rawMsg: string, signingAddress: string): ECSignatureBuffer; + public static signMsgHash(keystore: keystore, pwDerivedKey: Uint8Array, msgHash: string, signingAddress: string): ECSignatureBuffer; + public static concatSig(signature: any): string; + } + export class keystore { + public static createVault(options: any, callback?: (error: Error, keystore: keystore) => void): keystore; + public static generateRandomSeed(): string; + public static isSeedValid(seed: string): boolean; + public static deserialize(keystore: string): keystore; + public serialize(): string; + public keyFromPassword(password: string, callback?: (error: Error, pwDerivedKey: Uint8Array) => void): Uint8Array; + public isDerivedKeyCorrect(pwDerivedKey: Uint8Array): boolean; + public generateNewAddress(pwDerivedKey: Uint8Array, numberOfAddresses: number): void; + public getSeed(pwDerivedKey: Uint8Array): string; + public exportPrivateKey(address: string, pwDerivedKey: Uint8Array): string; + public getAddresses(): string[]; + } +} -- cgit v1.2.3 From 1dd9ec4d5af3de37a9f7defd11265795d04c9604 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 25 Jun 2018 22:58:50 +0200 Subject: Remove duplicate type --- packages/subproviders/src/globals.d.ts | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'packages/subproviders/src/globals.d.ts') diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts index 1e104053f..287d5e0fe 100644 --- a/packages/subproviders/src/globals.d.ts +++ b/packages/subproviders/src/globals.d.ts @@ -62,26 +62,3 @@ declare module '*.json' { export default json; /* tslint:enable */ } - -// eth-lightwallet declarations -declare module 'eth-lightwallet' { - export class signing { - public static signTx(keystore: keystore, pwDerivedKey: Uint8Array, rawTx: string, signingAddress: string): string; - public static signMsg(keystore: keystore, pwDerivedKey: Uint8Array, rawMsg: string, signingAddress: string): ECSignatureBuffer; - public static signMsgHash(keystore: keystore, pwDerivedKey: Uint8Array, msgHash: string, signingAddress: string): ECSignatureBuffer; - public static concatSig(signature: any): string; - } - export class keystore { - public static createVault(options: any, callback?: (error: Error, keystore: keystore) => void): keystore; - public static generateRandomSeed(): string; - public static isSeedValid(seed: string): boolean; - public static deserialize(keystore: string): keystore; - public serialize(): string; - public keyFromPassword(password: string, callback?: (error: Error, pwDerivedKey: Uint8Array) => void): Uint8Array; - public isDerivedKeyCorrect(pwDerivedKey: Uint8Array): boolean; - public generateNewAddress(pwDerivedKey: Uint8Array, numberOfAddresses: number): void; - public getSeed(pwDerivedKey: Uint8Array): string; - public exportPrivateKey(address: string, pwDerivedKey: Uint8Array): string; - public getAddresses(): string[]; - } -} -- cgit v1.2.3 From 687802394a6959ca5058ae1a4445d513d04062c6 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Mon, 2 Jul 2018 18:09:05 +1000 Subject: Remove duplicate type definitions. Clear private key earlier Fix changelog in typescript-typings from bad merge --- packages/subproviders/src/globals.d.ts | 58 ---------------------------------- 1 file changed, 58 deletions(-) (limited to 'packages/subproviders/src/globals.d.ts') diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts index 287d5e0fe..94e63a32d 100644 --- a/packages/subproviders/src/globals.d.ts +++ b/packages/subproviders/src/globals.d.ts @@ -1,61 +1,3 @@ -// tslint:disable:max-classes-per-file -// tslint:disable:class-name -// 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 ECSignatureBuffer { - v: number; - r: Buffer; - s: Buffer; -} - -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