Casper RPC
How to use it
// yarn add @tatumio/tatum
import { TatumSDK, Casper, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<Casper>({ network: Network.CASPER })
const result = await tatum.rpc.infoGetStatus()
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
Request Example
curl --location 'https://api.tatum.io/v3/blockchain/node/casper-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "info_get_status",
"params": []
}'
Overview
info_get_status
is an RPC method on the Casper blockchain that retrieves the current status of the node. This can include information about the last finalized block, the current era, and other node-specific details.
Parameters
The info_get_status
method does not require any parameters.
Return Object
The info_get_status
method returns an object with the following fields:
api_version
: The API version. Example:"1.5.6"
last_added_block_info
: Information about the last added block.build_version
: The build version of the node.uptime
: The uptime of the node.
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"api_version": "1.5.6",
"last_added_block_info": {
"hash": "9e2ad304450d51957b5b0dd87787b3bb2393ef35f9e39d11be70e1dfe608aa1f",
"timestamp": "2023-07-07T14:08:10.032Z",
"era_id": 1234,
"height": 56789,
"state_root_hash": "7dd1b7e508cdfb1cde8c4fbbed3f4f2a4a8e5e8c5a34d63c3f989a47f8927b29"
},
"build_version": "1.4.3",
"uptime": "1024h"
}
}
Notes
- This method provides an overview of the current status of the node.
- This method does not require any parameters.
For more detailed information, refer to the official Casper documentation.