Skip to main content

Using the RPC API

The RPC API allows you to communicate directly with the Calimwero network. The approach is the same as with NEAR RPC, but the RPC endpoint is different.

APIDescription
Access KeysRetrieve information about an account's access keys.
Accounts/ContractsView details about accounts and contracts as well as perform contract calls.
Block/ChunkQuery the network and get details about specific blocks or chunks.
GasGet gas price for a specific block or hash.
ProtocolRetrieve current genesis and protocol configuration.
NetworkReturn status information for nodes and validators.
TransactionsSend transactions and query their status.
Maintenance WindowsQuery the maintenance windows in current epoch for a validator.

Example of using Calimero RPC API

POST https://api.calimero.network/api/v1/shards/cali-calimero-testnet/neard-rpc/ Header: "Authorization: {auth_token} Request

{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "query",
"params": {
"request_type": "view_account",
"finality": "final",
"account_id": "cali.calimero.testnet"
}
}

Response

{
"jsonrpc": "2.0",
"result": {
"amount": "9996499369999999999999999999900000",
"block_hash": "GzBVoCkvAPAGaHGmTJcmRK6FrPJ716rsr3Zm1WSLMSTK",
"block_height": 507347,
"code_hash": "11111111111111111111111111111111",
"locked": "0",
"storage_paid_at": 0,
"storage_usage": 182
},
"id": "dontcare"
}

Instruction on how to get RPC endpoint and Authorization token can be found here:

info

You can access the JSON RPC endpoints using Postman