[#wallet-CHDChain]
= xref:wallet.adoc[wallet]::CHDChain
:relfileprefix: ../
:mrdocs:

Simple HD chain data model&period;

== Synopsis

Declared in `&lt;wallet&sol;walletdb&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CHDChain;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CHDChain/2constructor.adoc[`CHDChain`]         [.small]#[constructor]#
| Constructs an HD chain initialized to the null state&period;
| xref:wallet/CHDChain/SetNull.adoc[`SetNull`] 
| Resets all fields to their default null state&period;
| xref:wallet/CHDChain/operator_eq.adoc[`operator&equals;&equals;`] 
| Compares two HD chains for equality by seed id&period;
| xref:wallet/CHDChain/operator_lt.adoc[`operator&lt;`] 
| Orders HD chains by seed id&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CHDChain/m_next_external_index.adoc[`m&lowbar;next&lowbar;external&lowbar;index`] 
| Next external index in the keypool to be used&period; Memory only&period;
| xref:wallet/CHDChain/m_next_internal_index.adoc[`m&lowbar;next&lowbar;internal&lowbar;index`] 
| Next internal index in the keypool to be used&period; Memory only&period;
| xref:wallet/CHDChain/nExternalChainCounter.adoc[`nExternalChainCounter`] 
| Counter for the next external chain child key index&period;
| xref:wallet/CHDChain/nInternalChainCounter.adoc[`nInternalChainCounter`] 
| Counter for the next internal chain child key index&period;
| xref:wallet/CHDChain/nVersion.adoc[`nVersion`] 
| Serialized version of this HD chain&period;
| xref:wallet/CHDChain/seed_id.adoc[`seed&lowbar;id`] 
| seed hash160
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CHDChain/CURRENT_VERSION.adoc[`CURRENT&lowbar;VERSION`] 
| Version number written for new HD chains&period;
| xref:wallet/CHDChain/VERSION_HD_BASE.adoc[`VERSION&lowbar;HD&lowbar;BASE`] 
| Version number for the original HD chain format&period;
| xref:wallet/CHDChain/VERSION_HD_CHAIN_SPLIT.adoc[`VERSION&lowbar;HD&lowbar;CHAIN&lowbar;SPLIT`] 
| Version number for HD chains with separate internal and external counters&period;
|===



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