import { C } from "https://deno.land/x/lucid@0.10.6/src/mod.ts";
const { Bip32PublicKey } = C;
Methods
as_bytes()
derive(index)
derive this public key with the given index.
Errors
If the index is not a soft derivation index (< 0x80000000) then calling this method will fail.
Security considerations
- hard derivation index cannot be soft derived with the public key
Hard derivation vs Soft derivation
If you pass an index below 0x80000000 then it is a soft derivation. The advantage of soft derivation is that it is possible to derive the public key too. I.e. derivation the private key with a soft derivation index and then retrieving the associated public key is equivalent to deriving the public key associated to the parent private key.
Hard derivation index does not allow public key derivation.
This is why deriving the private key should not fail while deriving the public key may fail (if the derivation index is invalid).
free()