Casper - JSON-RPC

JSON-RPC methods supported on Casper Mainnet and Casper Testnet through Tatum RPC Gateway, with base URLs and an example request.

Call Casper JSON-RPC methods through Tatum RPC Gateway. Send an HTTP POST request with a JSON-RPC 2.0 body to the network's base URL, with your API key in the x-api-key header. See Authentication.

Base URLs

NetworkBase URL
Casper Mainnethttps://casper-mainnet.gateway.tatum.io
Casper Testnethttps://casper-testnet.gateway.tatum.io

Example request

curl 'https://casper-mainnet.gateway.tatum.io' \
  --header 'content-type: application/json' \
  --header 'x-api-key: {YOUR_API_KEY}' \
  --data '{"jsonrpc":"2.0","method":"info_get_status","params":[],"id":1}'

Methods

17 methods. Parameters and responses are described in the Casper JSON-RPC API reference; each method name links to its page there.

MethodDescription
account_put_deploySends a deploy to the network for execution. Deprecated upstream in favor of account_put_transaction.
chain_get_blockReturns a block by hash or height, or the latest block.
chain_get_block_transfersReturns the successful native transfers in a block.
chain_get_era_info_by_switch_blockReturns the era information stored in a switch block.
chain_get_era_summaryReturns the era summary at a given block.
chain_get_state_root_hashReturns the state root hash at a given block.
info_get_chainspecReturns the raw bytes of the chainspec, genesis accounts and global state files.
info_get_deployDeprecated. Use info_get_transaction instead.
info_get_peersLists the peers connected to the node.
info_get_statusReturns the current status of the node.
info_get_transactionReturns a transaction by its hash.
info_get_validator_changesReturns the status changes of active validators.
query_balanceReturns the balance of a purse at a given state.
query_global_stateReturns a value stored under a key in global state.
state_get_account_infoReturns an account at a given block.
state_get_auction_infoReturns the bids and validators at a given block.
state_get_dictionary_itemReturns an item from a dictionary in global state.

The gateway lists its supported methods at runtime:

Method unavailable?

If you need a method we don't support yet, contact support.