[#wallet-CKeyMetadata] = xref:wallet.adoc[wallet]::CKeyMetadata :relfileprefix: ../ :mrdocs: Metadata about a wallet key, such as its creation time and HD derivation info. == Synopsis Declared in `<wallet/walletdb.h>` [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. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:wallet/CKeyMetadata/has_key_origin.adoc[`has_key_origin`] | Whether the key_origin is useful | xref:wallet/CKeyMetadata/hdKeypath.adoc[`hdKeypath`] | optional HD/bip32 keypath. Still used to determine whether a key is a seed. Also kept for backwards compatibility | xref:wallet/CKeyMetadata/hd_seed_id.adoc[`hd_seed_id`] | id of the HD seed used to derive this key | xref:wallet/CKeyMetadata/key_origin.adoc[`key_origin`] | Key origin info with path and fingerprint | xref:wallet/CKeyMetadata/nCreateTime.adoc[`nCreateTime`] | Key creation time as a unix timestamp; 0 means unknown. | xref:wallet/CKeyMetadata/nVersion.adoc[`nVersion`] | Serialized version of this metadata. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:wallet/CKeyMetadata/CURRENT_VERSION.adoc[`CURRENT_VERSION`] | Version number written for new key metadata. | xref:wallet/CKeyMetadata/VERSION_BASIC.adoc[`VERSION_BASIC`] | Original key metadata version. | xref:wallet/CKeyMetadata/VERSION_WITH_HDDATA.adoc[`VERSION_WITH_HDDATA`] | Metadata version that adds HD keypath and seed id. | xref:wallet/CKeyMetadata/VERSION_WITH_KEY_ORIGIN.adoc[`VERSION_WITH_KEY_ORIGIN`] | Metadata version that adds key origin info. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#