POST
/
submit-batch-query
curl --request POST \
  --url https://api.herodotus.cloud/submit-batch-query \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "destinationChainId": "SN_SEPOLIA",
  "fee": "0",
  "data": {
    "11155111": {
      "block:5856869": {
        "header": [
          "STATE_ROOT",
          "TIMESTAMP"
        ]
      },
      "timestamp:1703799420": {
        "accounts": {
          "vitalik.eth": {
            "slots": [],
            "props": [
              "BALANCE",
              "NONCE",
              "STORAGE_ROOT"
            ]
          },
          "0xd8da6bf26964af9d7eed9e03e53415d37aa96045": {
            "slots": [],
            "props": [
              "BALANCE"
            ]
          }
        }
      },
      "block:5030420": {
        "header": [
          "PARENT_HASH"
        ],
        "accounts": {
          "0x69030ef8C2744b37a096fAf2A4C78B4dAec1308b": {
            "slots": [
              "0x0000000000000000000000000000000000000000000000000000000000000001",
              "0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0"
            ],
            "props": []
          }
        }
      }
    }
  },
  "webhook": {
    "url": "https://webhook.site/1f3a9b5d-5c8c-4e2a-9d7e-6c3c5a0a0e2f",
    "headers": {
      "Content-Type": "application/json"
    }
  }
}'
{
  "internalId": "<string>"
}

Request Body

Available chain connections

Destination Chain IDOrigin Chain ID
30011155111
48014801, 84532, 11155111
42161411155111
111551114801, 11155111
1115542011155111
STARKNET1
SN_SEPOLIA11155111, 11155420

Every field in this request body is mandatory.

destinationChainId

  • Description: The ID of the chain that the user wants the data proved on.
  • Type: string
  • Available values:
    • refer to the Available chain connections table above

fee

  • Description: The amount of fee that can be collected by our backend. The system collects only the needed amount.
  • Type: string

Note: Goerli is free, provide 0 as fee.

data

  • Description: This field describes all the properties the user wants to be proved. It accepts nested objects following a specific pattern
  • Type: object
  • Data Structure:
{
    "[chain id]": {
        "[block:<number> or timestamp:<number>]": {
            "header": ["header property", "header property", ...],
            "accounts": {
              "[address or ENS name]": {
                "props": ["account property", "account property", ...],
                "slots": ["storage slot", "storage slot", ...]
              },
              "[address or ENS name]": { ... },
              ...
            }
        },
        "[block:<number> or timestamp:<number>]": { ... },
        ...
    }
}

  • [chain id]

    • Description: ID of the origin chain from which the data to prove is taken.
    • Type: string
    • Available values:
      • refer to the Available chain connections table above
  • [block:number or timestamp:number]

    • Description: The number with block or timestamp prefix from which the user requests the properties to prove. If timestamp prefix is provided, the system will find exact or the block with the closest timestamp to the left. Note: timestamp is only available for STARKNET, SN_GOERLI and SN_SEPOLIA destinations.
    • Type: string
  • [header property]

    • Description: Properties of the requested header to be saved in the FactsRegistry contract. Note: currently, we save all the values regardless of what is provided in this field.
    • Type: string
    • Available values:
      • PARENT_HASH
      • UNCLES_HASH
      • COINBASE
      • PROPOSER
      • STATE_ROOT
      • TRANSACTIONS_ROOT
      • RECEIPTS_ROOT
      • LOGS_BLOOM
      • DIFFICULTY
      • BLOCK_NUMBER
      • GAS_LIMIT
      • GAS_USED
      • TIMESTAMP
      • EXTRA_DATA
      • MIX_HASH
      • NONCE
      • BASE_FEE_PER_GAS
      • WITHDRAWALS_ROOT
      • BLOB_GAS_USED
      • EXCESS_BLOB_GAS
      • PARENT_BEACON_BLOCK_ROOT
  • [address or ENS name]

    • Description: Address of the account for which the user requests the properties to prove, must be the address of the account on the origin chain.
    • Type: string
  • [account property]

    • Description: Properties of the requested account to be saved in the FactsRegistry contract. Note: currently, we save all the values regardless of what is provided in this field.
    • Type: string
    • Available values:
      • BALANCE
      • NONCE
      • CODE_HASH
      • STORAGE_ROOT
  • [storage slot]

    • Description: Storage slot of the requested account to be saved in the FactsRegistry contract. To find storage slots, you can use our BETA Storage Slot Explorer, which can sometimes break unexpectedly.
    • Type: string

webhook

  • Description: The webhook to send the response to.
  • Type: object
  • Data Structure:
{
  "url": "[url]",
  "headers": {
    "[header name]": "[header value]"
  }
}

Example Request Body

{
  "destinationChainId": "SN_SEPOLIA",
  "fee": "0",
  "data": {
    "11155111": {
      "block:5856869": {
        "header": ["STATE_ROOT", "TIMESTAMP"]
      },
      "timestamp:1703799420": {
        "accounts": {
          "vitalik.eth": {
            "slots": [],
            "props": ["BALANCE", "NONCE", "STORAGE_ROOT"]
          },
          "0xd8da6bf26964af9d7eed9e03e53415d37aa96045": {
            "slots": [],
            "props": ["BALANCE"]
          }
        }
      },
      "block:5030420": {
        "header": ["PARENT_HASH"],
        "accounts": {
          "0x69030ef8C2744b37a096fAf2A4C78B4dAec1308b": {
            "slots": [
              "0x0000000000000000000000000000000000000000000000000000000000000001",
              "0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0"
            ],
            "props": []
          }
        }
      }
    }
  },
  "webhook": {
    "url": "https://webhook.site/1f3a9b5d-5c8c-4e2a-9d7e-6c3c5a0a0e2f",
    "headers": {
      "Content-Type": "application/json"
    }
  }
}

Authorizations

api-key
string
header
required

Body

application/json

Response

201
application/json
Default Response

The response is of type object.