When I'm trying to create a wallet in react app using the following code:
const seed = bip39.mnemonicToSeed(mnemonic); const master = bitcoin.HDNode.fromSeedBuffer(seed, "testnet");
error: Expected property "0" of type ECPair, got p
HDNode was removed and is now a separated package.
npm install bip32 See Issue #1243
const bitcoin = require('bitcoinjs-lib') const bip39 = require('bip39') const bip32 = require('bip32') const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost' const seed = bip39.mnemonicToSeed(mnemonic) const node = bip32.fromSeed(seed)
Test examples: bitcoinjs-lib tests