{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openprint.art/schemas/certificate/v0.1.json",
  "title": "Open Print certificate record",
  "description": "A legacy integrity-only certificate. It has no issuer signature and does not prove identity, authorship, copyright, possession, or legal ownership.",
  "type": "object",
  "required": [
    "schemaVersion",
    "id",
    "editionId",
    "workId",
    "artworkTitle",
    "collector",
    "issuer",
    "issuedAt",
    "sequence",
    "license",
    "source",
    "integrity",
    "notice"
  ],
  "properties": {
    "schemaVersion": {
      "const": "0.1"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "A globally unique issuance identifier. It cannot be reused."
    },
    "editionId": {
      "type": "string"
    },
    "workId": {
      "type": "string"
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time"
    },
    "sequence": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991,
      "description": "A unique sequence number within this edition."
    },
    "integrity": {
      "type": "object",
      "required": [
        "algorithm",
        "digest",
        "scope"
      ],
      "properties": {
        "algorithm": {
          "const": "SHA-256"
        },
        "digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "scope": {
          "const": "certificate payload"
        }
      }
    }
  },
  "additionalProperties": true
}
