Bitcoin Covenants Part 2: OP_CHECKTEMPLATEVERIFY
CTV lets a Bitcoin output commit to precisely what the next transaction must look like. This enables trust-minimized vaults, congestion control, and smart contract primitives without pre-signed key management.
This is Part 2 in the technical article series about Bitcoin covenants by Cointelegraph Research. To read the previous article click here.
OP_CHECKTEMPLATEVERIFY (OP_CTV) was proposed by Jeremy Rubin in BIP 119. It defines spending conditions in a simple template structure that can include the outputs, version, and locktime of the next transaction. The opcode takes a commitment hash as an argument and requires that any transaction executing the opcode include only outputs that match this commitment.
Upon execution, OP_CTV expects this 32-byte commitment hash on top of the stack. The opcode then computes a fresh StandardTemplateHash from the current spending transaction to compare with this commitment hash. The serialized fields that go into the StandardTemplateHash include the transaction version and locktime, the counts of inputs and outputs, and a hash of all outputs, which commits to both their values and their locking scripts (scriptPubKeys). If the transaction matches the template, OP_CTV pushes a 1 on the stack to signal success; otherwise, it pushes a 0 to signal failure.
Source: Cointelegraph →Related News
- 1 week ago
21shares trims 2026 crypto forecasts despite institutional adoption gains
- 1 week ago
The Impossibility of Perfect Fairness in Transaction Ordering
- Jun 21, 2026
Bitcoin ETFs shed a record $6.4B in 30 days amid crypto winter chill
- Jun 21, 2026
Bitcoin ETFs shed record $6.4B in 30 days amid crypto winter chill
- Jun 18, 2026
Grayscale applies traditional finance models to AAVE, sees $175 value
