[#SignatureHashSchnorr] = SignatureHashSchnorr :mrdocs: Compute the BIP341 Taproot signature hash for one input. == Synopsis Declared in `<script/interpreter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> bool SignatureHashSchnorr( xref:uint256.adoc[uint256]& hash_out, xref:ScriptExecutionData.adoc[ScriptExecutionData]& execdata, T const& tx_to, uint32_t in_pos, uint8_t hash_type, xref:SigVersion.adoc[SigVersion] sigversion, xref:PrecomputedTransactionData.adoc[PrecomputedTransactionData] const& cache, xref:MissingDataBehavior.adoc[MissingDataBehavior] mdb); ---- == Return Value `true` if the hash was computed successfully. == Template Parameters [cols="1,4"] |=== | Name| Description | *T* | The transaction type being signed. |=== == Parameters [cols="1,4"] |=== | Name| Description | *hash_out* | Receives the computed signature hash. | *execdata* | Per‐input execution state used by the sighash. | *tx_to* | The transaction whose input is being signed. | *in_pos* | Index of the input being signed. | *hash_type* | The sighash type byte. | *sigversion* | The signature version (TAPROOT or TAPSCRIPT). | *cache* | Precomputed transaction data required for Taproot. | *mdb* | How to react when required spent‐output data is missing. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#