2018-09-24 16:07:14 -04:00
|
|
|
import { Arrayish } from './bytes';
|
|
|
|
import { Wordlist } from './wordlist';
|
2018-07-30 18:59:52 -04:00
|
|
|
export declare const defaultPath = "m/44'/60'/0'/0/0";
|
|
|
|
export declare class HDNode {
|
|
|
|
private readonly keyPair;
|
|
|
|
readonly privateKey: string;
|
|
|
|
readonly publicKey: string;
|
2018-10-07 01:13:10 -04:00
|
|
|
readonly address: string;
|
2018-07-30 18:59:52 -04:00
|
|
|
readonly mnemonic: string;
|
|
|
|
readonly path: string;
|
|
|
|
readonly chainCode: string;
|
|
|
|
readonly index: number;
|
|
|
|
readonly depth: number;
|
|
|
|
/**
|
|
|
|
* This constructor should not be called directly.
|
|
|
|
*
|
|
|
|
* Please use:
|
|
|
|
* - fromMnemonic
|
|
|
|
* - fromSeed
|
|
|
|
*/
|
|
|
|
constructor(constructorGuard: any, privateKey: Arrayish, chainCode: Uint8Array, index: number, depth: number, mnemonic: string, path: string);
|
|
|
|
private _derive;
|
|
|
|
derivePath(path: string): HDNode;
|
|
|
|
static isHDNode(value: any): value is HDNode;
|
|
|
|
}
|
|
|
|
export declare function fromMnemonic(mnemonic: string, wordlist?: Wordlist): HDNode;
|
|
|
|
export declare function fromSeed(seed: Arrayish): HDNode;
|
|
|
|
export declare function mnemonicToSeed(mnemonic: string, password?: string): string;
|
|
|
|
export declare function mnemonicToEntropy(mnemonic: string, wordlist?: Wordlist): string;
|
|
|
|
export declare function entropyToMnemonic(entropy: Arrayish, wordlist?: Wordlist): string;
|
|
|
|
export declare function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean;
|