{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://theloopbreaker.com/schemas/x402-v2-onchain-independent-verification.schema.json",
  "title": "Vaultfire V2 Base on-chain independent verification",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schema",
    "generatedAtUtc",
    "network",
    "chainId",
    "verificationHead",
    "requiredConfirmations",
    "asset",
    "payee",
    "transactionCount",
    "totalAmountAtomic",
    "fullyApplicationCorrelatedCount",
    "activation",
    "provenByBaseRpc",
    "notProven",
    "records"
  ],
  "properties": {
    "$schema": {
      "const": "../schemas/x402-v2-onchain-independent-verification.schema.json"
    },
    "schema": {
      "const": "vaultfire.x402.v2-onchain-independent-verification.v1"
    },
    "generatedAtUtc": {
      "type": "string",
      "format": "date-time"
    },
    "network": {
      "const": "eip155:8453"
    },
    "chainId": {
      "const": 8453
    },
    "verificationHead": {
      "type": "integer",
      "minimum": 1
    },
    "requiredConfirmations": {
      "type": "integer",
      "minimum": 1
    },
    "asset": {
      "type": "string",
      "pattern": "^0x[0-9a-f]{40}$"
    },
    "payee": {
      "type": "string",
      "pattern": "^0x[0-9a-f]{40}$"
    },
    "transactionCount": {
      "const": 19
    },
    "totalAmountAtomic": {
      "const": "370000"
    },
    "fullyApplicationCorrelatedCount": {
      "const": 0
    },
    "activation": {
      "const": "fail-closed-no-route-or-request-receipt-correlation"
    },
    "provenByBaseRpc": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "notProven": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "records": {
      "type": "array",
      "minItems": 19,
      "maxItems": 19,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "transactionHash",
          "blockNumber",
          "blockHash",
          "blockTimestamp",
          "blockTimestampUtc",
          "receiptStatus",
          "confirmationsAtVerification",
          "asset",
          "payer",
          "payee",
          "amountAtomic",
          "logIndex",
          "finalityPolicyResult"
        ],
        "properties": {
          "transactionHash": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{64}$"
          },
          "blockNumber": {
            "type": "integer",
            "minimum": 1
          },
          "blockHash": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{64}$"
          },
          "blockTimestamp": {
            "type": "integer",
            "minimum": 1
          },
          "blockTimestampUtc": {
            "type": "string",
            "format": "date-time"
          },
          "receiptStatus": {
            "const": "success"
          },
          "confirmationsAtVerification": {
            "type": "integer",
            "minimum": 64
          },
          "asset": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{40}$"
          },
          "payer": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{40}$"
          },
          "payee": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{40}$"
          },
          "amountAtomic": {
            "type": "string",
            "pattern": "^[1-9][0-9]*$"
          },
          "logIndex": {
            "type": "integer",
            "minimum": 0
          },
          "finalityPolicyResult": {
            "const": "pass"
          }
        }
      }
    }
  }
}
