[#SignTransaction-07]
= SignTransaction
:mrdocs:

`SignTransaction` overloads

== Synopses

Declared in `&lt;rpc&sol;rawtransaction&lowbar;util&period;h&gt;`

Sign a transaction with the given keystore and previous transactions


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:SignTransaction-06.adoc[SignTransaction](
    xref:CMutableTransaction.adoc[CMutableTransaction]& mtx,
    xref:SigningProvider.adoc[SigningProvider] const* keystore,
    std::map&lt;COutPoint, Coin&gt; const& coins,
    xref:UniValue.adoc[UniValue] const& hashType,
    xref:UniValue.adoc[UniValue]& result);
----

[.small]#xref:SignTransaction-06.adoc[_» more&period;&period;&period;_]#

Sign the CMutableTransaction


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:SignTransaction-01.adoc[SignTransaction](
    xref:CMutableTransaction.adoc[CMutableTransaction]& mtx,
    xref:SigningProvider.adoc[SigningProvider] const* provider,
    std::map&lt;COutPoint, Coin&gt; const& coins,
    xref:SignOptions.adoc[SignOptions] const& options,
    std::map&lt;int, bilingual&lowbar;str&gt;& input&lowbar;errors);
----

[.small]#xref:SignTransaction-01.adoc[_» more&period;&period;&period;_]#

== Return Value

True if every input was signed successfully&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mtx*
| The transaction to&hyphen;be&hyphen;signed
| *keystore*
| Temporary keystore containing signing keys
| *coins*
| Map of unspent outputs
| *hashType*
| The signature hash type
| *result*
| JSON object where signed transaction results accumulate
| *provider*
| The source of keys and scripts used to sign&period;
| *options*
| Options controlling how each input is signed&period;
| *input&lowbar;errors*
| Filled with per&hyphen;input signing errors, keyed by index&period;
|===


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