Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

OP_TXHASH

Network & Protocol

Definition

OP_TXHASH is a proposed, experimental Bitcoin opcode described in BIP 346, authored by Steven Roose and Brandon Black. It is not active in Bitcoin consensus and would require a soft fork. We present it neutrally as one of several covenant-enabling ideas under discussion as of 2026, with no activation scheduled.

How it works

OP_TXHASH would activate as new semantics for an OP_SUCCESS opcode inside Tapscript. It produces a hash over a caller-chosen set of transaction fields, selected via a structure called a TxFieldSelector. A script can then require that hash to equal a committed value, enforcing that specific inputs, outputs, or global fields are spent exactly as pre-defined while leaving other fields free to change at spending time.

Comparison to CTV

OP_CHECKTEMPLATEVERIFY (CTV) commits to an entire transaction template. OP_TXHASH is sometimes described as a more granular relative: it lets the author pick precisely which pieces of a transaction are constrained and which remain flexible. Proponents argue this granularity improves privacy and coordination in multiparty and Layer 2 protocols, since participants only fix the parts that matter to the contract. Critics raise the usual covenant questions about added Script complexity and long-term consensus surface, and the proposal remains a topic of active, respectful debate.

OP_TXHASH is closely related to OP_CHECKCONTRACTVERIFY and to signature-introspection primitives like OP_CHECKSIGFROMSTACK. See also our overview of MATT.

In Simple Terms

OP_TXHASH is a proposed, experimental Bitcoin opcode described in BIP 346, authored by Steven Roose and Brandon Black. It is not active in Bitcoin consensus…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners