Bitcoin Forum
June 03, 2024, 02:55:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: Creating public address from ethereum xpub  (Read 101 times)
edgycorner (OP)
Sr. Member
****
Offline Offline

Activity: 1064
Merit: 382

Hurrah for Karamazov!


View Profile
June 01, 2018, 05:11:24 PM
 #1

Is it possible to generate new ethereum public address from extended public key?
Thanks!
mdayonliner
Copper Member
Sr. Member
****
Offline Offline

Activity: 630
Merit: 420


We are Bitcoin!


View Profile
June 01, 2018, 05:16:01 PM
 #2

Is it possible to generate new ethereum public address from extended public key?
Thanks!

Have you ended up finding this...

Code:
var hdkey = require('ethereumjs-wallet/hdkey');

var extPubKey = 'xpub6ERoQFMqiUoTXAL56JpQYLq5FyXaZypJiKdsAbHKzMUQsSiJTNSMnBtYYRXxda9C6fUx6mMMqatUDNFSKxxXcpBcpPkTqVwyethpWiQN8p5';

var hdwallet = hdkey.fromExtendedKey(extPubKey);
var wallet = hdwallet.getWallet();
var address = wallet.getAddress();

console.log(`Address: 0x${address.toString('hex')}`);

Be happy be at peace. Looking forward to BTC at $1M
edgycorner (OP)
Sr. Member
****
Offline Offline

Activity: 1064
Merit: 382

Hurrah for Karamazov!


View Profile
June 01, 2018, 07:31:14 PM
 #3

Is it possible to generate new ethereum public address from extended public key?
Thanks!

Have you ended up finding this...

Code:
var hdkey = require('ethereumjs-wallet/hdkey');

var extPubKey = 'xpub6ERoQFMqiUoTXAL56JpQYLq5FyXaZypJiKdsAbHKzMUQsSiJTNSMnBtYYRXxda9C6fUx6mMMqatUDNFSKxxXcpBcpPkTqVwyethpWiQN8p5';

var hdwallet = hdkey.fromExtendedKey(extPubKey);
var wallet = hdwallet.getWallet();
var address = wallet.getAddress();

console.log(`Address: 0x${address.toString('hex')}`);
Thanks for looking!
Yea, I got it but I am getting a build error everytime :/
Don't know what's going wrong.If there's any other way, that would be so helpful.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!