My dependencies:
"bip32": "^1.0.3",
"bip39": "^3.0.0",
"bitcoinjs-lib": "^5.0.0"
If I do
const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost'
const seed = bip39.mnemonicToSeed(mnemonic)
const root = bip32.fromSeed(seed)
const node = root.derivePath("m/0'/0/0")
It stops with
Error: Expected Buffer, got Promise
It seems that bip32.fromSeed(seed) now it returns a promise to be solved?
Use bip39 v2 or switch to mnemonicToSeedSync.
v3 changed the API to use async Promises which are faster
Can also resolve promises as follows 馃憤
`const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost'
const seed = bip39.mnemonicToSeed(mnemonic)
seed.then( s => {
const root = bip32.fromSeed(s)
const node = root.derivePath("m/0'/0/0")`
})
Most helpful comment
Use bip39 v2 or switch to mnemonicToSeedSync.
v3 changed the API to use async Promises which are faster