ethereumjs-monorepo

@ethereumjs/wallet


@ethereumjs/wallet / hdkey / EthereumHDKey

Class: EthereumHDKey

Defined in: hdkey.ts:8

Constructors

Constructor

new EthereumHDKey(hdkey): EthereumHDKey

Defined in: hdkey.ts:10

Parameters

hdkey

HDKey

Returns

EthereumHDKey

Methods

deriveChild()

deriveChild(index): EthereumHDKey

Defined in: hdkey.ts:61

Derive a node based on a child index

Parameters

index

number

Returns

EthereumHDKey


derivePath()

derivePath(path): EthereumHDKey

Defined in: hdkey.ts:54

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

Parameters

path

string

Returns

EthereumHDKey


getWallet()

getWallet(): Wallet

Defined in: hdkey.ts:68

Return a Wallet instance as seen above

Returns

Wallet


privateExtendedKey()

privateExtendedKey(): string

Defined in: hdkey.ts:37

Returns a BIP32 extended private key (xprv)

Returns

string


publicExtendedKey()

publicExtendedKey(): string

Defined in: hdkey.ts:47

Return a BIP32 extended public key (xpub)

Returns

string


fromExtendedKey()

static fromExtendedKey(base58Key): EthereumHDKey

Defined in: hdkey.ts:30

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

Parameters

base58Key

string

Returns

EthereumHDKey


fromMasterSeed()

static fromMasterSeed(seedBuffer): EthereumHDKey

Defined in: hdkey.ts:16

Creates an instance based on a seed.

Parameters

seedBuffer

Uint8Array

Returns

EthereumHDKey


fromMnemonic()

static fromMnemonic(mnemonic, passphrase?): EthereumHDKey

Defined in: hdkey.ts:23

Creates an instance based on BIP39 mnemonic phrases

Parameters

mnemonic

string

passphrase?

string

Returns

EthereumHDKey