verify_receipt
Verify the Ed25519 signature on a TrustBench receipt. Two modes: (1) Lookup mode — pass receipt_id and the server fetches the receipt from trustbench.io and re-runs verification (handy when you only have an ID). (2) Offline mode — pass receipt_json (the full {receipt, signature} envelope an agent received from a third party) and the server verifies the Ed25519 signature against the published public key at trustbench.io/.well-known/trustbench-pubkey without trusting the database. Exactly one of receipt_id or receipt_json must be provided. Output: returns JSON with receipt_id, signature_valid (boolean), on_chain_verified (boolean, where present), signature_alg ("ed25519"), verify_url, pubkey_url. For non-server-mediated verification with no network round-trip, use the @trustbench/verify-receipt npm package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| receipt_id | No | Lookup mode: the receipt ID to fetch and verify. Mutually exclusive with receipt_json. | |
| receipt_json | No | Offline mode: a full signed-receipt envelope {receipt, signature} (or a Phase 3 SignedReceipt). Verified against the published Ed25519 public key without database lookup. Mutually exclusive with receipt_id. |