{
  "lexicon": 1,
  "id": "tools.ozone.verification.grantVerifications",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["verifications"],
          "properties": {
            "verifications": {
              "type": "array",
              "description": "Array of verification requests to process",
              "maxLength": 100,
              "items": {
                "type": "ref",
                "ref": "#verificationInput"
              }
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["verifications", "failedVerifications"],
          "properties": {
            "verifications": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "tools.ozone.verification.defs#verificationView"
              }
            },
            "failedVerifications": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "#grantError"
              }
            }
          }
        }
      }
    },
    "verificationInput": {
      "type": "object",
      "required": ["subject", "handle", "displayName"],
      "properties": {
        "subject": {
          "type": "string",
          "description": "The did of the subject being verified",
          "format": "did"
        },
        "handle": {
          "type": "string",
          "description": "Handle of the subject the verification applies to at the moment of verifying.",
          "format": "handle"
        },
        "displayName": {
          "type": "string",
          "description": "Display name of the subject the verification applies to at the moment of verifying."
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp for verification record. Defaults to current time when not specified."
        }
      }
    },
    "grantError": {
      "type": "object",
      "description": "Error object for failed verifications.",
      "required": ["error", "subject"],
      "properties": {
        "error": {
          "type": "string",
          "description": "Error message describing the reason for failure."
        },
        "subject": {
          "type": "string",
          "description": "The did of the subject being verified",
          "format": "did"
        }
      }
    }
  }
}
