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 InvertibleLadder Diagram
Fields
| Field | Data Type | Size | Side | Description |
|---|---|---|---|---|
| min_inputs | NUMERIC | 1-4 B | Conditions | Minimum number of inputs required (≥ 0) |
| max_inputs | NUMERIC | 1-4 B | Conditions | Maximum number of inputs allowed (≥ min_inputs) |
Wire Format Breakdown
0x0803
0
2
NUMERIC
NUMERIC
Conditions = 14 bytes
0x0803
0
0
Witness = 4 bytes
Total
20 bytes
Evaluation Logic
1.Collect conditions NUMERICs. Fewer than 2 → ERROR. ReadNumeric the first as
min_inputs and the second as max_inputs; either undecodable → ERROR2.Range/order check:
min_inputs < 0, max_inputs < 0, or min_inputs > max_inputs → ERROR3.Require
ctx.tx; missing → ERROR (fail-closed).4.If
min_inputs ≤ ctx.tx->input_count ≤ max_inputs → SATISFIED; else → UNSATISFIEDJSON Wire Format
{
"type": "INPUT_COUNT",
"fields": [
{ "type": "NUMERIC", "value": 1 },
{ "type": "NUMERIC", "value": 3 }
]
}Use Cases
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.