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

Metadata about a wallet key, such as its creation time and HD derivation info&period;

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CKeyMetadata/2constructor-0e.adoc[`CKeyMetadata`]         [.small]#[constructor]#
| Constructors
| xref:wallet/CKeyMetadata/SetNull.adoc[`SetNull`] 
| Resets all fields to their default null state&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CKeyMetadata/has_key_origin.adoc[`has&lowbar;key&lowbar;origin`] 
| Whether the key&lowbar;origin is useful
| xref:wallet/CKeyMetadata/hdKeypath.adoc[`hdKeypath`] 
| optional HD&sol;bip32 keypath&period; Still used to determine whether a key is a seed&period; Also kept for backwards compatibility
| xref:wallet/CKeyMetadata/hd_seed_id.adoc[`hd&lowbar;seed&lowbar;id`] 
| id of the HD seed used to derive this key
| xref:wallet/CKeyMetadata/key_origin.adoc[`key&lowbar;origin`] 
| Key origin info with path and fingerprint
| xref:wallet/CKeyMetadata/nCreateTime.adoc[`nCreateTime`] 
| Key creation time as a unix timestamp&semi; 0 means unknown&period;
| xref:wallet/CKeyMetadata/nVersion.adoc[`nVersion`] 
| Serialized version of this metadata&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CKeyMetadata/CURRENT_VERSION.adoc[`CURRENT&lowbar;VERSION`] 
| Version number written for new key metadata&period;
| xref:wallet/CKeyMetadata/VERSION_BASIC.adoc[`VERSION&lowbar;BASIC`] 
| Original key metadata version&period;
| xref:wallet/CKeyMetadata/VERSION_WITH_HDDATA.adoc[`VERSION&lowbar;WITH&lowbar;HDDATA`] 
| Metadata version that adds HD keypath and seed id&period;
| xref:wallet/CKeyMetadata/VERSION_WITH_KEY_ORIGIN.adoc[`VERSION&lowbar;WITH&lowbar;KEY&lowbar;ORIGIN`] 
| Metadata version that adds key origin info&period;
|===



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