From bb4c748bf1e93d1f2c98514c574ba67678b0ed59 Mon Sep 17 00:00:00 2001 From: Cavan Date: Thu, 7 Jun 2018 09:42:50 -0600 Subject: Formatting and standards updates --- .../types/eth-lightwallet/index.d.ts | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 packages/typescript-typings/types/eth-lightwallet/index.d.ts (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts new file mode 100644 index 000000000..d31e67fc4 --- /dev/null +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -0,0 +1,48 @@ +// eth-lightwallet declarations +declare module 'eth-lightwallet' { + import { ECSignatureBuffer } from '@0xproject/types'; + + interface signing { + signTx(keystore: keystore, pwDerivedKey: Uint8Array, rawTx: string, signingAddress: string): string; + signMsg( + keystore: keystore, + pwDerivedKey: Uint8Array, + rawMsg: string, + signingAddress: string, + ): ECSignatureBuffer; + signMsgHash( + keystore: keystore, + pwDerivedKey: Uint8Array, + msgHash: string, + signingAddress: string, + ): ECSignatureBuffer; + concatSig(signature: any): string; + } + export const signing: signing; + + interface VaultOptions { + password: string; + seedPhrase: string; + salt?: string; + hdPathString: string; + } + export class keystore { + public static createVault( + options: VaultOptions, + 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 76f4d67f33af208e83eea5bcfa8802ce0e482901 Mon Sep 17 00:00:00 2001 From: Cavan Date: Wed, 6 Jun 2018 00:01:19 -0600 Subject: Remove timestamps and fix typings --- packages/typescript-typings/types/eth-lightwallet/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts index d31e67fc4..b871fb289 100644 --- a/packages/typescript-typings/types/eth-lightwallet/index.d.ts +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -3,7 +3,12 @@ declare module 'eth-lightwallet' { import { ECSignatureBuffer } from '@0xproject/types'; interface signing { - signTx(keystore: keystore, pwDerivedKey: Uint8Array, rawTx: string, signingAddress: string): string; + signTx( + keystore: keystore, + pwDerivedKey: Uint8Array, + rawTx: string, + signingAddress: string, + ): string; signMsg( keystore: keystore, pwDerivedKey: Uint8Array, @@ -26,6 +31,7 @@ declare module 'eth-lightwallet' { salt?: string; hdPathString: string; } + export class keystore { public static createVault( options: VaultOptions, -- cgit v1.2.3 From 235d78565e4d809d3ec1b91174fd0a831c126202 Mon Sep 17 00:00:00 2001 From: Cavan Date: Mon, 4 Jun 2018 16:24:37 -0600 Subject: Format subprovider using prettier --- .../types/eth-lightwallet/index.d.ts | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts index b871fb289..a226d8049 100644 --- a/packages/typescript-typings/types/eth-lightwallet/index.d.ts +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -2,41 +2,29 @@ declare module 'eth-lightwallet' { import { ECSignatureBuffer } from '@0xproject/types'; - interface signing { - signTx( + export class signing { + public static signTx( keystore: keystore, pwDerivedKey: Uint8Array, rawTx: string, signingAddress: string, ): string; - signMsg( + public static signMsg( keystore: keystore, pwDerivedKey: Uint8Array, rawMsg: string, signingAddress: string, ): ECSignatureBuffer; - signMsgHash( + public static signMsgHash( keystore: keystore, pwDerivedKey: Uint8Array, msgHash: string, signingAddress: string, ): ECSignatureBuffer; - concatSig(signature: any): string; + public static concatSig(signature: any): string; } - export const signing: signing; - - interface VaultOptions { - password: string; - seedPhrase: string; - salt?: string; - hdPathString: string; - } - export class keystore { - public static createVault( - options: VaultOptions, - callback?: (error: Error, keystore: keystore) => void, - ): 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; -- cgit v1.2.3 From 1821f60fb5ddd4a36f34cce94acabba32b4236c6 Mon Sep 17 00:00:00 2001 From: Cavan Date: Mon, 4 Jun 2018 16:04:25 -0600 Subject: Move eth-lightwallet declaration to typings --- .../types/eth-lightwallet/index.d.ts | 58 ++++++++-------------- 1 file changed, 20 insertions(+), 38 deletions(-) (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts index a226d8049..76f910d9c 100644 --- a/packages/typescript-typings/types/eth-lightwallet/index.d.ts +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -1,42 +1,24 @@ // eth-lightwallet declarations declare module 'eth-lightwallet' { - import { ECSignatureBuffer } from '@0xproject/types'; + import { ECSignatureBuffer } from "@0xproject/types"; - 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[]; - } + 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 699de9174e242a81c469a14319c2384b94e47356 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 25 Jun 2018 22:59:04 +0200 Subject: Format type --- .../types/eth-lightwallet/index.d.ts | 67 +++++++++++++++------- 1 file changed, 47 insertions(+), 20 deletions(-) (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts index 76f910d9c..f6d0cd6d8 100644 --- a/packages/typescript-typings/types/eth-lightwallet/index.d.ts +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -1,24 +1,51 @@ // eth-lightwallet declarations declare module 'eth-lightwallet' { - import { ECSignatureBuffer } from "@0xproject/types"; + import { ECSignatureBuffer } from '@0xproject/types'; - 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[]; - } + // tslint:disable-next-line:class-name + 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; + } + // tslint:disable-next-line:class-name + 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[]; + } + + interface VaultOptions { + password: string; + seedPhrase: string; + salt?: string; + hdPathString: string; + } } -- cgit v1.2.3 From 6bb2203f790923a83f6f0665d47d29a90817b371 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 25 Jun 2018 23:07:27 +0200 Subject: Small stylistic tweaks --- packages/typescript-typings/types/eth-lightwallet/index.d.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'packages/typescript-typings/types/eth-lightwallet/index.d.ts') diff --git a/packages/typescript-typings/types/eth-lightwallet/index.d.ts b/packages/typescript-typings/types/eth-lightwallet/index.d.ts index f6d0cd6d8..58096e9f4 100644 --- a/packages/typescript-typings/types/eth-lightwallet/index.d.ts +++ b/packages/typescript-typings/types/eth-lightwallet/index.d.ts @@ -41,7 +41,6 @@ declare module 'eth-lightwallet' { public exportPrivateKey(address: string, pwDerivedKey: Uint8Array): string; public getAddresses(): string[]; } - interface VaultOptions { password: string; seedPhrase: string; -- cgit v1.2.3