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

Writes an encrypted descriptor private key&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
WriteCryptedDescriptorKey(
    xref:uint256.adoc[uint256] const& desc&lowbar;id,
    xref:CPubKey.adoc[CPubKey] const& pubkey,
    std::vector&lt;unsigned char&gt; const& secret);
----

== Return Value

true if the record was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *desc&lowbar;id*
| The identifier of the descriptor&period;
| *pubkey*
| The public key&period;
| *secret*
| The encrypted private key material&period;
|===


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