Block Reference
HASH_SIG
Compound Family
TYPE 0x0703 · COMPOUND FAMILY

HASH_SIG

Hash preimage verification combined with signature check in a single block. Collapses a hash + SIG two-block pattern, saving 8 bytes on wire.

Compound Non-Invertible
HASH_SIG HASH CHECK + SIG VERIFY Preimage hash must match AND signature must verify
FieldData TypeSizeSideDescription
hashHASH25632 BConditionsSHA-256 hash the preimage must match. Node-computed — the user provides PREIMAGE and the node computes this field automatically. Raw hash input is rejected.
schemeSCHEME1 BConditionsSignature scheme identifier (0x01 = Schnorr, 0x02 = ECDSA). Routes to post-quantum verifier when PQ scheme set.
pubkeyPUBKEY32-33 BWitnessPublic key matching the commitment
signatureSIGNATURE64-65 BWitnessSchnorr signature over the transaction
preimagePREIMAGE32 BWitnessData whose SHA-256 equals the hash field — provided by the user. The node derives HASH256 from this data at creation time.

Public key folded into Merkle leaf via merkle_pub_key (PubkeyCountForBlock = 1). No key field in conditions.

0x0703 0 3 HASH256 · 32B SCHEME · 1B Conditions = 73 bytes
0x0703 0 3 PUBKEY · 32B SIGNATURE · 64B PREIMAGE · 32B Witness = 138 bytes
Total 213 bytes (saves 8B vs separate blocks)
1.Compute SHA256(PREIMAGE). If != HASH256UNSATISFIED
2.Verify witness PUBKEY against Merkle leaf (merkle_pub_key). If mismatch → UNSATISFIED
3.Verify SIGNATURE against PUBKEY. If invalid → UNSATISFIED
4.Both passed → SATISFIED
Conditions
{
  "type": "HASH_SIG",
  "fields": [
    { "type": "PUBKEY", "hex": "02abc1...33 bytes" },
    { "type": "HASH256", "hex": "e3b0c442...32 bytes" },
    { "type": "SCHEME", "hex": "01" }
  ]
}
Witness
{
  "type": "HASH_SIG",
  "fields": [
    { "type": "PUBKEY", "hex": "02abc1...33 bytes" },
    { "type": "SIGNATURE", "hex": "30440...64 bytes" },
    { "type": "PREIMAGE", "hex": "deadbeef...32 bytes" }
  ]
}
Atomic Swap Claim Path
Counterparty reveals the hash preimage and signs in a single step. No timelock needed — the timeout path uses a separate TIMELOCKED_SIG rung.
Secret-Gated Signing
Require both knowledge of a secret (preimage) and possession of a private key. Neither alone is sufficient — dual-factor spending authorization.
← HTLC PTLC →