Block Reference
CTV
Covenant Family
TYPE 0x0301 · COVENANT FAMILY

CTV

CheckTemplateVerify (BIP-119). Verifies the spending transaction matches a committed template hash. The template hash covers version, locktime, scriptSigs hash, input count, sequences hash, output count, outputs hash, and input index. No witness data required — the template is computed directly from the transaction.

Covenant Invertible
CTV HASH256 (32B) — template hash ComputeCTVHash(tx, input_index) == committed_hash → SATISFIED
FieldData TypeSizeSideDescription
template_hashHASH25632 BConditionsBIP-119 template hash commitment. Covers version, locktime, scriptSigs, input count, sequences, output count, outputs, and input index.

No witness fields required — the template hash is computed directly from the spending transaction context.

0x0301 0 1 HASH256 · 34B Conditions = 38 bytes
0x0301 0 0 Witness = 4 bytes (empty block)
Total 44 bytes
1.Read template_hash from HASH256 field. If missing or not exactly 32 bytes → ERROR
2.If no transaction context available → UNSATISFIED
3.Compute ComputeCTVHash(tx, input_index) from spending transaction fields
4.If computed hash == committed template_hash → SATISFIED
5.Otherwise → UNSATISFIED
ConditionResult
HASH256 field missing or not 32 bytesERROR
No transaction contextUNSATISFIED
Computed hash does not match committed hashUNSATISFIED
Computed hash matches committed hashSATISFIED
Conditions (template hash for a 2-output batch payout)
{
  "type": "CTV",
  "inverted": false,
  "fields": [
    { "type": "HASH256", "value": "a1b2c3d4e5f6...32-byte-hex..." }
  ]
}

The template hash commits to the exact shape of the spending transaction. Any deviation in version, locktime, outputs, or input index will produce a different hash and fail evaluation.

Congestion control: batch payout from a single UTXO

UTXO locked with CTV template hash committing to 10 outputs
Spender constructs tx with version=2, locktime=0, 10 outputs to specific addresses
ComputeCTVHash(tx, 0) = a1b2c3d4...
Committed hash = a1b2c3d4... → match → SATISFIED
If attacker changes any output address or amount: hash mismatch → UNSATISFIED
Congestion Control
Batch presigned outputs into a single UTXO during fee spikes. The CTV hash commits to the exact set of recipients, allowing trustless expansion when fees drop. One on-chain transaction becomes many without any signature required.
Vaults
Pre-committed recovery paths where the spending transaction shape is fixed at vault creation time. The CTV hash ensures funds can only move to the pre-determined recovery address with the pre-determined amounts.
Payment Pools
Multi-party payment pools where each participant has a CTV-committed exit transaction. The pool can be unilaterally exited by any participant using their pre-committed template, without cooperation from other pool members.
← TAGGED_HASH VAULT_LOCK →