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

Writes metadata for a key&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
WriteKeyMetadata(
    xref:wallet/CKeyMetadata.adoc[CKeyMetadata] const& meta,
    xref:CPubKey.adoc[CPubKey] const& pubkey,
    bool overwrite);
----

== Return Value

true if the record was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *meta*
| The key metadata to store&period;
| *pubkey*
| The public key the metadata applies to&period;
| *overwrite*
| Whether to overwrite an existing record&period;
|===


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