コンテンツにスキップ

Bip32⚓︎

Bip32
Factory of BIP32 root nodes.

Constructors⚓︎

new Bip32()⚓︎

new Bip32(curveName?, mnemonicLanguage?): Bip32

Creates a BIP32 root node factory.

Parameters⚓︎

Parameter Type Description
curveName? string Elliptic curve to use.
mnemonicLanguage? string Language of constructed mnemonics.

Returns⚓︎

Bip32

Methods⚓︎

fromMnemonic()⚓︎

fromMnemonic(mnemonic, password): Bip32Node
Bip32.fromMnemonic
Creates a BIP32 root node from a BIP39 mnemonic and password.

Parameters⚓︎

Parameter Type Description
mnemonic string BIP32 mnemonic.
password string BIP32 mnemonic password.

Returns⚓︎

Bip32Node

BIP32 root node.


fromSeed()⚓︎

fromSeed(seed): Bip32Node
Bip32.fromSeed
Creates a BIP32 root node from a seed.

Parameters⚓︎

Parameter Type Description
seed Uint8Array BIP32 seed.

Returns⚓︎

Bip32Node

BIP32 root node.


random()⚓︎

random(seedLength?): string
Bip32.random
Creates a random BIP32 mnemonic.

Parameters⚓︎

Parameter Type Description
seedLength? number Length of random seed to use when generating mnemonic.

Returns⚓︎

string

Random mnemonic created with the specified entropy.