Closed AFlowOfCode closed 1 year ago
Hi,
DerivePath
, you are deriving a new child at each /
, so m/44'/888'/0'/0/0
means you derived 5 children keys and that's why the depth is 5 (for more information, see here). That's also the reason why the fingerprint of the child doesn't match the master one (b48c04f1
is the fingerprint of the parent key, i.e. m/44'/888'/0'/0
).IsMasterKey
method to the Bip32Base
class. However, conceptually, the fingerprint is the hash160
of the current public key, so it's always different from zero and therefore FingerPrint().IsMasterKey()
cannot return true
. The parent fingerprint, instead, is the fingerprint of the parent key and it's set to zero for the master key by default, that's why bip32_mst_ctx.ParentFingerPrint().IsMasterKey()
returns true
.I hope it helps.
Regards, Emanuele
Thanks, very helpful!
Hi, I have been playing around with this and it is an excellent tool that is easy to use. I am still learning about HD key generation and I hope you can help me clear up a couple things that look confusing when I print the derivation data for nist256p1 keys. I apologize in advance if the explanations are obvious! I would be very happy with a link to somewhere the answers to my questions are explained.
Below is the code I'm using, which I modified only slightly from this example.
Here is example output:
Questions about the output:
f414e809
. Again it seems as though keys have been skipped & I don't know where they are or if that is normal.bip32_mst_ctx.FingerPrint().IsMasterKey()
return false for the master key? Is this not actually the master key? If parent fingerprint is00000000
then it doesn't look like it even has a parent, so I expected this to be true. Maybe "master key" actually refers to the seed phrase itself?Thank you for your help!