POST
/
b9b0fb92029d58b396139a9e89cf479b
curl --request POST \
  --url https://nd-907-114-772.p2pify.com/b9b0fb92029d58b396139a9e89cf479b \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "web3_clientVersion",
  "params": []
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}

Cronos API method that returns the client type and version running on the Cronos node. This information can be useful to developers to verify that a node they are connecting to is compatible with their needs.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • none

Response

  • string — a string identifying the type of client, version, operating system, and language version running on the node

web3_clientVersion code examples

const { Web3 } = require("web3");

const NODE_URL = "CHAINSTACK_NODE_URL";

const web3 = new Web3(NODE_URL);



async function getClient() {

  const client = await web3.eth.getNodeInfo();

  console.log(client);

}



getClient();

Use case

A use case for the web3_clientVersion method can be to verify which client is running to then decide which method to run.

Read Expanding your blockchain horizons: The eth_getBlockReceipts emulator to learn how to build a program to emulate eth_getBlockReceipts on any EVM-compatible chain.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:web3_clientVersion
params
any[]

Response

200 - application/json
The client running on this node.
jsonrpc
string
id
integer
result
string