{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blackwalltier-com/json-schema/blackwalltier-com-receipt-schema.json",
  "title": "Receipt",
  "description": "Cryptographic decision receipt — an Ed25519 signature over canonical\nhashes of the request + response of a single forecast call. Anyone\nwith the published public key (see /.well-known/blackwall-signing-keys.json)\ncan verify offline without contacting Black_Wall.\n\nWe sign and store HASHES ONLY — the raw request/response bodies are\nnever persisted on our side. To verify later, you (or your auditor)\nprovide the bodies and we re-hash to check against the signed envelope.\n",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackwalltier-com-openapi.yaml#/components/schemas/Receipt",
  "type": "object",
  "required": [
    "id",
    "forecast_id",
    "issued_at",
    "algorithm",
    "key_id",
    "request_hash",
    "response_hash",
    "signature"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Receipt's own UUID (distinct from forecast_id)."
    },
    "forecast_id": {
      "type": "string",
      "description": "The forecast this receipt vouches for."
    },
    "issued_at": {
      "type": "string",
      "format": "date-time"
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "ed25519"
      ]
    },
    "key_id": {
      "type": "string",
      "description": "Which signing key was used. Look it up in\n/.well-known/blackwall-signing-keys.json. Receipts issued before\na key rotation continue to verify against the retired key.\n"
    },
    "request_hash": {
      "type": "string",
      "description": "SHA-256 (hex) of canonical(request_body), prefixed `sha256:`."
    },
    "response_hash": {
      "type": "string",
      "description": "SHA-256 (hex) of canonical(response_body without receipt), prefixed `sha256:`."
    },
    "signature": {
      "type": "string",
      "description": "Base64url Ed25519 signature over the canonicalized envelope (minus signature)."
    },
    "verify_url": {
      "type": "string",
      "format": "uri",
      "description": "Convenience URL for POST verification."
    }
  }
}