Block Reference
COSIGN
PLC Family
TYPE 0x0681 · PLC FAMILY

COSIGN

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.

PLC Cross-Input Non-Invertible
COSIGN Cross-input scriptPubKey hash verification THIS INPUT HASH256 commitment SHA256 match? OTHER INPUT spent_output.scriptPubKey SHA256(other.spent_output.scriptPubKey) == HASH256 → SATISFIED
FieldData TypeSizeSideDescription
script_hashHASH25632 BConditionsSHA-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.

0x0681 0 1 HASH256 · 32B Conditions = 38 bytes
0x0681 0 0 Witness = 4 bytes (empty block)
Total 42 bytes
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
ConditionResult
HASH256 field missingERROR
HASH256 field not exactly 32 bytesERROR
No transaction context (structural check)SATISFIED
No other input's spent scriptPubKey hash matchesUNSATISFIED
At least one other input's spent scriptPubKey hash matchesSATISFIED
Conditions (commit to anchor scriptPubKey hash)
{
  "type": "COSIGN",
  "inverted": false,
  "fields": [
    { "type": "HASH256", "hex": "b4c5d6e7...scriptPubKey SHA256...32 bytes" }
  ]
}

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.

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
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.
← RATE_LIMIT TIMELOCKED_SIG →