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
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
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