{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://capp.local/schemas/capp.solana-witness.receipt.v2.schema.json",
  "title": "capp.solana-witness.receipt.v2",
  "type": "object",
  "required": [
    "protocol",
    "operationId",
    "attemptId",
    "receiptDigest",
    "evidenceDigests",
    "observation",
    "observedState",
    "simulated"
  ],
  "properties": {
    "protocol": {
      "const": "capp.solana-witness.receipt.v2"
    },
    "operationId": {
      "type": "string"
    },
    "attemptId": {
      "type": "string"
    },
    "messageDigest": {
      "type": "string",
      "pattern": "^([a-f0-9]{64})?$"
    },
    "transactionDigest": {
      "type": "string"
    },
    "network": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "simulated": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "number"
    },
    "updatedAt": {
      "type": "number"
    },
    "receiptDigest": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "evidenceDigests": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      }
    },
    "observation": {
      "type": "object"
    },
    "finality": {
      "type": "string"
    },
    "observedState": {
      "type": "string"
    },
    "commitment": {
      "enum": [
        "processed",
        "confirmed",
        "finalized"
      ]
    },
    "commitmentMet": {
      "type": "boolean"
    }
  },
  "additionalProperties": true
}
