TYPE 0x0901 · LEGACY FAMILY
P2PK_LEGACY
Legacy P2PK (pay-to-public-key) wrapped as a typed Ladder Script block. Same evaluation as SIG — Merkle leaf pubkey verified, then signature check. Closes arbitrary data surfaces.
Legacy Non-InvertibleLadder Diagram
Fields
| Field | Data Type | Size | Side | Description |
|---|---|---|---|---|
| scheme | SCHEME | 1 B | Conditions | Signature scheme identifier (optional, 0x00 = Schnorr default) |
| pubkey | PUBKEY | 32-33 B | Witness | Public key (x-only 32B or compressed 33B) |
| signature | SIGNATURE | 64-65 B | Witness | Signature over the transaction sighash |
Public key folded into Merkle leaf via merkle_pub_key (PubkeyCountForBlock = 1). No key field in conditions.
Wire Format Breakdown
Conditions side (committed in the rung leaf):
0x0901
0
1
SCHEME · 1B
≈ 7 bytes
Witness side (in input witness):
0x0901
0
2
PUBKEY · 33B
SIGNATURE · 64B
= 105 bytes
Total (conditions + witness)
144 bytes
With rung overhead included. Compressed pubkey (33B) case.
Evaluation Logic
1.
Locate the witness PUBKEY and SIGNATURE; either missing → ERROR. Pubkey identity is bound at MLSC-proof level via merkle_pub_key — no leaf check here.
2.
Read the optional conditions SCHEME (default Schnorr).
3.
Dispatch VerifySigWithScheme(pubkey, sig, scheme, ...). Sig size checks fire here per the resolved scheme. Note: the legacy wrappers route through the Ladder
LadderSigChecker, NOT Core's BaseSignatureChecker — handing a Schnorr sig to Core's checker would crash the process via three Taproot-only assertions in CheckSchnorrSignature (regression fix `83f3a99a25`).
4.
The
VerifySigWithScheme result is the block result — SATISFIED on valid sig, UNSATISFIED on verification failure, ERROR on malformed inputs.
Return Values
| Condition | Result |
|---|---|
| Missing PUBKEY or SIGNATURE | ERROR |
| Merkle leaf verification fails | UNSATISFIED |
| Signature fails | UNSATISFIED |
| Signature valid | SATISFIED |
JSON Wire Format
Conditions (committed in the rung leaf)
{
"type": "P2PK_LEGACY",
"inverted": false,
"fields": [
{ "type": "SCHEME", "hex": "01" }
]
}Witness (input)
{
"type": "P2PK_LEGACY",
"inverted": false,
"fields": [
{ "type": "PUBKEY", "hex": "02abc1...33 bytes" },
{ "type": "SIGNATURE", "hex": "e5f6a7...64 bytes" }
]
}Notes
- Delegates to EvalSigBlock internally. All signature schemes supported via SCHEME field.
- Public key is folded into the Merkle leaf via merkle_pub_key. The user supplies PUBKEY and the node incorporates it into the leaf hash automatically.
- Wraps legacy P2PK semantics — no new data surfaces.
- All signature schemes (Schnorr, ECDSA, PQ) supported via the SCHEME routing field.
- Closes the arbitrary data surface present in raw P2PK outputs.
Use Cases
Legacy P2PK Migration
Wrap existing P2PK outputs in typed Ladder blocks. Same spending semantics with anti-spam protection.
Composable Key Spending
Combine with timelocks, hash locks, or covenants on other rungs. Legacy key-spending with full Ladder Script composability.