Bitcoinjs-lib: How can create child address by the parent privateKey or publickKey??

Created on 18 May 2018  路  3Comments  路  Source: bitcoinjs/bitcoinjs-lib

excuse me,
I have some problem!
eg:
BTC's: privateKey:XXXXXXXX,
BTC's: publickKey,XXXXXXXX,
the path is m/44'/0'/0',
how can create a address of m / 44' / 0' / 0' / 0 / 0,

  Thanks  a lot!!!
how to / question / docs

Most helpful comment

var bitcoin = require('bitcoinjs-lib')

var hdNode = bitcoin.HDNode.fromBase58('xpub6CEVrVYpttGAoP2v...........c49ZTYSLaW')

var address = hdNode.derive(0).derive(0).getAddress()

All 3 comments

var bitcoin = require('bitcoinjs-lib')

var hdNode = bitcoin.HDNode.fromBase58('xpub6CEVrVYpttGAoP2v...........c49ZTYSLaW')

var address = hdNode.derive(0).derive(0).getAddress()

thanks you answer!
sorry for that i want to know the ''xpub6CEVrVYpttGAoP2v...........c49ZTYSLaW'' is what???

Also known as "Extended Key"

xpub is public
xprv is private

https://bitcoin.org/en/developer-guide#term-extended-key

Was this page helpful?
0 / 5 - 0 ratings

Related issues

namnv04 picture namnv04  路  3Comments

ghost picture ghost  路  3Comments

dakk picture dakk  路  3Comments

rbndg picture rbndg  路  3Comments

Mr-Mondragon picture Mr-Mondragon  路  3Comments