Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ChazM on January 13, 2015, 02:26:15 AM



Title: HD wallets with sx tools
Post by: ChazM on January 13, 2015, 02:26:15 AM
I'm attempting to play around with HD wallets by building BIP44 wallets. I'm just wondering if I have the syntax correct. If I want to create receiving addresses as m/44'/0'/0'/0/address - I would create the extended private key for the hardened grandparent, generate the xpub for its child account and derive receiving addresses from that?

Generating the account's extended private key m/44'/0'/0':
Code:
#: cat m | sx hd-priv 44 --hard | sx hd-priv 0 --hard | sx hd-priv 0 --hard > xprv
Generate the receiving address xpub to be stored somewhere on a server:
Code:
#: cat xprv | sx hd-pub 0 > xpub
Generate receiving address from that xpub where i is the address number:
Code:
#: cat xpub | sx hd-pub i | sx hd-to-address