Server-side ed25519 receipt verifier
emem_verify_receiptVerify a signed receipt envelope server-side by recomputing the canonical preimage and checking the ed25519 signature. Use when in-browser verification is blocked or for server-side audit.
Instructions
Verify a signed receipt envelope server-side: recomputes the canonical preimage (preimage v1: tagged, length-prefixed segments; receipts without preimage_version verify under the legacy request_id | served_at | primitive | cells, | fact_cids, concatenation), runs ed25519 over the embedded pubkey + signature, and returns {valid, reason, pubkey_b32}. Use when the in-browser /verify path is blocked (CDN offline, agent runtime has no crypto) or when you want a server-side audit of a third-party receipt. Algebra: verify.
When to use: Pass a receipt object exactly as returned by any read primitive (signature can be byte[] or sig_b32; pubkey can be byte[] or responder_pubkey_b32 — the verifier tolerates both shapes). Optionally override pubkey_b32 to assert verification against a specific signer. Returns 200 with valid: false when the signature fails — never 4xx for a structurally-well-formed bad signature.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| receipt | Yes | The signed receipt envelope (as returned by any read primitive). Must carry primitive/served_at/request_id/cells/fact_cids and either `signature` byte[] + `responder_pubkey` byte[] or their b32 string forms. | |
| pubkey_b32 | No | Optional explicit responder pubkey (base32). When omitted, uses the receipt's embedded pubkey/responder fields. |