{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "fheif-key-access.schema.json",
  "title": "FHEIF access structure of an epoch",
  "description": "Who holds decryption capability in one key epoch and how many must take part. Its canonical form is hashed into the access hash of the epoch.",
  "type": "object",
  "properties": {
    "fheif": {
      "const": "key-access/1"
    },
    "structure": {
      "type": "string",
      "minLength": 1
    },
    "shares": {
      "type": "string",
      "minLength": 1
    },
    "threshold": {
      "type": "integer",
      "minimum": 1
    },
    "holders": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "minItems": 1
    },
    "lead": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$"
    }
  },
  "required": [
    "fheif",
    "structure",
    "threshold",
    "holders"
  ]
}
