{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whitemagic-dev/json-schema/whitemagic-dev-verification-receipt-schema.json",
  "title": "VerificationReceipt",
  "description": "A signed record of a verification run: the full result (verdict, errors, reasons, summary) with offline-checkable consistency.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whitemagic-dev-openapi.json#/components/schemas/VerificationReceipt",
  "type": "object",
  "required": [
    "kind",
    "version",
    "bundle_digest",
    "verdict",
    "error_codes",
    "errors",
    "provisional_reasons",
    "insufficient_reasons",
    "summary",
    "verified_at",
    "issuer",
    "sig"
  ],
  "properties": {
    "kind": {
      "const": "continuity-receipt-verification"
    },
    "version": {
      "const": 1
    },
    "bundle_digest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "verdict": {
      "enum": [
        "TRUSTED",
        "PROVISIONAL",
        "INSUFFICIENT_EVIDENCE",
        "UNTRUSTED"
      ]
    },
    "error_codes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "receipt_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "provisional_reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "insufficient_reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "summary": {
      "type": "object"
    },
    "verified_at": {
      "type": "string"
    },
    "verifier": {
      "type": "object"
    },
    "issuer": {
      "type": "string"
    },
    "sig": {
      "type": "object",
      "required": [
        "alg",
        "key",
        "value"
      ]
    }
  }
}