UNPKG

1.08 kBTypeScriptView Raw
1/// <reference types="node" />
2import Wallet from './index';
3export default class EthereumHDKey {
4 private readonly _hdkey?;
5 /**
6 * Creates an instance based on a seed.
7 *
8 * For the seed we suggest to use [bip39](https://npmjs.org/package/bip39) to
9 * create one from a BIP39 mnemonic.
10 */
11 static fromMasterSeed(seedBuffer: Buffer): EthereumHDKey;
12 /**
13 * Create an instance based on a BIP32 extended private or public key.
14 */
15 static fromExtendedKey(base58Key: string): EthereumHDKey;
16 constructor(_hdkey?: any);
17 /**
18 * Returns a BIP32 extended private key (xprv)
19 */
20 privateExtendedKey(): Buffer;
21 /**
22 * Return a BIP32 extended public key (xpub)
23 */
24 publicExtendedKey(): Buffer;
25 /**
26 * Derives a node based on a path (e.g. m/44'/0'/0/1)
27 */
28 derivePath(path: string): EthereumHDKey;
29 /**
30 * Derive a node based on a child index
31 */
32 deriveChild(index: number): EthereumHDKey;
33 /**
34 * Return a `Wallet` instance as seen above
35 */
36 getWallet(): Wallet;
37}