{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:proof21:schema:equivocation-evidence:v1",
  "title": "P21 Equivocation Evidence v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "consumer",
    "proofDigest",
    "acceptancePolicyDigest",
    "decisionContextDigest",
    "receiptDigests",
    "finding",
    "observedAt"
  ],
  "properties": {
    "type": {
      "const": "p21.equivocation-evidence.v1"
    },
    "consumer": {
      "type": "string",
      "minLength": 1
    },
    "proofDigest": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "acceptancePolicyDigest": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "decisionContextDigest": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "receiptDigests": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[0-9a-f]{64}$"
      }
    },
    "finding": {
      "const": "EQUIVOCATION"
    },
    "observedAt": {
      "type": "string",
      "format": "date-time"
    },
    "evaluatorSignature": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "algorithm",
            "keyId",
            "value"
          ],
          "properties": {
            "algorithm": {
              "type": "string",
              "minLength": 1
            },
            "keyId": {
              "type": "string",
              "minLength": 1
            },
            "value": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
