ethereumjs-monorepo

@ethereumjs/wallet / hdkey / EthereumHDKey

Class: EthereumHDKey

hdkey.EthereumHDKey

Table of contents

Constructors

Methods

Constructors

constructor

new EthereumHDKey(_hdkey)

Parameters

Name Type
_hdkey HDKey

Defined in

hdkey.ts:28

Methods

deriveChild

deriveChild(index): EthereumHDKey

Derive a node based on a child index

Parameters

Name Type
index number

Returns

EthereumHDKey

Defined in

hdkey.ts:57


derivePath

derivePath(path): EthereumHDKey

Derives a node based on a path (e.g. m/44’/0’/0/1)

Parameters

Name Type
path string

Returns

EthereumHDKey

Defined in

hdkey.ts:50


getWallet

getWallet(): Wallet

Return a Wallet instance as seen above

Returns

Wallet

Defined in

hdkey.ts:64


privateExtendedKey

privateExtendedKey(): string

Returns a BIP32 extended private key (xprv)

Returns

string

Defined in

hdkey.ts:33


publicExtendedKey

publicExtendedKey(): string

Return a BIP32 extended public key (xpub)

Returns

string

Defined in

hdkey.ts:43


fromExtendedKey

Static fromExtendedKey(base58Key): EthereumHDKey

Create an instance based on a BIP32 extended private or public key.

Parameters

Name Type
base58Key string

Returns

EthereumHDKey

Defined in

hdkey.ts:24


fromMasterSeed

Static fromMasterSeed(seedBuffer): EthereumHDKey

Creates an instance based on a seed.

Parameters

Name Type
seedBuffer Uint8Array

Returns

EthereumHDKey

Defined in

hdkey.ts:10


fromMnemonic

Static fromMnemonic(mnemonic, passphrase?): EthereumHDKey

Creates an instance based on BIP39 mnemonic phrases

Parameters

Name Type
mnemonic string
passphrase? string

Returns

EthereumHDKey

Defined in

hdkey.ts:17