{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program": {
      "type": "string"
    },
    "chain": {
      "type": "string"
    },
    "mint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "since": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "at": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": ["slot"]
        },
        "number": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]*)$"
        }
      },
      "required": ["kind", "number"]
    },
    "complete": {
      "type": "boolean"
    },
    "transactions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "wallet": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "slot": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$"
          },
          "timestamp": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "signer": {
            "default": false,
            "type": "boolean"
          },
          "programs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "balanceChanges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mint": {
                  "type": "string"
                },
                "delta": {
                  "type": "string",
                  "pattern": "^(0|-?[1-9][0-9]*)$"
                }
              },
              "required": ["mint", "delta"]
            }
          },
          "instructions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "accounts": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": ["name", "args", "accounts"]
            }
          }
        },
        "required": [
          "wallet",
          "signature",
          "slot",
          "timestamp",
          "signer",
          "programs",
          "balanceChanges"
        ]
      }
    },
    "observedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "program",
    "chain",
    "mint",
    "since",
    "at",
    "complete",
    "transactions",
    "observedAt"
  ],
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}
