{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openprint.art/schemas/issuance/v0.1.json",
  "title": "Open Print certificate issuance record",
  "description": "An append-only record that reserves one certificate ID and one sequence number within an edition.",
  "type": "object",
  "required": [
    "schemaVersion",
    "type",
    "certificateId",
    "editionId",
    "workId",
    "sequence",
    "fingerprint",
    "recordedAt"
  ],
  "properties": {
    "schemaVersion": {
      "const": "0.1"
    },
    "type": {
      "const": "issued"
    },
    "certificateId": {
      "type": "string",
      "minLength": 1
    },
    "editionId": {
      "type": "string",
      "minLength": 1
    },
    "workId": {
      "type": "string",
      "minLength": 1
    },
    "sequence": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "fingerprint": {
      "type": "string",
      "pattern": "^sha256:[a-f0-9]{64}$"
    },
    "recordedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false
}
