Xpun creates a new collection address


(Tanwan Tanwan) #1

I have a need to send an xpub to me, and I will use this xpub to create a new billing address. Here is my code.

var parent = new HDPublicKey(‘xpub6FKH2NA8pzQ2pfsFMCCb68SvNFwFJFoVvMk5aySLeKgaADatV81MfboFS172HouZPALSpxE43d7wjz3vg7q3T338uxnazVXfzhNTxqhRN4E’);
var deriveM44 = parent.derive(“m/44’/1’/0’/0/0”);

Make a mistake.
creating a hardened path requires an HDPrivateKey.
How do you modify the code?