TYPE 0x0807 · GOVERNANCE FAMILY
OUTPUT_CHECK
Per-output value and script constraint. Verifies that a specific output in the spending transaction has a value within bounds and optionally matches a script hash.
Governance
Non-Invertible
Fields
| Field | Data Type | Size | Side | Description |
| output_index | NUMERIC | 1-4 B | Conditions | Index of the output to check |
| min_sats | NUMERIC | 1-4 B | Conditions | Minimum output value in satoshis |
| max_sats | NUMERIC | 1-4 B | Conditions | Maximum output value in satoshis |
| script_hash | HASH256 | 32 B | Conditions | SHA-256 of expected scriptPubKey (all zeros = skip script check) |
Evaluation Logic
1.Read output_index, min_sats, max_sats from NUMERIC fields, script_hash from HASH256. If missing → ERROR
2.Bounds check: output_index < tx.vout.size(). If out of bounds → UNSATISFIED
3.Value check: vout[idx].nValue ≥ min_sats AND ≤ max_sats. If fails → UNSATISFIED
4.Script check (if hash non-zero): SHA256(vout[idx].scriptPubKey) == script_hash. If fails → UNSATISFIED
5.All checks pass → SATISFIED
Return Values
| Condition | Result |
| Missing fields or invalid parameters | ERROR |
| No transaction context | ERROR |
| min_sats > max_sats | ERROR |
| Output index out of bounds | UNSATISFIED |
| Output value out of range | UNSATISFIED |
| Script hash mismatch | UNSATISFIED |
| All checks pass | SATISFIED |
Use Cases
Treasury Governance
Enforce that treasury spends route a minimum amount to a known address. OUTPUT_CHECK on output 0 ensures the destination script and minimum value match the approved disbursement.
Covenant Enforcement
Combine with SIG to require that a specific output receives a minimum value. Unlike AMOUNT_LOCK (which checks input/output ratios), OUTPUT_CHECK constrains individual outputs by index.