SANDSHREW provides the sandshrew_multicall method for batch calls against the SANDSHREW supported namespaces.
Multicall functionality is exclusive to mainnet and testnet calls currently. Support for the signet.sandshrew.io endpoint is ongoing.
curl
Copy curl https://mainnet.sandshrew.io/v1/ < developer ke y > \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "sandshrew_multicall",
"params": [
["esplora_block-height", ["817974"]],
["esplora_blocks:tip:height", []]
],
"id": 0
}'
ParamsWorks with any RPC call supported by SANDSHREW
The parameters to sandshrew_multicall are a list of 2-element lists, where the first element is the RPC method you want to call, and the second element is a list of parameters you wish to supply with the RPC method.
Response
Copy {
"id": 0,
"result": [
{
"result": "000000000000000000006fc88a9a6f7ef0e4b64143482076f3755faef3bfcbd5"
},
{ "result": 842608 }
],
"jsonrpc": "2.0"
}
Last updated 6 months ago