TYPE 0x0804 · GOVERNANCE FAMILY

OUTPUT_COUNT

Bounds on the number of outputs in the spending transaction. Controls fan-out behavior and prevents excessive output creation. No Tapscript equivalent.

Governance Invertible
OUTPUT_COUNT min ≤ tx.vout.size() ≤ max Controls output fan-out behavior
FieldData TypeSizeSideDescription
min_outputsNUMERIC1-4 BConditionsMinimum number of outputs required (≥ 0)
max_outputsNUMERIC1-4 BConditionsMaximum number of outputs allowed (≥ min_outputs)
0x0804 0 2 NUMERIC NUMERIC Conditions = 14 bytes
0x0804 0 0 Witness = 4 bytes
Total 20 bytes
1.Collect conditions NUMERICs. Fewer than 2 → ERROR. ReadNumeric the first as min_outputs and the second as max_outputs; either undecodable → ERROR
2.Range/order check: min_outputs < 0, max_outputs < 0, or min_outputs > max_outputsERROR
3.Require ctx.tx; missing → ERROR (fail-closed).
4.If min_outputs ≤ ctx.tx->output_count ≤ max_outputsSATISFIED; else → UNSATISFIED
{
  "type": "OUTPUT_COUNT",
  "fields": [
    { "type": "NUMERIC", "value": 1 },
    { "type": "NUMERIC", "value": 2 }
  ]
}
Simple Transfer Enforcement
Setting max=2 forces the spend to create at most 2 outputs (payment + change). Prevents the UTXO from being used in batch payouts or CoinJoin-style transactions.
Covenant Output Structure
Combined with RECURSE_SAME, ensures the spending transaction creates exactly the right number of covenant outputs. Setting min=max=1 forces a 1-to-1 covenant chain.
Anti-Fragmentation
Capping output count prevents value fragmentation attacks where an adversary splits a large UTXO into many dust outputs to increase future spending costs.