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':
#: 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:
#: cat xprv | sx hd-pub 0 > xpub
Generate receiving address from that xpub where
i is the address number:
#: cat xpub | sx hd-pub i | sx hd-to-address