{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/axonflow/json-schema/axonflow-record-verification-result-schema.json",
  "title": "RecordVerificationResult",
  "description": "Outcome of verifying a SINGLE decision record standalone. Republishes the\nrecomputed material so the result is independently checkable offline.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/axonflow-audit-verification-api-openapi.yml#/components/schemas/RecordVerificationResult",
  "type": "object",
  "properties": {
    "record_id": {
      "type": "string",
      "format": "uuid"
    },
    "chain_id": {
      "type": "string",
      "format": "uuid"
    },
    "org_id": {
      "type": "string"
    },
    "chain_seq": {
      "type": "integer",
      "format": "int64"
    },
    "signed": {
      "type": "boolean"
    },
    "signature_valid": {
      "type": "boolean"
    },
    "valid": {
      "type": "boolean"
    },
    "reason": {
      "type": "string",
      "description": "Explanation when the record does not verify (omitted when valid)."
    },
    "digest_preimage_b64": {
      "type": "string",
      "description": "Base64 of the exact byte string that SHA-256-hashes to\n`record_digest`. Decode, hash, and confirm it equals `record_digest`,\nthen rebuild it from the raw record fields to verify independently.\n"
    },
    "record_digest": {
      "type": "string",
      "description": "SHA-256 hex of the record pre-image."
    },
    "prev_hash": {
      "type": "string",
      "description": "Hash of the previous record in the chain."
    },
    "chain_hash": {
      "type": "string",
      "description": "sha256_hex(record_digest + \"|\" + prev_hash); the message that the\nEd25519 signature is computed over.\n"
    },
    "record_signature": {
      "type": "string",
      "description": "Base64 Ed25519 signature over `chain_hash` (omitted when unsigned)."
    },
    "signing_key_id": {
      "type": "string"
    },
    "public_key": {
      "type": "string",
      "description": "Base64 Ed25519 public key for offline re-verification."
    },
    "verified_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "record_id",
    "chain_id",
    "org_id",
    "chain_seq",
    "signed",
    "signature_valid",
    "valid",
    "digest_preimage_b64",
    "record_digest",
    "prev_hash",
    "chain_hash",
    "verified_at"
  ]
}