{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MVG Falsification Receipt Candidate Specification",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "receipt_type",
    "receipt_version",
    "mode",
    "observed_verdict",
    "observed_reason_code",
    "state_digest",
    "bundle_digest",
    "dsse_digest",
    "verifier_digest",
    "policy_version",
    "replayed_at",
    "timestamp_ref",
    "transparency_ref",
    "subject_uri",
    "signature"
  ],
  "properties": {
    "receipt_type": {
      "type": "string",
      "const": "falsification_receipt"
    },
    "receipt_version": {
      "type": "string",
      "pattern": "^0\\.9\\.0-candidate$"
    },
    "mode": {
      "type": "string",
      "enum": [
        "challenge",
        "corroboration",
        "public_state"
      ]
    },
    "observed_verdict": {
      "type": "string",
      "enum": [
        "PASS",
        "HOLD",
        "FAIL",
        "PENDING"
      ]
    },
    "observed_reason_code": {
      "type": "string"
    },
    "state_digest": {
      "type": "string"
    },
    "bundle_digest": {
      "type": "string"
    },
    "dsse_digest": {
      "type": "string"
    },
    "verifier_digest": {
      "type": "string"
    },
    "policy_version": {
      "type": "string"
    },
    "replayed_at": {
      "type": "string"
    },
    "timestamp_ref": {
      "type": "string"
    },
    "transparency_ref": {
      "type": "string"
    },
    "subject_uri": {
      "type": "string"
    },
    "signature": {
      "type": "object",
      "required": [
        "type",
        "status",
        "uri"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "witness_id": {
      "type": "string"
    },
    "witness_org_display": {
      "type": "string"
    },
    "witness_org_uri": {
      "type": "string"
    },
    "canonical_verdict": {
      "type": "string",
      "enum": [
        "PASS",
        "HOLD",
        "FAIL",
        "PENDING"
      ]
    },
    "canonical_reason_code": {
      "type": "string"
    },
    "verdict_match": {
      "type": [
        "boolean",
        "string"
      ]
    },
    "quorum_status": {
      "type": "string",
      "enum": [
        "PENDING",
        "PARTIAL_MATCH",
        "MATCHED",
        "QUORUM_REACHED"
      ]
    },
    "notes": {
      "type": "string"
    }
  }
}
