export interface ExtendedPublicKey { publicKey: string; chainCode: string; } export declare class HDNode { readonly depth: number; readonly index: number; readonly chainCode: Uint8Array; readonly publicKey: Uint8Array; readonly privateKey?: Uint8Array | undefined; readonly parentFingerprint: number; /** * Get an instance of HDNode from a mnemonic phrase. * * @param {string} mnemonicPhrase * @param {string} [passphrase] * @return {HDNode} */ static fromMnemonicPhrase(mnemonicPhrase: string, passphrase?: string): HDNode; /** * Get an instance of HDNode from an arbitrary seed. * * @param {string | ArrayBufferLike} seed * @return {HDNode} */ static fromSeed(seed: string | ArrayBufferLike): HDNode; /** * Get an instance of HDNode from a parent extended public key and child extended public key. * * @param {string} derivationPath * @param {ExtendedPublicKey} parentKey * @param {ExtendedPublicKey} childKey */ static fromParentChildKey(derivationPath: string, parentKey: ExtendedPublicKey, childKey: ExtendedPublicKey): HDNode; /** * Get an instance of HDNode from an extended public or private key. * * @param {string} extendedKey * @return {HDNode} */ static fromExtendedKey(extendedKey: string): HDNode; readonly fingerprint: number; constructor(depth: number, index: number, chainCode: Uint8Array, publicKey: Uint8Array, privateKey?: Uint8Array | undefined, parentFingerprint?: number); /** * Extended public key serialised as base58 string. */ get extendedPublicKey(): string; /** * Extended private key serialised as base58 string. */ get extendedPrivateKey(): string; /** * Checksummed Ethereum address * * @return {string} */ get address(): string; /** * Derive a child key from this node. If the path is 'm' or 'M", the same HDNode is returned. * * @param {string} path * @return {HDNode} */ derive(path: string): HDNode; /** * Derive a child node based on an index. * * @param {number} index * @return {HDNode} */ private deriveChild; /** * Get child data used for derivation of child keys. * * @param {number} index * @return {Buffer} */ private getChildData; /** * Serialise the node as base58 string. * * @param {number} version * @param {Buffer} key * @return {string} */ private serialise; }