{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "body",
    "proof"
  ],
  "properties": {
    "body": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "subject",
        "holder",
        "grade",
        "revision",
        "issuedAt"
      ],
      "properties": {
        "type": {
          "const": "grade-declaration@1"
        },
        "subject": {
          "type": "string",
          "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"
        },
        "holder": {
          "type": "string",
          "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"
        },
        "grade": {
          "enum": [
            "count",
            "blinded"
          ]
        },
        "revision": {
          "type": "string",
          "pattern": "^[1-9][0-9]{0,17}$"
        },
        "issuedAt": {
          "type": "string",
          "pattern": "^[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|02-(0[1-9]|[12][0-9]))T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]{1,3})?Z$"
        }
      }
    },
    "proof": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mac"
      ],
      "properties": {
        "mac": {
          "type": "string",
          "pattern": "^u[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
        }
      }
    }
  },
  "title": "RLTP grade-declaration@1 (rltp-visibility@0.29)"
}
