2019-05-15 01:48:48 +03:00
|
|
|
import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer";
|
|
|
|
import { BytesLike } from "@ethersproject/bytes";
|
2019-06-12 16:38:15 +03:00
|
|
|
import { Wordlist } from "@ethersproject/wordlists";
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare const defaultPath = "m/44'/60'/0'/0/0";
|
2020-01-19 05:48:12 +03:00
|
|
|
export interface Mnemonic {
|
|
|
|
readonly phrase: string;
|
|
|
|
readonly path: string;
|
|
|
|
readonly locale: string;
|
|
|
|
}
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare class HDNode implements ExternallyOwnedAccount {
|
|
|
|
readonly privateKey: string;
|
|
|
|
readonly publicKey: string;
|
|
|
|
readonly fingerprint: string;
|
|
|
|
readonly parentFingerprint: string;
|
|
|
|
readonly address: string;
|
2020-01-19 05:48:12 +03:00
|
|
|
readonly mnemonic?: Mnemonic;
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly path: string;
|
|
|
|
readonly chainCode: string;
|
|
|
|
readonly index: number;
|
|
|
|
readonly depth: number;
|
|
|
|
/**
|
|
|
|
* This constructor should not be called directly.
|
|
|
|
*
|
|
|
|
* Please use:
|
|
|
|
* - fromMnemonic
|
|
|
|
* - fromSeed
|
|
|
|
*/
|
2020-01-19 05:48:12 +03:00
|
|
|
constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string);
|
2020-03-22 21:57:17 +03:00
|
|
|
get extendedKey(): string;
|
2019-05-15 01:48:48 +03:00
|
|
|
neuter(): HDNode;
|
|
|
|
private _derive;
|
|
|
|
derivePath(path: string): HDNode;
|
2020-01-19 05:48:12 +03:00
|
|
|
static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode;
|
|
|
|
static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode;
|
2019-05-15 01:48:48 +03:00
|
|
|
static fromSeed(seed: BytesLike): HDNode;
|
|
|
|
static fromExtendedKey(extendedKey: string): HDNode;
|
|
|
|
}
|
|
|
|
export declare function mnemonicToSeed(mnemonic: string, password?: string): string;
|
2020-01-19 05:48:12 +03:00
|
|
|
export declare function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string;
|
|
|
|
export declare function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string;
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean;
|
2021-05-17 23:19:36 +03:00
|
|
|
export declare function getAccountPath(index: number): string;
|
2021-01-19 13:22:54 +03:00
|
|
|
//# sourceMappingURL=index.d.ts.map
|