[#wallet-DescriptorScriptPubKeyMan-GetDescriptorString]
= xref:wallet.adoc[wallet]::xref:wallet/DescriptorScriptPubKeyMan.adoc[DescriptorScriptPubKeyMan]::GetDescriptorString
:relfileprefix: ../../
:mrdocs:

Serializes the descriptor to a string, optionally including private keys&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
GetDescriptorString(
    std::string& out,
    bool priv) const;
----

== Return Value

true if the descriptor was serialized&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Filled with the serialized descriptor string&period;
| *priv*
| Whether to include private keys in the output&period;
|===


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