Casper is a proof-of-stake Layer 1 that finalizes blocks with the Zug consensus protocol and runs smart contracts compiled to WebAssembly.
Casper executes smart contracts in a WebAssembly runtime, and most contracts are written in Rust. Accounts are identified by public keys and by a 32-byte account hash derived from them. Execution is metered in gas, and fees are charged in CSPR, priced in motes, where one CSPR equals one billion motes. Casper 2.0 introduced a transaction model that replaces deploys, and it moved the JSON-RPC API out of the node into a separate sidecar service.
Casper RPC endpoints
HTTP requests take your API key in the x-api-key header. See Authentication.
For example, this request sends info_get_status to Casper Mainnet through the JSON-RPC interface:
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}'Don't have an API key?
Sign up to Dashboard and create your API keys today. Get higher limits and use debugging tools.
Casper RPC at a glance
- Networks: Mainnet (Tier 3) and Testnet (Tier 3)
- Interfaces: JSON-RPC
- Supported methods: 17 · JSON-RPC methods
- Native token:
CSPR - Block explorers: Mainnet · Testnet
- Network status: Mainnet · Testnet
- Authentication: API key in the
x-api-keyheader, see Authentication
Try Casper RPC
Get the latest Casper block
Sends info_get_status to Casper Mainnet through Tatum RPC Gateway and shows the latest block number.
Get the Casper node version
Sends info_get_status to Casper Mainnet through Tatum RPC Gateway and shows the node version and status.
To try more Casper methods, open the Casper Postman collection, set the gateway-api-key variable of the Tatum Gateway environment to your API key, and send any request.
Casper RPC methods
Methods each Casper interface supports, listed live from Tatum RPC Gateway.
JSON-RPC
17 methods on Mainnet and Testnet. What each one does: Casper JSON-RPC methods.
account_*(1):account_put_deploychain_*(5):chain_get_block,chain_get_block_transfers,chain_get_era_info_by_switch_block,chain_get_era_summary,chain_get_state_root_hashinfo_*(6):info_get_chainspec,info_get_deploy,info_get_peers,info_get_status,info_get_transaction,info_get_validator_changesquery_*(2):query_balance,query_global_statestate_*(3):state_get_account_info,state_get_auction_info,state_get_dictionary_item
Every endpoint also lists its methods at runtime: /_methods (JSON) and /llms.txt (text), for example Casper Mainnet /_methods.
Method unavailable?If you need a method we don't support yet, contact support.
Related
- Casper RPC nodes on tatum.io: plans, pricing and dedicated nodes
- Supported Blockchains: every chain on Tatum RPC Gateway and its network tiers
- Casper official website: chain documentation
Testing without an API key? Free public endpoints are listed on Casper RPC at FREERPC.com.