Co-spend constraint. Requires another input in the same transaction to have a spent output whose scriptPubKey hash matches the committed HASH256. Enforces cross-input dependencies for atomic multi-UTXO operations. No Tapscript equivalent exists.
PLCCross-InputNon-Invertible
Ladder Diagram
Fields
Field
Data Type
Size
Side
Description
script_hash
HASH256
32 B
Conditions
SHA-256 hash of the anchor's conditions scriptPubKey that must appear as a spent output in another input
No witness fields required. The transaction context provides the spent outputs of all other inputs for cross-reference.
Wire Format Breakdown
0x068101HASH256 · 32BConditions = 38 bytes
0x068100Witness = 4 bytes (empty block)
Total42 bytes
Evaluation Logic
1.Read HASH256 field. If missing or not exactly 32 bytes → ERROR
2.If no transaction context or spent_outputs unavailable → SATISFIED (structural validation only)
3.For each other input in the transaction: compute SHA256(spent_output.scriptPubKey)
4.If any computed hash matches the committed HASH256 → SATISFIED
5.No match found across all other inputs → UNSATISFIED
Return Values
Condition
Result
HASH256 field missing
ERROR
HASH256 field not exactly 32 bytes
ERROR
No transaction context (structural check)
SATISFIED
No other input's spent scriptPubKey hash matches
UNSATISFIED
At least one other input's spent scriptPubKey hash matches
This creates a co-spend requirement. The transaction must include another input whose spent output's scriptPubKey, when SHA-256 hashed, matches the committed hash.
Worked Example
HASH256 = SHA256(anchor_scriptPubKey)
TX has 2 inputs. Input[1].spent_output.scriptPubKey matches → SATISFIED
TX has 3 inputs. Input[2].spent_output.scriptPubKey matches → SATISFIED
TX has 1 input (only self). No other inputs to check → UNSATISFIED
TX has 2 inputs. No scriptPubKey hash matches → UNSATISFIED
No tx context (structural only) → SATISFIED
Use Cases
Atomic Multi-UTXO Operations
Ensure two UTXOs are always spent together in the same transaction. Each UTXO commits to the other's scriptPubKey hash via COSIGN, creating a bidirectional dependency that prevents spending one without the other.
Paired Covenant Spends
Link a data-carrying UTXO to a value-carrying UTXO. The value output requires the data output as a co-spend, ensuring state transitions always include the associated data payload in the same transaction.
Cross-Input Authorization
Require that a specific authorization UTXO (identified by its scriptPubKey hash) is consumed in the same transaction. This creates a physical "key" UTXO that must be presented alongside the "lock" UTXO to authorize spending.