Accounts
Handling of mnemonics and keystore.
Mnemonics
BIP-39
// 1 - Generate BIP39 mnemonic words, default to 12 words (128bit strength)
const randomMnemonic = Mnemonic.of();
console.log('Mnemonic words', randomMnemonic);
// Mnemonic words: "w1 w2 ... w12"
// 2 - Derive private key from mnemonic words according to BIP32, using the path `m/44'/818'/0'/0`.
// Defined for VET at https://github.com/satoshilabs/slips/blob/master/slip-0044.md
const privateKey = Mnemonic.toPrivateKey(randomMnemonic);
console.log(Hex.of(privateKey).toString());
// ...SOME PRIVATE KEY...BIP-32
Extended Public Key (xpub)
HDKey Instance
From Public Key
Keystore
Last updated
Was this helpful?