Trezor generated xPub - 'Invalid network version'
See original GitHub issueHi. So I am trying to generate HD addresses from xPub that is generated inside the Trezor.
const network = bitcoin.networks.mainnet;
const xpub = 'ypub6XTWVFLfqkFYarn9NArqtBLziffJttqf1Utaur3sTbTGtgfNaTzkGcRpFgiiieBjQ6rV1rJ7iJ9r9oXGpPXZpkq71yfss2mrKLaauxhjXD4';
const node = bitcoin.HDNode.fromBase58(xpub, network).neutered();
const address = node.derive(0).derive(0).getAddress();
console.log('address', address);
# node index.js
/vagrant/btc-js/node_modules/bitcoinjs-lib/src/hdnode.js:78
version !== network.bip32.public) throw new Error('Invalid network version')
Any clues why? It does work with const xpub = 'xpub661MyMwAqRbcG4PQrRAT3N2uxTkXWeRq5kpjyDvStBQP7eW65Lu5rZ3MLoBZJQuZFS9FC7mZZEcgxFZxccRdnqSxopraUB6wVjTqp8ZsS4H'
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Trezor hardware wallet address types and transaction history
The address is a part of a given cryptocurrency network only after it is used in a ... addresses containing typos are rejected...
Read more >Passphrases and hidden wallets on Trezor hardware wallets
The passphrase feature in Trezor Suite is a method used to increase the security of your assets by creating unique hidden wallets. This...
Read more >Move crypto to a wallet with a new seed - Trezor
If you own only one Trezor device, you can move your funds to a new wallet with a newly generated seed, but doing...
Read more >Back up your funds with a recovery seed - Trezor
Keep your recovery seed safe for the long-term security of your digital assets.
Read more >Wallet, Accounts and Addresses - Trezor Blog
Each seed generates only one wallet, and your Trezor lets you manage its ... unless you reveal the account XPUB (extended public key),...
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
You can basically do the same thing as above. Slightly modified.