Closed FellGleaming closed 4 years ago
You need to update the parent fingerprint using hdnode_fingerprint
.
// generate m/0' ext key pair.
+ fingerprint = hdnode_fingerprint(&node);
hdnode_private_ckd_prime(&node, 0);
hdnode_fill_public_key(&node);
Hi, I know this is a deprecated library, but I have some legacy code being supported. In converting a mnemonic phrase to an ext key pair, I am able to successfully create a seed and root key, but in creating the m/0' extended key pair, I get a value that does not match expectations. I have pared down the code to the fragment below; am I using the library improperly, or perhaps have I miscompiled with improper flags?
Edit: Adding output. Ext Private Key generated: xprv9tu9RdvSZ2FH6WseyBa1Kcbi7v9VteFDou2GDKGuSApf8Q55p47noHAjQ4qRWyLBBykBHBoy5oepeHMFshu7rahxbjRWrAJnikYytMrwAd1 Expected Value (from IanColeman.io/Bip39): xprv9ukW2Usuz4v7Yd2EC4vNXaMckdsEdgBA9n7MQbqMJbW9FuHDWWjDwzEM2h6XmFnrzX7JVmfcNWMEVoRauU6hQpbokqPPNTbdycW9fHSPYyF