ethers.js/utils/hdnode.d.ts

36 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2018-09-24 23:07:14 +03:00
import { Arrayish } from './bytes';
import { Wordlist } from './wordlist';
export declare const defaultPath = "m/44'/60'/0'/0/0";
export declare class HDNode {
readonly privateKey: string;
readonly publicKey: string;
2019-02-02 03:50:10 +03:00
readonly fingerprint: string;
readonly parentFingerprint: string;
2018-10-07 08:13:10 +03:00
readonly address: string;
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
*/
2019-02-02 03:50:10 +03:00
constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonic: string, path: string);
readonly extendedKey: string;
neuter(): HDNode;
private _derive;
derivePath(path: string): HDNode;
static isHDNode(value: any): value is HDNode;
}
2019-02-02 03:50:10 +03:00
export declare function fromExtendedKey(extendedKey: string): HDNode;
export declare function fromMnemonic(mnemonic: string, wordlist?: Wordlist, password?: string): 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;