{
  "$id": "EBxJHMk6MOEUogB6A1rP5x9te7DscPfxFfUGJCkq1Lq5",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Award Credential",
  "description": "Confer an award on a staff member or other associated person or group.",
  "type": "object",
  "credentialType": "AwardCredential",
  "version": "1.0.0",
  "required": [
    "v",
    "d",
    "i",
    "ri",
    "s",
    "a"
  ],
  "properties": {
    "v": {
      "description": "Version string using ACDC conventions",
      "type": "string"
    },
    "d": {
      "description": "SAID of the credential",
      "type": "string"
    },
    "u": {
      "description": "A salty nonce",
      "type": "string"
    },
    "i": {
      "description": "AID of the issuer(the one giving the award)",
      "type": "string"
    },
    "ri": {
      "description": "Registry for issuer's credential status",
      "type": "string"
    },
    "s": {
      "description": "SAID of this schema",
      "type": "string"
    },
    "a": {
      "oneOf": [
        {
          "description": "SAID of attributes block",
          "type": "string"
        },
        {
          "$id": "EG-B0gHQdMUgacWfHmqLWE4ztyMP4qbRY_W0shDy5vTP",
          "description": "Attributes block",
          "type": "object",
          "required": [
            "d",
            "i",
            "dt",
            "effective_dt",
            "award_name"
          ],
          "properties": {
            "d": {
              "description": "Attributes block SAID",
              "type": "string"
            },
            "u": {
              "description": "A salty nonce",
              "type": "string"
            },
            "i": {
              "description": "AID of issuee (award recipient)",
              "type": "string"
            },
            "dt": {
              "description": "Issuance datetime, ISO-8601 datetime string",
              "type": "string",
              "format": "date-time"
            },
            "effective_dt": {
              "description": "Time at which the award becomes public. This may be before or after the time of issuance.",
              "type": "string",
              "format": "date-time"
            },
            "issuer_name": {
              "description": "Self-asserted name of the issuer. This field exists for convenience, and may be empty. It should only be trusted if it can be tied to some formal proof of the issuer's identity.",
              "type": "string"
            },
            "award_name": {
              "description": "Name of the award.",
              "type": "string"
            },
            "category": {
              "description": "A string that identifies a formal category for the award. For example, a Nobel prize could have a category of 'physics' or 'economics'. May be empty.",
              "type": "string"
            },
            "timeframe": {
              "description": "A string that defines a timeframe for the award. For example, an employee-of-the-month award could have a timeframe of 'July 2026'. May be empty.",
              "type": "string"
            },
            "details": {
              "oneOf": [
                {
                  "description": "SAID of details block",
                  "type": "string"
                },
                {
                  "$id": "ELDXjQ-FnKApK1DJhzmtKDcnfoJ9qusQr1Qz5g9MFt0o",
                  "description": "details block",
                  "type": "object",
                  "required": [
                    "d"
                  ],
                  "properties": {
                    "d": {
                      "description": "details block SAID",
                      "type": "string"
                    },
                    "u": {
                      "description": "A salty nonce",
                      "type": "string"
                    },
                    "issuee_name": {
                      "description": "Name of the issuee, as asserted by issuer. This field exists for convenience, and may be empty. It should only be trusted if it can be tied to some formal proof of the issuee's identity.",
                      "type": "string"
                    },
                    "citation": {
                      "description": "Formal praise that's designed to be displayed and quoted. For example, an award documenting a world record might say, 'For running the 2024 Olympic Marathon in Paris in 2:01:03'. A lifetime achievement award might say, 'In recognition of many years of dedicated service doing X, Y, and Z'. May be empty.",
                      "type": "string"
                    },
                    "image": {
                      "description": "A data URL (RFC 2397), an ordinary URL, or the SAID/hash of an image that should accompany this award. Ordinary URLs represent a commitment by the issuer to a location where an image will be published, but not to a specific image content. This may or may not satisfy a verifier's need to trust an image.",
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              ]
            }
          },
          "additionalProperties": true
        }
      ]
    },
    "e": {
      "oneOf": [
        {
          "description": "Edges block SAID",
          "type": "string"
        },
        {
          "$id": "EKk5ejftEjNwjRhw2lYQAwKwvRWapqCNEOx3gUR7WW7n",
          "description": "Edges detail",
          "type": "object",
          "required": [
            "d",
            "issuer"
          ],
          "properties": {
            "d": {
              "description": "Edges block SAID",
              "type": "string"
            },
            "issuer": {
              "description": "Edge credential that proves the identity of the issuer.",
              "type": "object",
              "properties": {
                "n": {
                  "description": "SAID of a credential that proves the identity of the issuer",
                  "type": "string"
                },
                "s": {
                  "description": "SAID of credential schema that proves the identity of the issuer",
                  "type": "string"
                },
                "o": {
                  "description": "Operator indicating issuer AID of this ACDC MUST be the Issuee AID of the node this Edge points to.",
                  "type": "string",
                  "const": "I2I"
                }
              },
              "additionalProperties": false,
              "required": [
                "n",
                "s",
                "o"
              ]
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "r": {
      "oneOf": [
        {
          "description": "Rules section SAID",
          "type": "string"
        },
        {
          "$id": "EGFgHT7Xrzy9YLdQNXnNTYVBu9_Q0O7K5A2VCWjg93t3",
          "description": "Rules detail",
          "type": "object",
          "properties": {
            "d": {
              "description": "Rule section SAID",
              "type": "string"
            }
          },
          "additionalProperties": true,
          "required": [
            "d"
          ]
        }
      ]
    }
  },
  "additionalProperties": false
}