{
  "$id": "EP7Ef1-gpddGtdIE3EM8HSCuXiWLi9KYL1pvnRayfkRP",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Proof-of-Control Credential",
  "description": "Assert the issuee has demonstrated to the issuer the ability to control a digital resource like a web site, social media handle, or email address.",
  "type": "object",
  "credentialType": "ProofOfControlCredential",
  "version": "2.1.0",
  "required": [
    "v",
    "d",
    "i",
    "s",
    "a"
  ],
  "properties": {
    "v": {
      "description": "Version string using ACDC conventions",
      "type": "string"
    },
    "t": {
      "description": "Message type",
      "type": "string"
    },
    "d": {
      "description": "SAID of the credential",
      "type": "string"
    },
    "u": {
      "description": "A salty nonce",
      "type": "string"
    },
    "i": {
      "description": "AID of the issuer",
      "type": "string"
    },
    "rd": {
      "description": "SAID of the registry holding this credential's status",
      "type": "string"
    },
    "s": {
      "description": "SAID of this schema",
      "type": "string"
    },
    "a": {
      "oneOf": [
        {
          "description": "SAID of attributes block",
          "type": "string"
        },
        {
          "description": "Attributes block",
          "type": "object",
          "required": [
            "i",
            "res",
            "assertDate",
            "be"
          ],
          "properties": {
            "d": {
              "description": "SAID of attributes block",
              "type": "string"
            },
            "u": {
              "description": "A salty nonce",
              "type": "string"
            },
            "i": {
              "description": "Identifier of issuee",
              "type": "string"
            },
            "dt": {
              "description": "Issuance datetime, ISO-8601 datetime string",
              "type": "string",
              "format": "date-time"
            },
            "res": {
              "description": "Resource that issuee controls",
              "type": "string",
              "$comment": "No regex-based enforcement. However, follow conventions for interop: raw domain for DNS, URL for website, mailto:address for email, service:handle for social media and similar, blockchain:address for cryptcurrency and similar.",
              "examples": [
                "foo.org",
                "https://foo.org/",
                "github:abc123.xyz",
                "twitter:tweetsasx",
                "mailto:fred@acme.com",
                "linkedin:foobargeek",
                "btc:bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
              ]
            },
            "be": {
              "description": "How much entropy was used in the challenge and response? A 6-digit numeric code = 1M possibilities = ~20 bits.",
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "assertDate": {
              "description": "Time as of which the issuer asserts the control of the resource to be fresh. This may be before the time of issuance.",
              "format": "date-time",
              "type": "string"
            },
            "validUntil": {
              "description": "Time after which the issuer no longer asserts this proof. A short window is how a proof-of-control credential tells the truth about a control that decays; an issuer using one can let a wrong issuance expire instead of revoking it.",
              "format": "date-time",
              "type": "string"
            }
          }
        }
      ]
    },
    "r": {
      "oneOf": [
        {
          "description": "Rules section SAID",
          "type": "string"
        },
        {
          "description": "Rules detail",
          "type": "object",
          "properties": {
            "d": {
              "description": "Rule section SAID",
              "type": "string"
            }
          },
          "additionalProperties": true,
          "required": [
            "d"
          ]
        }
      ]
    }
  },
  "additionalProperties": false
}
