-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
I am trying to derive a new address based on xPub key on Testnet.
const rootKey = bitcoin.HDNode.fromBase58(WALLET_XPUB_KEY, bitcoin.networks.testnet).neutered();
const key = { accountNumber: 20, lastAddressNumber: 10 };
const txtPath = `m/49'/1'/${key.accountNumber}'/0/${key.lastAddressNumber}`;
const child = rootKey.derivePath(txtPath);
return child.getAddress();
It fails on derivePath
with message Error: Not a master node
- what is the correct way of getting N'th account addresses?