{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://know-your-human.ru/kyh-policy.schema.json",
  "title": "KYH-RU 0.1 — политика проверяющей стороны (/.well-known/kyh)",
  "type": "object",
  "required": [
    "kyh",
    "actions"
  ],
  "$defs": {
    "lvl": {
      "enum": [
        "H0",
        "H1",
        "H2",
        "H3"
      ]
    }
  },
  "properties": {
    "kyh": {
      "const": "0.1"
    },
    "providers": {
      "type": "object",
      "properties": {
        "accept": {
          "type": "array",
          "items": {
            "enum": [
              "account",
              "bank",
              "gov",
              "telecom",
              "merchant"
            ]
          }
        },
        "issuers": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "actions": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "lvl"
        ],
        "properties": {
          "lvl": {
            "$ref": "#/$defs/lvl"
          },
          "amount": {
            "type": "number",
            "minimum": 0
          },
          "currency": {
            "type": "string"
          },
          "max_age": {
            "type": "integer",
            "minimum": 60
          }
        }
      }
    },
    "status_check": {
      "$ref": "#/$defs/lvl"
    },
    "contact": {
      "type": "string"
    }
  },
  "x-license": "MIT"
}