{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openprint.art/schemas/archive/v1.0.json",
  "title": "Open Print 1.0 issuer archive",
  "description": "A portable, integrity-checked collection of public Open Print records.",
  "type": "object",
  "required": [
    "schema",
    "schemaVersion",
    "createdAt",
    "issuers",
    "certificates",
    "registry",
    "checkpoints",
    "integrity"
  ],
  "properties": {
    "schema": {
      "const": "https://openprint.art/schemas/archive/v1.0.json"
    },
    "schemaVersion": {
      "const": "1.0"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "issuers": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "certificates": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "registry": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "checkpoints": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "integrity": {
      "type": "object",
      "required": [
        "algorithm",
        "canonicalization",
        "digest",
        "scope"
      ],
      "properties": {
        "algorithm": {
          "const": "SHA-256"
        },
        "canonicalization": {
          "const": "open-print-c14n-1"
        },
        "digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "scope": {
          "const": "archive contents"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
