How do I derive new Accounts from xPub?
See original GitHub issueI 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?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Understanding the xPub and address generation
When you create a new sub-wallet (or wallet category) in the Addresses section of your wallet Settings, you generate a new xPub for...
Read more >How to get the derived public key from xpub?
The pubkey derivation functionality is in detemrinistic.py take a look at the node_from_str() function to see about creating PubBIP32Node ...
Read more >Extended public key (xPub) - Ledger Support
Go to the account to get the xpub for and click on the wrench icon. · Expand the Advanced logs in the Edit...
Read more >What exactly does creating multiple "accounts" in Ledger Live ...
A new account in ledger live will perform a new account level hardened derivation and create an associated xpub as per BIP44.
Read more >hd-wallet-derive/README.md at master - GitHub
Derive addresses from xpub key; We can derive segwit keys ... We can easily generate a new random master key, seed and extended...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d be happy to give it a shot today/tomorrow.