[#wallet-ScriptPubKeyMan-SignTransaction]
= xref:wallet.adoc[wallet]::xref:wallet/ScriptPubKeyMan.adoc[ScriptPubKeyMan]::SignTransaction
:relfileprefix: ../../
:mrdocs:

Creates new signatures and adds them to the transaction&period; Returns whether all inputs were signed

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
SignTransaction(
    xref:CMutableTransaction.adoc[CMutableTransaction]& tx,
    std::map&lt;COutPoint, Coin&gt; const& coins,
    int sighash,
    std::map&lt;int, bilingual&lowbar;str&gt;& input&lowbar;errors) const;
----

== Return Value

true if all inputs were signed&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tx*
| The transaction to sign, updated in place&period;
| *coins*
| The previous outputs spent by the transaction&apos;s inputs&period;
| *sighash*
| The signature hash type to use&period;
| *input&lowbar;errors*
| Filled with a per&hyphen;input error message for any input that could not be signed&period;
|===


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