[#SignatureHash] = SignatureHash :mrdocs: Compute the signature hash for one input under the selected signature version. == Synopsis Declared in `<script/interpreter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class T> xref:uint256.adoc[uint256] SignatureHash( xref:CScript.adoc[CScript] const& scriptCode, T const& txTo, unsigned int nIn, int32_t nHashType, xref:CAmount.adoc[CAmount] const& amount, xref:SigVersion.adoc[SigVersion] sigversion, xref:PrecomputedTransactionData.adoc[PrecomputedTransactionData] const* cache = nullptr, xref:SigHashCache.adoc[SigHashCache]* sighash_cache = nullptr); ---- == Return Value The 256‐bit signature hash. == Template Parameters [cols="1,4"] |=== | Name| Description | *T* | The transaction type being signed. |=== == Parameters [cols="1,4"] |=== | Name| Description | *scriptCode* | The script being executed for this input. | *txTo* | The transaction whose input is being signed. | *nIn* | Index of the input being signed. | *nHashType* | The sighash type byte controlling which parts are committed. | *amount* | The value of the output being spent. | *sigversion* | The signature version selecting the hashing scheme. | *cache* | Optional precomputed transaction data reused across inputs. | *sighash_cache* | Optional cache of SHA256 midstates for repeated computations. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#