CPubKey::Derive

Derive BIP32 child pubkey.

Synopsis

Declared in <pubkey.h>

[[nodiscard]]
bool
Derive(
    CPubKey& pubkeyChild,
    ChainCode& ccChild,
    unsigned int nChild,
    ChainCode const& cc,
    uint256* bip32_tweak_out = nullptr) const;

Return Value

true if derivation succeeded.

NOTE

The return value should not be discarded.

Parameters

NameDescription
pubkeyChildOutput child public key.
ccChildOutput child chain code.
nChildIndex of the child key to derive.
ccThe parent chain code.
bip32_tweak_outOptional output receiving the BIP32 tweak applied.