Though private keys cannot be derived from HD public keys, sharing HD public
keys still carries risk. Along with allowing an attacker to associate wallet
addresses together (breaking privacy), should an attacker gain knowledge of a
single child private key, it's possible to derive all parent HD private
keys. See crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode for
details.
To derive the HD public node of an already-decoded HD private node,
use deriveHdPublicNode.
Note that this function defaults to throwing errors. To handle errors in a
type-safe way, set throwErrors to false.
Derive the HD public key of an HD private key.
Though private keys cannot be derived from HD public keys, sharing HD public keys still carries risk. Along with allowing an attacker to associate wallet addresses together (breaking privacy), should an attacker gain knowledge of a single child private key, it's possible to derive all parent HD private keys. See crackHdPrivateNodeFromHdPublicNodeAndChildPrivateNode for details.
To derive the HD public node of an already-decoded HD private node, use deriveHdPublicNode.
Note that this function defaults to throwing errors. To handle errors in a type-safe way, set
throwErrors
tofalse
.