[#CPubKey-Derive] = xref:CPubKey.adoc[CPubKey]::Derive :relfileprefix: ../ :mrdocs: Derive BIP32 child pubkey. == Synopsis Declared in `<pubkey.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] bool Derive( xref:CPubKey.adoc[CPubKey]& pubkeyChild, xref:ChainCode.adoc[ChainCode]& ccChild, unsigned int nChild, xref:ChainCode.adoc[ChainCode] const& cc, xref:uint256.adoc[uint256]* bip32_tweak_out = nullptr) const; ---- == Return Value true if derivation succeeded. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *pubkeyChild* | Output child public key. | *ccChild* | Output child chain code. | *nChild* | Index of the child key to derive. | *cc* | The parent chain code. | *bip32_tweak_out* | Optional output receiving the BIP32 tweak applied. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#