{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://custodyproviders.com/data/provider-schema.json",
  "title": "CustodyProviders.com Provider Record",
  "description": "Canonical structured provider record. Empty arrays and null values mean the field is not yet documented; they must not be interpreted as a negative claim.",
  "type": "object",
  "required": ["schema_version", "name", "slug", "category", "region", "profile_url", "verification", "research", "regulation", "services", "custody", "security", "asset_protection", "institutional_fit", "assets", "blockchains", "geographies", "commercial"],
  "properties": {
    "schema_version": {"const": "1.0"},
    "name": {"type": "string", "minLength": 1},
    "slug": {"type": "string", "pattern": "^[a-z0-9-]+$"},
    "category": {"type": "string", "minLength": 1},
    "region": {"type": "string", "minLength": 1},
    "status": {"type": "string"},
    "profile_url": {"type": "string", "pattern": "^[^/].*\\.html$"},
    "verification": {
      "type": "object",
      "required": ["status", "method", "last_checked", "note"],
      "properties": {
        "status": {"enum": ["unverified", "claimed", "verified"]},
        "method": {"type": "string"},
        "last_checked": {"type": ["string", "null"]},
        "note": {"type": "string"}
      }
    },
    "research": {
      "type": "object",
      "required": ["status", "last_reviewed", "evidence_dimensions", "caveat", "sources"],
      "properties": {
        "status": {"enum": ["not_reviewed", "evidence_reviewed"]},
        "last_reviewed": {"type": ["string", "null"]},
        "evidence_dimensions": {"type": "integer", "minimum": 0},
        "caveat": {"type": ["string", "null"]},
        "sources": {"type": "array"}
      }
    },
    "regulation": {"type": "object"},
    "services": {"type": "object"},
    "custody": {"type": "object"},
    "security": {"type": "object"},
    "asset_protection": {"type": "object"},
    "institutional_fit": {"type": "object"},
    "assets": {"type": "array"},
    "blockchains": {"type": "array"},
    "geographies": {"type": "array"},
    "commercial": {"type": "object"}
  },
  "additionalProperties": true
}
