TYPE 0x0661 · PLC FAMILY
ONE_SHOT
One-shot trigger. SATISFIED when the state is armed (state == 0). Once fired (state != 0), permanently becomes UNSATISFIED. Commits to a HASH256 for binding the trigger to a specific action. No Tapscript equivalent exists.
PLC InvertibleLadder Diagram
Fields
| Field | Data Type | Size | Side | Description |
|---|---|---|---|---|
| state | NUMERIC | 1-4 B | Conditions | Trigger state: 0 = armed (can fire), nonzero = fired (permanently used) |
| commitment | HASH256 | 32 B | Conditions | Commitment hash binding the trigger to a specific action or context. Must equal SHA256(witness PREIMAGE) at spend time (hash binding via VerifyHashPreimageBinding). |
| preimage | PREIMAGE | var | Witness | Preimage whose SHA-256 must equal commitment. Required at spend time. |
Wire Format Breakdown
0x0661
0
2
NUMERIC · 3B
HASH256 · 32B
Conditions = 43 bytes
0x0661
0
1
PREIMAGE · var
Witness ≈ 4 + 1 + len bytes
Total
≈ 48 + len bytes
Evaluation Logic
1.Locate the conditions NUMERIC (
state). Missing → ERROR2.HasRequiredHashes(block, 1): at least one HASH256 (
commitment) must be present; else → ERROR3.VerifyHashPreimageBinding(block): pair the conditions HASH256 with a witness PREIMAGE; require
SHA256(preimage) == commitment. Missing PREIMAGE, undersized HASH256, or mismatch → UNSATISFIED4.ReadNumeric the state; undecodable → ERROR
5.If
state == 0 → SATISFIED (trigger is armed, can fire); else (any nonzero) → UNSATISFIED (trigger already fired)Return Values
| Condition | Result |
|---|---|
| Missing NUMERIC, missing HASH256, or NUMERIC undecodable | ERROR |
| Witness has no PREIMAGE, or hash binding fails | UNSATISFIED |
state != 0 (already fired) | UNSATISFIED |
state == 0 with valid hash binding | SATISFIED |
JSON Wire Format
Conditions (armed, with commitment)
{
"type": "ONE_SHOT",
"inverted": false,
"fields": [
{ "type": "NUMERIC", "value": 0 },
{ "type": "HASH256", "hex": "a1b2c3d4...commitment hash...32 bytes" }
]
}This creates an armed one-shot trigger. Once the state transitions to any nonzero value in the covenant chain, the trigger permanently disables.
Worked Example
commitment=0xabcd...1234
state=0: armed → SATISFIED (can fire)
state=1: fired → UNSATISFIED (permanently used)
state=255: fired → UNSATISFIED (any nonzero = fired)
No NUMERIC field: → ERROR
Use Cases
Single-Use Authorizations
Grant a one-time spending permission that permanently expires after use. The covenant output carries the trigger state, ensuring the authorization cannot be replayed in subsequent spends.
One-Time Unlocks
Create a covenant path that can only be taken once. Combined with other blocks, enables single-use emergency overrides, one-time key rotations, or irrevocable state transitions.
Non-Repeatable Actions
Enforce that a specific action (bound by the HASH256 commitment) can only occur once in a covenant chain. Prevents double-spending of vouchers, duplicate claim attempts, or repeated initialization.