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 InvertibleLadder Diagram
Fields
| Field | Data Type | Size | Side | Description |
|---|---|---|---|---|
| template_hash | HASH256 | 32 B | Conditions | BIP-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.
Wire Format Breakdown
0x0301
0
1
HASH256 · 34B
Conditions = 38 bytes
0x0301
0
0
Witness = 4 bytes (empty block)
Total
44 bytes
Evaluation Logic
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
Return Values
| Condition | Result |
|---|---|
| HASH256 field missing or not 32 bytes | ERROR |
| No transaction context | UNSATISFIED |
| Computed hash does not match committed hash | UNSATISFIED |
| Computed hash matches committed hash | SATISFIED |
JSON Wire Format
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.
Worked Example
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
Use Cases
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.