UNPKG

887 BTypeScriptView Raw
1/// <reference types="node" />
2import { BIP32Interface } from "bip32";
3import { IKeyPair } from "../interfaces";
4export declare class HDWallet {
5 static readonly slip44 = 111;
6 /**
7 * Get root node from the given mnemonic with an optional passphrase.
8 */
9 static fromMnemonic(mnemonic: string, passphrase?: string): BIP32Interface;
10 /**
11 * Get bip32 node from keys.
12 */
13 static fromKeys(keys: IKeyPair, chainCode: Buffer): BIP32Interface;
14 /**
15 * Get key pair from the given node.
16 */
17 static getKeys(node: BIP32Interface): IKeyPair;
18 /**
19 * Derives a node from the coin type as specified by slip44.
20 */
21 static deriveSlip44(root: BIP32Interface, hardened?: boolean): BIP32Interface;
22 /**
23 * Derives a node from the network as specified by AIP20.
24 */
25 static deriveNetwork(root: BIP32Interface): BIP32Interface;
26}