cryptocoinjs / hdkey

JavaScript component for Bitcoin hierarchical deterministic keys (BIP32)
MIT License
201 stars 74 forks source link

Deriving from hardened extended keys #24

Closed alexander-morris closed 4 years ago

alexander-morris commented 6 years ago

Hey guys - I've been playing with this module a bit and finding it really useful. Thank you!

I'm just wondering if I might be missing something. I'd like to be able to derive child nodes from a hardened extended key, which could be generated on startup.

i.e. derive a node such as m/44'/1'/0' and create an extended, hardened, public key that could be used to derive paths such as m/44'/1'/0'/n

If it's not currently possible let me know and I might give it a shot.

RyanZim commented 4 years ago

Deriving m/44'/1'/0'/n from m/44'/1'/0' xpub would be possible; however, you can't derive hardened children from xpubs (i.e. couldn't derive m/44'/1'/0'/n' from m/44'/1'/0' xpub)