{
  "openapi": "3.0.3",
  "info": {
    "title": "Data Structure Indexer API",
    "description": "API for fetching data from the Data Structure Indexer",
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://rs-indexer.api.herodotus.cloud",
      "description": "Production server"
    },
    {
      "url": "https://staging.rs-indexer.api.herodotus.cloud",
      "description": "Staging server"
    }
  ],
  "paths": {
    "/accumulators": {
      "get": {
        "tags": [
          "accumulators"
        ],
        "summary": "Get all accumulators",
        "description": "List Data Structure Indexer accumulators with optional filters for deployment chain, accumulated chain, and contract type to discover supported proof data.",
        "operationId": "get_accumulators",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChainId"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChainId"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "contract_type",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ContractType"
                }
              ],
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the accumulators that match the provided chain and contract filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccumulatorsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/accumulators/info": {
      "get": {
        "tags": [
          "accumulators"
        ],
        "summary": "Get root hash of an accumulator and helper data",
        "description": "Get root hash of an accumulator and helper data",
        "operationId": "get_root",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "hashing_function",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/HashingFunction"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "contract_type",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContractType"
            }
          },
          {
            "name": "onchain_accumulator_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "accumulator_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get root hash of an accumulator with helper data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MMRInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No matching accumulator found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/accumulators/peaks": {
      "get": {
        "tags": [
          "accumulators"
        ],
        "summary": "Get peaks of a MMR",
        "description": "Get peaks of a MMR",
        "operationId": "get_peaks",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "hashing_function",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/HashingFunction"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "contract_type",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContractType"
            }
          },
          {
            "name": "onchain_accumulator_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "accumulator_size",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get all peaks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeaksResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/accumulators/proofs": {
      "get": {
        "tags": [
          "accumulators"
        ],
        "summary": "Get proofs for MMR",
        "description": "Get proofs for MMR",
        "operationId": "get_proofs",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "hashing_function",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/HashingFunction"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "contract_type",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContractType"
            }
          },
          {
            "name": "from_block_number_inclusive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "to_block_number_inclusive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "block_numbers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "nullable": true
            }
          },
          {
            "name": "is_meta_included",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "is_whole_tree",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "is_rlp_included",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "is_pure_rlp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "onchain_accumulator_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "accumulator_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get mmr metadata and proof",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MMRMetaAndProofsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/is-alive": {
      "get": {
        "tags": [
          "Health Check"
        ],
        "summary": "Simple health check endpoint",
        "description": "Simple health check endpoint",
        "operationId": "get_is_alive",
        "responses": {
          "200": {
            "description": "Get all accumulators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IsAliveResponse"
                }
              }
            }
          }
        }
      }
    },
    "/remappers/": {
      "get": {
        "tags": [
          "remappers"
        ],
        "summary": "Get all remappers",
        "description": "Get all remappers",
        "operationId": "get_remappers",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get all remappers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemappersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/remappers/binsearch-path": {
      "get": {
        "tags": [
          "remappers"
        ],
        "operationId": "get_binsearch_path",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "onchain_remapper_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "remapper_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get binsearch path for timestamp mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/remappers/blocks-mapped-to-timestamps": {
      "post": {
        "tags": [
          "remappers"
        ],
        "operationId": "get_blocks_mapped_to_timestamps",
        "parameters": [
          {
            "name": "origin_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "destination_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          }
        ],
        "requestBody": {
          "description": "Blocks mapped to timestamps",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlocksMappedToTimestampsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Get blocks mapped to timpestamps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlocksMappedToTimestampsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/remappers/get-block-header-by-timestamp": {
      "get": {
        "tags": [
          "remappers"
        ],
        "summary": "Get block header by timestamp",
        "description": "Get block header by timestamp",
        "operationId": "get_block_header_by_timestamp",
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get blockheader by timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockHeaderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/remappers/peaks": {
      "get": {
        "tags": [
          "remappers"
        ],
        "summary": "Get remapper peaks by remapper id",
        "description": "Get remapper peaks by remapper id",
        "operationId": "get_peaks",
        "parameters": [
          {
            "name": "deployed_on_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "accumulates_chain",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            }
          },
          {
            "name": "hashing_function",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/HashingFunction"
                }
              ],
              "nullable": true
            }
          },
          {
            "name": "onchain_remapper_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get remapper peaks by remapper id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemapperPeaksResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccumulatedBlock": {
        "type": "object",
        "required": [
          "block_number"
        ],
        "properties": {
          "block_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AccumulatedBlocksBody": {
        "type": "object",
        "required": [
          "block_numbers"
        ],
        "properties": {
          "block_numbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "AccumulatedBlocksResponse": {
        "type": "object",
        "required": [
          "block"
        ],
        "properties": {
          "block": {
            "$ref": "#/components/schemas/AccumulatedBlock"
          }
        }
      },
      "Accumulator": {
        "type": "object",
        "required": [
          "deployed_on_chain",
          "accumulates_chain",
          "onchain_accumulator_id",
          "onchain_accumulator_address",
          "built_with_hash",
          "contract_deployment_block_number",
          "contract_type"
        ],
        "properties": {
          "accumulates_chain": {
            "type": "string"
          },
          "built_with_hash": {
            "type": "string"
          },
          "contract_deployment_block_number": {
            "type": "integer",
            "format": "int32"
          },
          "contract_type": {
            "$ref": "#/components/schemas/ContractType"
          },
          "deployed_on_chain": {
            "type": "string"
          },
          "onchain_accumulator_address": {
            "type": "string"
          },
          "onchain_accumulator_id": {
            "type": "string"
          },
          "stacks_at_size": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "stacks_on_accumulator_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AccumulatorInfoAndCalls": {
        "type": "object",
        "required": [
          "chunks",
          "events_prognosis",
          "internal_accumulator_id",
          "onchain_accumulator_id"
        ],
        "properties": {
          "aggregated_event_prognosis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EventPrognosis"
              }
            ],
            "nullable": true
          },
          "chunks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chunk"
            }
          },
          "events_prognosis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventPrognosis"
            }
          },
          "internal_accumulator_id": {
            "type": "string"
          },
          "onchain_accumulator_id": {
            "type": "string"
          }
        }
      },
      "AccumulatorsResponse": {
        "type": "object",
        "required": [
          "accumulators"
        ],
        "properties": {
          "accumulators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Accumulator"
            }
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "BatchUpdatePrecomputationResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccumulatorInfoAndCalls"
          }
        }
      },
      "BinSearchResponse": {
        "type": "object",
        "required": [
          "proofs",
          "path",
          "remapper"
        ],
        "properties": {
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BinsearchPath"
            }
          },
          "proofs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BinsearchProof"
            }
          },
          "remapper": {
            "$ref": "#/components/schemas/BinsearchRemapper"
          }
        }
      },
      "BinsearchPath": {
        "type": "object",
        "required": [
          "block_number",
          "timestamp",
          "element_index",
          "post_append_remapper_size"
        ],
        "properties": {
          "block_number": {
            "type": "integer",
            "format": "int32"
          },
          "element_index": {
            "type": "integer",
            "format": "int32"
          },
          "post_append_remapper_size": {
            "type": "integer",
            "format": "int32"
          },
          "timestamp": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BinsearchProof": {
        "type": "object",
        "required": [
          "element_index",
          "element_hash",
          "siblings_hashes",
          "peaks_hashes",
          "elements_count"
        ],
        "properties": {
          "element_hash": {
            "type": "string"
          },
          "element_index": {
            "type": "integer",
            "format": "int32"
          },
          "elements_count": {
            "type": "integer",
            "format": "int32"
          },
          "peaks_hashes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "siblings_hashes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BinsearchRemapper": {
        "type": "object",
        "required": [
          "deployed_on_chain",
          "remaps_chain",
          "onchain_remapper_id",
          "address"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "deployed_on_chain": {
            "type": "string"
          },
          "onchain_remapper_id": {
            "type": "string"
          },
          "remaps_chain": {
            "type": "string"
          }
        }
      },
      "BinsearchRemapping": {
        "type": "object",
        "required": [
          "deployed_on_chain",
          "remaps_chain",
          "onchain_remapper_id",
          "onchain_remapper_address",
          "built_with_hash"
        ],
        "properties": {
          "built_with_hash": {
            "type": "string"
          },
          "deployed_on_chain": {
            "type": "string"
          },
          "onchain_remapper_address": {
            "type": "string"
          },
          "onchain_remapper_id": {
            "type": "string"
          },
          "remaps_chain": {
            "type": "string"
          }
        }
      },
      "BlockHeader": {
        "type": "object",
        "required": [
          "timestamp",
          "block_number",
          "block_hash",
          "parent_hash",
          "miner",
          "state_root",
          "transaction_root",
          "receipt_root",
          "sha3_uncles",
          "logs_bloom",
          "difficulty",
          "gas_limit",
          "gas_used",
          "extra_data",
          "mix_hash",
          "nonce",
          "base_fee_per_gas",
          "withdrawal_root"
        ],
        "properties": {
          "base_fee_per_gas": {
            "type": "string"
          },
          "block_hash": {
            "type": "string"
          },
          "block_number": {
            "type": "integer",
            "format": "int32"
          },
          "difficulty": {
            "type": "string"
          },
          "extra_data": {
            "type": "string"
          },
          "gas_limit": {
            "type": "string"
          },
          "gas_used": {
            "type": "string"
          },
          "logs_bloom": {
            "type": "string"
          },
          "miner": {
            "type": "string"
          },
          "mix_hash": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "parent_hash": {
            "type": "string"
          },
          "receipt_root": {
            "type": "string"
          },
          "sha3_uncles": {
            "type": "string"
          },
          "state_root": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "format": "int32"
          },
          "transaction_root": {
            "type": "string"
          },
          "withdrawal_root": {
            "type": "string"
          }
        }
      },
      "BlockHeaderResponse": {
        "type": "object",
        "required": [
          "block_header"
        ],
        "properties": {
          "block_header": {
            "$ref": "#/components/schemas/BlockHeader"
          }
        }
      },
      "BlockMappedToTimestamp": {
        "type": "object",
        "required": [
          "block_number",
          "timestamp",
          "onchain_remapper_id"
        ],
        "properties": {
          "block_number": {
            "type": "integer",
            "format": "int32"
          },
          "onchain_remapper_id": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BlocksMappedToTimestampsBody": {
        "type": "object",
        "required": [
          "block_numbers"
        ],
        "properties": {
          "block_numbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "BlocksMappedToTimestampsResponse": {
        "type": "object",
        "required": [
          "blocks"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockMappedToTimestamp"
            }
          }
        }
      },
      "Body": {
        "type": "object",
        "required": [
          "from_block_number_inclusive",
          "to_block_number_inclusive",
          "chunk_size"
        ],
        "properties": {
          "accumulator_id": {
            "type": "string",
            "nullable": true
          },
          "chunk_size": {
            "type": "integer",
            "format": "int32"
          },
          "from_block_number_inclusive": {
            "type": "integer",
            "format": "int32"
          },
          "is_from_grower": {
            "type": "boolean",
            "nullable": true
          },
          "is_from_message": {
            "type": "boolean",
            "nullable": true
          },
          "to_block_number_inclusive": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Call": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "FromBlockCall"
            ],
            "properties": {
              "FromBlockCall": {
                "$ref": "#/components/schemas/FromBlockCall"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "FromMessageCall"
            ],
            "properties": {
              "FromMessageCall": {
                "$ref": "#/components/schemas/FromMessageCall"
              }
            }
          }
        ]
      },
      "ChainId": {
        "type": "string",
        "enum": [
          "1",
          "11155111",
          "137",
          "280",
          "MADARA_PRAGMA",
          "STARKNET",
          "SN_SEPOLIA",
          "300",
          "11155420",
          "421614",
          "4801",
          "84532",
          "UNKNOWN"
        ]
      },
      "Chunk": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "FromBlockChunk"
            ],
            "properties": {
              "FromBlockChunk": {
                "$ref": "#/components/schemas/FromBlockChunk"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "FromMessageChunk"
            ],
            "properties": {
              "FromMessageChunk": {
                "$ref": "#/components/schemas/FromMessageChunk"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "GrowerChunk"
            ],
            "properties": {
              "GrowerChunk": {
                "$ref": "#/components/schemas/GrowerChunk"
              }
            }
          }
        ]
      },
      "ComputingTask": {
        "type": "object",
        "required": [
          "internal_id",
          "deployed_on_chain",
          "accumulates_chain",
          "contract_type",
          "from_block_number",
          "to_block_number",
          "chunk_size"
        ],
        "properties": {
          "accumulates_chain": {
            "$ref": "#/components/schemas/ChainId"
          },
          "accumulator_id": {
            "type": "string",
            "nullable": true
          },
          "application_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ComputingTaskStatus"
              }
            ],
            "nullable": true
          },
          "chunk_size": {
            "type": "integer",
            "format": "int32"
          },
          "contract_type": {
            "$ref": "#/components/schemas/ContractType"
          },
          "creation_timestamp": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "deployed_on_chain": {
            "$ref": "#/components/schemas/ChainId"
          },
          "done_at_timestamp": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "errors": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JsonValue"
              }
            ],
            "nullable": true
          },
          "from_block_number": {
            "type": "integer",
            "format": "int32"
          },
          "hashing_function": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HashingFunction"
              }
            ],
            "nullable": true
          },
          "internal_id": {
            "type": "string"
          },
          "is_from_grower": {
            "type": "boolean",
            "nullable": true
          },
          "is_from_message": {
            "type": "boolean",
            "nullable": true
          },
          "lock": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "result": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccumulatorInfoAndCalls"
              }
            ],
            "nullable": true
          },
          "to_block_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ComputingTaskStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "DONE",
          "FAILED"
        ]
      },
      "ContractType": {
        "type": "string",
        "enum": [
          "AGGREGATOR",
          "ACCUMULATOR",
          "REMAPPER"
        ]
      },
      "EventPrognosis": {
        "type": "object",
        "required": [
          "emitted_on_chain",
          "emitted_acc_chain",
          "accumulator_id",
          "accumulator_new_root",
          "accumulator_new_size",
          "emitted_acc_address",
          "accumulated_blocks_start",
          "accumulated_blocks_end"
        ],
        "properties": {
          "accumulated_blocks_end": {
            "type": "integer",
            "format": "int32"
          },
          "accumulated_blocks_start": {
            "type": "integer",
            "format": "int32"
          },
          "accumulator_id": {
            "type": "string"
          },
          "accumulator_new_root": {
            "type": "string"
          },
          "accumulator_new_size": {
            "type": "integer",
            "format": "int32"
          },
          "emitted_acc_address": {
            "type": "string"
          },
          "emitted_acc_chain": {
            "$ref": "#/components/schemas/ChainId"
          },
          "emitted_on_chain": {
            "$ref": "#/components/schemas/ChainId"
          }
        }
      },
      "FromBlockCall": {
        "type": "object",
        "required": [
          "blocks",
          "peaks",
          "starting_element_index",
          "siblings_hashes"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rlp"
            }
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "siblings_hashes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "starting_element_index": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "FromBlockChunk": {
        "type": "object",
        "required": [
          "blocks",
          "peaks",
          "starting_element_index",
          "siblings_hashes"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rlp"
            }
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "siblings_hashes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "starting_element_index": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "FromMessageCall": {
        "type": "object",
        "required": [
          "blocks",
          "peaks"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rlp"
            }
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "FromMessageChunk": {
        "type": "object",
        "required": [
          "blocks",
          "peaks"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rlp"
            }
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GetComputingTaskResponse": {
        "type": "object",
        "required": [
          "computing_task"
        ],
        "properties": {
          "computing_task": {
            "$ref": "#/components/schemas/ComputingTask"
          }
        }
      },
      "GrowerChunk": {
        "type": "object",
        "required": [
          "blocks",
          "peaks",
          "post_append_peaks"
        ],
        "properties": {
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rlp"
            }
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "post_append_peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "HashingFunction": {
        "type": "string",
        "enum": [
          "keccak",
          "poseidon",
          "pedersen"
        ]
      },
      "IsAliveResponse": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "MMRInclusionProof": {
        "type": "object",
        "required": [
          "element_index",
          "element_hash",
          "block_number",
          "siblings_hashes"
        ],
        "properties": {
          "block_number": {
            "type": "integer",
            "format": "int32"
          },
          "element_hash": {
            "type": "string"
          },
          "element_index": {
            "type": "integer",
            "format": "int32"
          },
          "rlp_block_header": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Rlp"
              }
            ],
            "nullable": true
          },
          "siblings_hashes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MMRInfo": {
        "type": "object",
        "required": [
          "root",
          "elements_count",
          "onchain_accumulator_id",
          "contract_address"
        ],
        "properties": {
          "contract_address": {
            "type": "string"
          },
          "elements_count": {
            "type": "integer",
            "format": "int32"
          },
          "onchain_accumulator_id": {
            "type": "string"
          },
          "root": {
            "type": "string"
          }
        }
      },
      "MMRInfoResponse": {
        "type": "object",
        "required": [
          "info"
        ],
        "properties": {
          "info": {
            "$ref": "#/components/schemas/MMRInfo"
          }
        }
      },
      "MMRMetaAndProofs": {
        "type": "object",
        "required": [
          "proofs"
        ],
        "properties": {
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MMRMetadata"
              }
            ],
            "nullable": true
          },
          "proofs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MMRInclusionProof"
            }
          }
        }
      },
      "MMRMetaAndProofsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MMRMetaAndProofs"
            }
          }
        }
      },
      "MMRMetadata": {
        "type": "object",
        "required": [
          "mmr_size",
          "mmr_id",
          "mmr_root",
          "mmr_peaks",
          "contract_address"
        ],
        "properties": {
          "contract_address": {
            "type": "string"
          },
          "mmr_id": {
            "type": "string"
          },
          "mmr_peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mmr_root": {
            "type": "string"
          },
          "mmr_size": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "PeaksResponse": {
        "type": "object",
        "required": [
          "peaks",
          "onchain_accumulator_id",
          "contract_address"
        ],
        "properties": {
          "contract_address": {
            "type": "string"
          },
          "onchain_accumulator_id": {
            "type": "string"
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RemapperPeaksResponse": {
        "type": "object",
        "required": [
          "peaks",
          "elements_count",
          "contract_address"
        ],
        "properties": {
          "contract_address": {
            "type": "string"
          },
          "elements_count": {
            "type": "integer",
            "format": "int32"
          },
          "peaks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RemappersResponse": {
        "type": "object",
        "required": [
          "remappers"
        ],
        "properties": {
          "remappers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BinsearchRemapping"
            }
          }
        }
      },
      "Rlp": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "String"
            ],
            "properties": {
              "String": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "LittleEndian8ByteChunks"
            ],
            "properties": {
              "LittleEndian8ByteChunks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "SubmitComputingTaskResponse": {
        "type": "object",
        "required": [
          "computing_task_id"
        ],
        "properties": {
          "computing_task_id": {
            "type": "string"
          }
        }
      },
      "UnlockAccumulatorResponse": {
        "type": "object",
        "required": [
          "unlocked_accumulator_id"
        ],
        "properties": {
          "unlocked_accumulator_id": {
            "type": "string"
          }
        }
      },
      "JsonValue": {
        "type": "object",
        "description": "Represents any valid JSON value"
      }
    }
  },
  "tags": [
    {
      "name": "accumulators",
      "description": "Accumulators endpoints."
    },
    {
      "name": "remappers",
      "description": "Remappers endpoints."
    }
  ]
}
