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

Create new DescriptorScriptPubKeyMan and add it to the wallet

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f94fde06e18), requires&lowbar;capability(0x7f95061a9b58), requires&lowbar;capability(0x7f94f2b7a668), requires&lowbar;capability(0x7f94f0cf92f8), requires&lowbar;capability(0x7f94fee3bce8)&rsqb;&rsqb;
xref:wallet/DescriptorScriptPubKeyMan.adoc[DescriptorScriptPubKeyMan]&
SetupDescriptorScriptPubKeyMan(
    xref:wallet/WalletBatch.adoc[WalletBatch]& batch,
    xref:CExtKey.adoc[CExtKey] const& master&lowbar;key,
    xref:OutputType.adoc[OutputType] const& output&lowbar;type,
    bool internal);
----

== Return Value

The newly created descriptor ScriptPubKeyMan&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *batch*
| The database batch to write through&period;
| *master&lowbar;key*
| The master key to derive the descriptor from&period;
| *output&lowbar;type*
| The output type the descriptor produces&period;
| *internal*
| Whether this manages internal (change) addresses&period;
|===


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