[#wallet-WalletBatch-WriteMasterKey] = xref:wallet.adoc[wallet]::xref:wallet/WalletBatch.adoc[WalletBatch]::WriteMasterKey :relfileprefix: ../../ :mrdocs: Writes a master key used to encrypt wallet keys. == Synopsis Declared in `<wallet/walletdb.h>` [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. == Parameters [cols="1,4"] |=== | Name| Description | *nID* | The identifier of the master key. | *kMasterKey* | The master key to store. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#