TYPE 0x0803 · GOVERNANCE FAMILY

INPUT_COUNT

Bounds on the number of inputs in the spending transaction. Enforces minimum and maximum input count constraints. No Tapscript equivalent.

Governance Invertible
INPUT_COUNT min ≤ tx.vin.size() ≤ max Controls input consolidation behavior
FieldData TypeSizeSideDescription
min_inputsNUMERIC1-4 BConditionsMinimum number of inputs required (≥ 0)
max_inputsNUMERIC1-4 BConditionsMaximum number of inputs allowed (≥ min_inputs)
0x0803 0 2 NUMERIC NUMERIC Conditions = 14 bytes
0x0803 0 0 Witness = 4 bytes
Total 20 bytes
1.Collect conditions NUMERICs. Fewer than 2 → ERROR. ReadNumeric the first as min_inputs and the second as max_inputs; either undecodable → ERROR
2.Range/order check: min_inputs < 0, max_inputs < 0, or min_inputs > max_inputsERROR
3.Require ctx.tx; missing → ERROR (fail-closed).
4.If min_inputs ≤ ctx.tx->input_count ≤ max_inputsSATISFIED; else → UNSATISFIED
{
  "type": "INPUT_COUNT",
  "fields": [
    { "type": "NUMERIC", "value": 1 },
    { "type": "NUMERIC", "value": 3 }
  ]
}
Single-Input Spending
Setting min=1, max=1 forces the UTXO to be spent alone — preventing it from being combined with other inputs that could reveal common ownership through input clustering analysis.
Forced Consolidation
Setting min=5 requires at least 5 inputs, forcing UTXO consolidation. Useful for protocols that need to merge multiple covenant outputs in a single transaction.
Anti-Dust Aggregation
Combined with RELATIVE_VALUE, caps how many inputs can be aggregated to prevent dust attack amplification.