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
| Network | Base URL |
|---|---|
| Casper Mainnet | https://casper-mainnet.gateway.tatum.io |
| Casper Testnet | https://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.
| Method | Description |
|---|---|
account_put_deploy | Sends a deploy to the network for execution. Deprecated upstream in favor of account_put_transaction. |
chain_get_block | Returns a block by hash or height, or the latest block. |
chain_get_block_transfers | Returns the successful native transfers in a block. |
chain_get_era_info_by_switch_block | Returns the era information stored in a switch block. |
chain_get_era_summary | Returns the era summary at a given block. |
chain_get_state_root_hash | Returns the state root hash at a given block. |
info_get_chainspec | Returns the raw bytes of the chainspec, genesis accounts and global state files. |
info_get_deploy | Deprecated. Use info_get_transaction instead. |
info_get_peers | Lists the peers connected to the node. |
info_get_status | Returns the current status of the node. |
info_get_transaction | Returns a transaction by its hash. |
info_get_validator_changes | Returns the status changes of active validators. |
query_balance | Returns the balance of a purse at a given state. |
query_global_state | Returns a value stored under a key in global state. |
state_get_account_info | Returns an account at a given block. |
state_get_auction_info | Returns the bids and validators at a given block. |
state_get_dictionary_item | Returns 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.