{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xcim.invalid/ietf/as01/schemas/manifest.schema.json",
  "title": "AS01-F01 manifest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "proposal_version",
    "object_type",
    "issuer_id",
    "log_id",
    "genesis_commitment",
    "manifest_epoch",
    "previous_manifest_commitment",
    "root_policy_epoch",
    "keys",
    "publication_profile",
    "fetch_origins",
    "iat",
    "exp"
  ],
  "properties": {
    "proposal_version": {
      "const": "as-01"
    },
    "object_type": {
      "const": "authority_manifest"
    },
    "issuer_id": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/id"
    },
    "log_id": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/id"
    },
    "genesis_commitment": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/hash"
    },
    "manifest_epoch": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/positive"
    },
    "previous_manifest_commitment": {
      "oneOf": [
        {
          "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/hash"
        },
        {
          "type": "null"
        }
      ]
    },
    "root_policy_epoch": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/positive"
    },
    "keys": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kid",
          "alg",
          "public_jwk",
          "thumbprint",
          "role",
          "valid_from",
          "valid_until",
          "status"
        ],
        "properties": {
          "kid": {
            "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/token"
          },
          "alg": {
            "const": "Ed25519"
          },
          "public_jwk": {
            "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/jwk"
          },
          "thumbprint": {
            "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/hash"
          },
          "role": {
            "enum": [
              "receipt",
              "recipient_binding",
              "authority_attestation",
              "state_checkpoint",
              "control_head"
            ]
          },
          "valid_from": {
            "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/nonnegative"
          },
          "valid_until": {
            "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/positive"
          },
          "status": {
            "enum": [
              "active",
              "retired",
              "revoked"
            ]
          }
        }
      },
      "minItems": 5,
      "maxItems": 32
    },
    "publication_profile": {
      "const": "as-01-anchored"
    },
    "fetch_origins": {
      "type": "array",
      "items": {
        "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/origin"
      },
      "minItems": 1,
      "maxItems": 8,
      "uniqueItems": true
    },
    "iat": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/nonnegative"
    },
    "exp": {
      "$ref": "https://xcim.invalid/ietf/as01/schemas/common.schema.json#/$defs/positive"
    }
  }
}
