@ethereumjs/wallet / hdkey / EthereumHDKey
hdkey.EthereumHDKey
• new EthereumHDKey(_hdkey
)
Name | Type |
---|---|
_hdkey |
HDKey |
▸ deriveChild(index
): EthereumHDKey
Derive a node based on a child index
Name | Type |
---|---|
index |
number |
▸ derivePath(path
): EthereumHDKey
Derives a node based on a path (e.g. m/44’/0’/0/1)
Name | Type |
---|---|
path |
string |
▸ getWallet(): Wallet
Return a Wallet
instance as seen above
▸ privateExtendedKey(): string
Returns a BIP32 extended private key (xprv)
string
▸ publicExtendedKey(): string
Return a BIP32 extended public key (xpub)
string
▸ Static
fromExtendedKey(base58Key
): EthereumHDKey
Create an instance based on a BIP32 extended private or public key.
Name | Type |
---|---|
base58Key |
string |
▸ Static
fromMasterSeed(seedBuffer
): EthereumHDKey
Creates an instance based on a seed.
Name | Type |
---|---|
seedBuffer |
Uint8Array |
▸ Static
fromMnemonic(mnemonic
, passphrase?
): EthereumHDKey
Creates an instance based on BIP39 mnemonic phrases
Name | Type |
---|---|
mnemonic |
string |
passphrase? |
string |