Proving Account Balance

Step 1: Sign Up for an API Key

  1. Visit the Herodotus Cloud.
  2. Sign in using your Wallet or Github.
  3. Once logged in, access your API key from the console.

Step 2: Prepare Your Storage Proof Request

Construct a POST request to the Storage Proof API. Here’s a basic example:
{
    "destinationChainId": "11155111",
    "fee": "0",
    "data": {
        "11155111": {
            "block:5150551": {
                "accounts": {
                    "0x17C2D875CB397D813eAE817DaFD25807E348Df07": {
                        "props": ["BALANCE"],
                        "slots": []
                    }
                }
            }
        }
    }
}
This request proves the balance of a specific account on the Ethereum Sepolia testnet.

Step 3: Submit Your Request

Send a POST request to:
https://api.herodotus.cloud/submit-batch-query?apiKey=YOUR_API_KEY_HERE
Replace YOUR_API_KEY_HERE with your actual API key.

Step 4: Check the Status

Use the returned internalId to check the status of your request:
https://api.herodotus.cloud/batch-query-status?apiKey=YOUR_API_KEY_HERE&batchQueryId=YOUR_INTERNAL_ID

Step 5: Access Proven Data

Once the status is DONE, you can access the proven data through the Satellite contract on the destination chain. For Ethereum Sepolia:
  1. Go to the Satellite contract on Etherscan.
  2. Use the accountField function to retrieve the proven data.
    • chainId: 11155111
    • blockNumber: 5150551
    • account: 0x17C2D875CB397D813eAE817DaFD25807E348Df07
    • field: 0
A more in-depth guide can be found here:

Using Storage Proof API

Next Steps

  • Explore the full API documentation for more advanced usage.
  • Check out the Turbo interface for easier integration with smart contracts.
  • Try out different types of proofs using the workflow examples.
Congratulations! You’ve now used Storage Proofs to verify blockchain data. As you become more familiar with the system, you can create more complex proofs and integrate them into your applications.