Converts a derivation path from string to an array of integers.
Note that this expects precisely 5 components in the derivation path,
as per BIP-44:
m / purpose' / coin_type' / account' / change / address_index
Takes into account '
for hardening as per BIP-32,
and does not prescribe which components should be hardened.
the derivation path in BIP-44 format, e.g. "m/44'/60'/0'/0/0"
to be used with PrivateKey#derive
Optional
passphrase: string = ""Optional
path: number[]Optional
passphrase: string = ""Optional
path: number[]Optional
passphrase: string = ""Recover an ECDSA private key from this mnemonic phrase, with an optional passphrase.
Optional
passphrase: string = ""Optional
index: numberRecover an ECDSAsecp256k1 private key from this mnemonic phrase and derivation path, with an optional passphrase
the passphrase used to protect the mnemonic, use "" for none
the derivation path in BIP-44 format, e.g. "m/44'/60'/0'/0/0"
the private key
Common implementation for both toStandardECDSAsecp256k1PrivateKey
functions.
the passphrase used to protect the mnemonic, use "" for none
derivation path as an
integer array,
see: calculateDerivationPathValues
a private key
Recover an Ed25519 private key from this mnemonic phrase, with an optional passphrase.
Optional
passphrase: string = ""Optional
index: numberStatic
fromRecover a mnemonic phrase from a string, splitting on spaces. Handles 12, 22 (legacy), and 24 words.
Static
fromConstruct a mnemonic from a list of words. Handles 12, 22 (legacy), and 24 words.
An exception of BadMnemonicError will be thrown if the mnemonic contains unknown words or fails the checksum. An invalid mnemonic can still be used to create private keys, the exception will contain the failing mnemonic in case you wish to ignore the validation error and continue.
Static
generateReturns a new random 24-word mnemonic from the BIP-39 standard English word list.
Static
generate12Returns a new random 12-word mnemonic from the BIP-39 standard English word list.
Multi-word mnemonic phrase (BIP-39).
Compatible with the official Hiero mobile wallets (24-words or 22-words) and BRD (12-words).