📓
SANDSHREWサンド
  • Welcome to Sandshrew
    • What is SANDSHREWサンド ?
    • Getting Started
  • Sandshrew Namespaces
    • ord (inscriptions/runes)
    • esplora (Block Explorer APIs)
    • btc (Standard Bitcoin RPC)
    • Multicall
    • Runes
  • Metashrew
    • What is METASHREW?
  • Metashrew Open Source Repositories
    • metashrew
    • metashrew-cli
    • metashrew-view-rs
    • metashrew-as
    • metashrew-ord
    • metashrew-runes
  • Important Links
    • Discord
    • GitHub
    • sandshrew.io
Powered by GitBook
On this page
  1. Sandshrew Namespaces

Multicall

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 https://mainnet.sandshrew.io/v1/<developer key> \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0", 
    "method": "sandshrew_multicall", 
    "params": [
      ["esplora_block-height", ["817974"]], 
      ["esplora_blocks:tip:height", []]
    ], 
    "id": 0 
}'
Params

Works 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
{
  "id": 0,
  "result": [
    {
      "result": "000000000000000000006fc88a9a6f7ef0e4b64143482076f3755faef3bfcbd5"
    },
    { "result": 842608 }
  ],
  "jsonrpc": "2.0"
}
Previousbtc (Standard Bitcoin RPC)NextRunes

Last updated 1 year ago

Page cover image