{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://travel.agenthaven.dev/contracts/schemas/checkpoint.schema.json",
  "title": "Chain checkpoint (payload of a checkpoint+jwt)",
  "description": "The head of a ledger at a height and a time, signed by the instance that keeps it (kid = the instance key thumbprint) and sealed at a witness that is neither endpoint. Sealing at the end of every transaction and on a timer; published at GET /checkpoints beside the receipt the witness returned, or beside the error when it did not. A verifier compares each head with the chain it fetched at that height and each receipt with the witness's own log; two checkpoints for one height with different heads is equivocation (R-28). Status: IMPLEMENTED by the seller (since 2026-09-07) and the buyer (since 2026-09-11); the witness is the emulator the verifier operates at https://provedby.dev/witness, declared as such, until a transparency service replaces it after the freeze. The authority seals its own chain the same way since 2026-09-12 (agent-authority: after every issuance, denial and revocation, and on a timer), signing with its issuing key, whose kid is the thumbprint the witness resolves from the authority's jwks.json. Since 2026-09-13 the head may also be registered at a public transparency log the keeper does not operate, a second receipt beside the emulator's (external-witness.md).",
  "type": "object",
  "required": ["iss", "signer", "height", "head", "at"],
  "properties": {
    "iss": { "type": "string", "format": "uri", "description": "The ledger's public base URL." },
    "signer": { "type": "string", "pattern": "^spiffe://" },
    "height": { "type": "integer", "minimum": 1, "description": "Number of entries in the chain at this checkpoint." },
    "head": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
    "at": { "type": "string", "format": "date-time" },
    "previous_checkpoint": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$", "description": "The head of the previous checkpoint, so checkpoints chain too." }
  }
}
