Getting the Storage Proof
Fetching the Proof
curl --location --request POST 'https://jsonrpc.hashi-explorer.xyz/v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "hashi_getAccountAndStorageProof",
"params": {
"chainId": 10,
"address": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
"storageKeys": ["0x00000000000000000000000000000000000000000000000000000000000000b"],
"blockNumber": 126086800
}
}'import axios from "axios";
const main = async () => {
// fetch storage proof from Hashi Prover
console.log("Fetching storage proof from Hashi prover...");
const result = await axios.post(
"http://jsonrpc.hashi-explorer.xyz:3000/v1",
{
jsonrpc: "2.0",
method: "hashi_getAccountAndStorageProof",
params: {
chainId: 10,
address: "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
storageKeys: ["0x00000000000000000000000000000000000000000000000000000000000000b"],
blockNumber: 126086800
},
id: 1,
},
{
headers: {
"Content-Type": "application/json",
},
}
);
console.log("Storage proof result", result.data.result.proof);
};
main();Use the SP1 storage proof generator
Last updated
Was this helpful?