{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "urn:autonym:authorization-details:contribute"
    },
    "contribute": {
      "minItems": 1,
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "keys": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          }
        },
        "required": [
          "domain",
          "keys"
        ],
        "additionalProperties": false
      }
    },
    "max_events": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "allow_confirmation": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "contribute",
    "max_events",
    "allow_confirmation"
  ],
  "additionalProperties": false,
  "description": "The RFC 9396 authorization_details entry that requests a contribution grant (A6.2). Domains are unique, and so are the keys of each domain."
}
