[#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. == Synopsis Declared in `<wallet/wallet.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool SignTransaction( xref:CMutableTransaction.adoc[CMutableTransaction]& tx, std::map<COutPoint, Coin> const& coins, int sighash, std::map<int, bilingual_str>& input_errors) const; ---- == Return Value true if all inputs were signed. == Parameters [cols="1,4"] |=== | Name| Description | *tx* | The transaction to sign in place. | *coins* | The input coins spent by the transaction. | *sighash* | The signature hash type to use. | *input_errors* | Set to per‐input error messages for inputs that fail. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#