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

Sign the tx given the input coins and sighash&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
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 in place&period;
| *coins*
| The input coins spent by the transaction&period;
| *sighash*
| The signature hash type to use&period;
| *input&lowbar;errors*
| Set to per&hyphen;input error messages for inputs that fail&period;
|===


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