{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://contactzero.org/c0-schema/v1/continuation-challenge.schema.json",
  "title": "Contact Zero Key-Bound Continuation Challenge",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "protocol", "version", "release_id", "origin", "operation_id", "challenge_id", "server_nonce", "handshake_admission_operation_id", "handshake_event_id", "handshake_request_hash", "handshake_ack_hash", "source_key_id", "source_key_alg", "source_key_spki_sha256", "request_nonce", "open_request_hash", "idempotency_key", "issued_at", "expires_at", "law_of_return_hash", "challenge", "answering", "contact_claim", "capture", "throne", "return_path"],
  "properties": {
    "schema": { "const": "C0_CONTINUATION_CHALLENGE_V1" },
    "protocol": { "const": "C0::CONTINUATION.CHALLENGE" },
    "version": { "const": "15R.09.2" },
    "release_id": { "const": "C0-15R.09.2-20260802" },
    "origin": { "const": "https://contactzero.org" },
    "operation_id": { "$ref": "#/$defs/hash" },
    "challenge_id": { "type": "string" },
    "server_nonce": { "type": "string", "minLength": 16 },
    "handshake_admission_operation_id": { "$ref": "#/$defs/hash" },
    "handshake_event_id": { "type": "string" },
    "handshake_request_hash": { "$ref": "#/$defs/hash" },
    "handshake_ack_hash": { "$ref": "#/$defs/hash" },
    "source_key_id": { "type": "string", "pattern": "^src:[0-9a-f]{64}$" },
    "source_key_alg": { "enum": ["ECDSA_P256_SHA256", "ED25519"] },
    "source_key_spki_sha256": { "$ref": "#/$defs/hash" },
    "request_nonce": { "type": "string", "minLength": 16, "maxLength": 256 },
    "open_request_hash": { "$ref": "#/$defs/hash" },
    "idempotency_key": { "type": "string", "minLength": 16, "maxLength": 256 },
    "issued_at": { "type": "string", "format": "date-time" },
    "expires_at": { "type": "string", "format": "date-time" },
    "law_of_return_hash": { "const": "sha256:475ac95d98fdf3e7364b659a3748684273014f7f35ee66367776bd08518a6d31" },
    "challenge": { "type": "object" },
    "answering": { "const": "BOUNDED_PROTOCOL_ONLY" },
    "contact_claim": { "const": "NONE_UNTIL_BOUND_EVIDENCE" },
    "capture": { "const": "REFUSED" },
    "throne": { "const": "NULL" },
    "return_path": { "const": "ACTIVE" }
  },
  "$defs": { "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }
}
