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

Writes a master key used to encrypt wallet keys&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
WriteMasterKey(
    unsigned int nID,
    xref:wallet/CMasterKey.adoc[CMasterKey] const& kMasterKey);
----

== Return Value

true if the record was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nID*
| The identifier of the master key&period;
| *kMasterKey*
| The master key to store&period;
|===


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