[#wallet-CWallet-AddWalletDescriptor]
= xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::AddWalletDescriptor
:relfileprefix: ../../
:mrdocs:

Add a descriptor to the wallet, return a ScriptPubKeyMan &amp; associated output type

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f94fde071d8), requires&lowbar;capability(0x7f95061a9f18), requires&lowbar;capability(0x7f94f2b7aa28), requires&lowbar;capability(0x7f94f0cf96b8), requires&lowbar;capability(0x7f94fee3c0a8)&rsqb;&rsqb;
xref:util/Result.adoc[util::Result&lt;std::reference&lowbar;wrapper&lt;DescriptorScriptPubKeyMan&gt;&gt;]
AddWalletDescriptor(
    xref:wallet/WalletDescriptor.adoc[WalletDescriptor]& desc,
    xref:FlatSigningProvider.adoc[FlatSigningProvider] const& signing&lowbar;provider,
    std::string const& label,
    bool internal);
----

== Return Value

The added descriptor ScriptPubKeyMan, or an error on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *desc*
| The wallet descriptor to add&period;
| *signing&lowbar;provider*
| Keys and scripts needed to solve the descriptor&period;
| *label*
| The label to assign to generated addresses&period;
| *internal*
| Whether the descriptor manages internal (change) addresses&period;
|===


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