{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://getzero.dev/contracts/zero.public_operators.v1.schema.json",
  "title": "ZERO Public Operators Index",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "kind", "count", "operators"],
  "properties": {
    "schema_version": { "const": "zero.public_operators.v1" },
    "kind": { "const": "operator_profile_index" },
    "count": { "type": "integer", "minimum": 0 },
    "operators": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "handle",
          "display_name",
          "tier",
          "canonical_url",
          "public_operator_url",
          "raw_evidence_url",
          "score_label",
          "mode",
          "runtime_state",
          "venue",
          "custody_model",
          "signing_boundary",
          "signed_receipts",
          "total_receipts",
          "private_keys_stored",
          "evidence_schema"
        ],
        "properties": {
          "handle": { "type": "string", "minLength": 1 },
          "display_name": { "type": "string", "minLength": 1 },
          "tier": { "type": "string", "minLength": 1 },
          "canonical_url": { "type": "string", "format": "uri" },
          "public_operator_url": { "type": "string", "format": "uri" },
          "raw_evidence_url": { "type": "string", "format": "uri" },
          "score_label": { "type": "string", "minLength": 1 },
          "mode": { "enum": ["paper", "live"] },
          "runtime_state": { "type": "string", "minLength": 1 },
          "venue": { "type": "string", "minLength": 1 },
          "custody_model": { "const": "self-custodial" },
          "signing_boundary": { "type": "string", "minLength": 1 },
          "signed_receipts": { "type": "integer", "minimum": 0 },
          "total_receipts": { "type": "integer", "minimum": 0 },
          "private_keys_stored": { "type": "boolean" },
          "evidence_schema": { "const": "zero.public_operator.v1" }
        }
      }
    }
  }
}
