bitcoinjs-lib: "Error.captureStackTrace is not a function" when creating keypair from privatekey on different network
const hash = bitcoin.crypto.sha256(Buffer.from("my seed here"))
const network = coininfo(`DASH-TEST`).toBitcoinJS();
const keyPair = bitcoin.ECPair.fromPrivateKey(hash,{network})
console.log(keyPair)
When there is no network
option it works fine
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 17 (12 by maintainers)
Just insert the network info needed for DASH.
Then just count up the keys / accounts according to BIP44.
No source, I just made it up because it is irrelevant to the error, and typeforce was yelling at me.
Thanks, can you point on source of
@dcousens it’s provided in the codesandbox above. Just comment the line 25 to see the error