[#wallet-WalletBatch-WriteKey] = xref:wallet.adoc[wallet]::xref:wallet/WalletBatch.adoc[WalletBatch]::WriteKey :relfileprefix: ../../ :mrdocs: Writes an unencrypted private key and its metadata. == Synopsis Declared in `<wallet/walletdb.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool WriteKey( xref:CPubKey.adoc[CPubKey] const& vchPubKey, xref:CPrivKey.adoc[CPrivKey] const& vchPrivKey, xref:wallet/CKeyMetadata.adoc[CKeyMetadata] const& keyMeta); ---- == Return Value true if the record was written. == Parameters [cols="1,4"] |=== | Name| Description | *vchPubKey* | The public key. | *vchPrivKey* | The corresponding private key. | *keyMeta* | The key metadata to store. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#