Unable to generate Litecoin address via xpub
See original GitHub issueI’m attempting to generate/derive an address via a Litecoin xpub key using the following:
var bitcoin = require('bitcoinjs-lib');
import HDNode from "../../bitcoinjs-lib/src/hdnode";
const litecoin = bitcoin.networks.litecoin
const xpub = "Litecoin xpub";
const node = HDNode.fromBase58(xpub);
const address = node.derive(0).getAddress(litecoin);
However, it continues to generate a Bitcoin address. Is there anything I’m doing wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Trying to programmically generate unused receiving address ...
I'm trying to generate unused receiving Bitcoin address from xPub using PyWallet python library . I got the xPub from my BIP32 Electrum ......
Read more >Unable to generate new address - Blockonomics
Unable to generate new address Print · 1.Error: "API Key is incorrect": Make sure you have setup your API key correctly and that...
Read more >How to generate bitcoin address from XPUB - Stack Overflow
How to generate bitcoin address from XPUB, I am looking for pointers on how to use an XPUB to generate addresses. I would...
Read more >Understanding the xPub and address generation
*While bitcoin and bitcoin cash addresses, once generated, never become invalid and can be used to receive multiple payments, we recommend using ......
Read more >Generating Bitcoin Addresses Programmatically - Medium
How to generate Bitcoin addresses from an HD Wallets' XPUB key. ... if the server is compromised, the attacker would never be able...
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
@tonychew1986 you are trying to use the
litecoin
network object, which has different BIP32 constants, if you want to support “both”, I recommend you do the following:@junderw maybe the above should be our official recommendation? (short of adding
litecoinX
)