[#CKey-Derive]
= xref:CKey.adoc[CKey]::Derive
:relfileprefix: ../
:mrdocs:

Derive BIP32 child key&period;

== Synopsis

Declared in `&lt;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
Derive(
    xref:CKey.adoc[CKey]& keyChild,
    xref:ChainCode.adoc[ChainCode]& ccChild,
    unsigned int nChild,
    xref:ChainCode.adoc[ChainCode] const& cc) const;
----

== Return Value

true if derivation succeeded&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *keyChild*
| Output child private key&period;
| *ccChild*
| Output child chain code&period;
| *nChild*
| Index of the child key to derive&period;
| *cc*
| The parent chain code&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
