# CanonicalHash Receipt — EIP-712 Signed JSON Action Receipt

> CanonicalHash Receipt — EIP-712 Signed JSON Action Receipt is a paid API for AI agents from canonicalhash-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Creates a deterministic, EIP-712 signed receipt for any JSON action object, producing a canonical hash and cryptographic attestation for audit and provenance purposes.

## Facts

- Endpoint: POST https://canonicalhash-production.up.railway.app/v1/receipt?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/canonicalhash-receipt-eip-712-signed-json-action-receipt-ff1e29ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C3EdrlkN4iMZio6wEH1tZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability canonicalhash-receipt-eip-712-signed-json-action-receipt-ff1e29ba -d '<json body>'
```

Example prompt: Create a signed receipt for this action — {"type": "llm.completion", "model": "gpt-4o", "tokens": 512} — and give me the canonical hash and EIP-712 signature so I can store it as proof it happened.

## When to prefer this

Choose this endpoint when you need a lightweight, per-action cryptographic receipt — a single JSON event hashed, timestamped, and EIP-712 signed for $0.001 USDC. Prefer it over /v1/canonicalize when your goal is audit provenance and a unique receipt_id rather than pure hash computation, and over /v1/canonicalize/batch when you have a single action to stamp in real time rather than a bulk job.

## Known failure modes

- Malformed or non-serializable action object returns 400 Bad Request
- Invalid occurred_at (non-integer or future date beyond tolerance) returns 422
- Payment not included or insufficient USDC returns 402 Payment Required
- Signer service unavailable causes 503 with no attestation produced
- Oversized action payload may be rejected with 413

## How this service works

Deterministic JSON hashing and structured extraction for AI agents. Three paid routes: /v1/canonicalize (RFC 8785 canonicalization + SHA-256/512 + EIP-712 attestation, $0.002), /v1/canonicalize/batch (up to 1000 payloads, $0.01), /v1/structure/paid (structured JSON extraction from messy text, $0.005). Every successful response includes an EIP-712 signed attestation verifiable against /.well-known/pubkey.json. Verify any attestation for free at POST /v1/verify.

## Output

Returns a JSON object containing: the RFC 8785 canonical string of the input, a SHA-256 hash of that canonical form (receipt_hash), a unique receipt_id, an EIP-712 signature from the known signer address, timestamps (issued_at, occurred_at) in both ISO and Unix formats, and a verify_at URL for independent verification — all confirming the action was hashed and signed at a specific moment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "action": {
   "description": "Any JSON object describing the action."
  },
  "occurred_at": {
   "type": "integer",
   "description": "Unix seconds. Optional. Defaults to server time."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "spec": "RFC 8785",
  "scheme": "EIP-712",
  "signer": "0x0326f9783c9C9b9De8b9dC63cCCefDC75A95C7cD",
  "success": true,
  "algorithm": "sha256",
  "canonical": "{\"action\":{\"type\":\"llm.completion\"},\"occurred_at\":1792185673}",
  "issued_at": "2026-10-17T00:00:01.000Z",
  "signature": "0x7a1c...truncated",
  "verify_at": "https://canonicalhash-production.up.railway.app/v1/verify",
  "receipt_id": "rc_a4f2c8b1e3d9f0a1b2c3d4e5",
  "occurred_at": "2026-10-17T00:00:00.000Z",
  "receipt_hash": "a4f2c8b1e3d9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b",
  "issued_at_unix": 1792185674,
  "occurred_at_unix": 1792185673
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/canonicalhash-receipt-eip-712-signed-json-action-receipt-ff1e29ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from canonicalhash-production.up.railway.app](https://www.zero.xyz/host/canonicalhash-production.up.railway.app/llms.txt)
