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

Signs a message with the key for the given script&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:SigningResult.adoc[SigningResult]
SignMessage(
    std::string const& message,
    xref:PKHash.adoc[PKHash] const& pkhash,
    std::string& str&lowbar;sig) const override;
----

== Return Value

The result of the signing attempt&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *message*
| The message to sign&period;
| *pkhash*
| The hash of the public key whose private key should sign&period;
| *str&lowbar;sig*
| Filled with the produced signature on success&period;
|===


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