You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to generate a possible public key(receiving address) from xPub key. Currently, I am using this code
var hdkey = require('ethereumjs-wallet/hdkey');
var extPubKey = 'xpub6D4vX5InpWpivgUZixTzYlsuFCpnimEv7UFaxrcTGnBMUtdL3RpdsdekdCkEeGelLUt31N2LCe3TwA8ge5sC9d72HSRYYhgq1DO4yMaQb9g0';
var hdwallet = hdkey.fromExtendedKey(extPubKey);
var wallet = hdwallet.getWallet();
var address = wallet.getAddress();
console.log(`Address: 0x${address.toString('hex')}`);
It's generating a correct address for ETH (Legacy) xPub. But its not working for new xPub keys. Like Jaxx Wallet, Ledger Nano, so on. are using now-a-days.
Hi, I am trying to generate a possible public key(receiving address) from xPub key. Currently, I am using this code
It's generating a correct address for ETH (Legacy) xPub. But its not working for new xPub keys. Like Jaxx Wallet, Ledger Nano, so on. are using now-a-days.
LEDGER NANO
xpub key:
xpub6BemYiVNp19a1YNegeXbcmYxwzi5ym8dVsHCSR6vHqFcaRxRBUkZ14uqaZSiPLPDA259FzDE5PQHQFKjw4aP4apXSVRdf2y1vZHTM395CbH
correct address:
0x766540cA3EF86A62E6fBb877B26592ce4c907080
Jaxx
xpub key:
xpub6E6BLhWoLSzcTnGYQgVjMdfin8njwC4BPrANqaJxoWpM2ywhqAbDa49mCBJyWGsE57mKGwqUqttHn2dHR7sGnfksY78Q9gy3g4b6q2xxYau
correct address:
can someone help me here? Thanks in advance.
The text was updated successfully, but these errors were encountered: