← Robinhood Chain overview

Robinhood Chain · net

net_version

Returns the current network ID. This is usually equivalent to the chainID, but may differ from it for some legacy networks or special testnets.

cURL

Endpoint: https://rh-mainnet.eu1.azxa.io/<api-key> — replace <api-key> with your API key from the Azxa app .

Terminal
curl -X POST https://rh-mainnet.eu1.azxa.io/<api-key> \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"net_version","params":[]}'

Example request

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version",
  "params": []
}

Result

Network ID

Example response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "1"
}
Schema
{
  "type": "string",
  "title": "decimal unsigned integer string",
  "pattern": "^(0|[1-9][0-9]*)$"
}

Test fixture

Fixture: get-network-id

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}
Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "3503995874084926"
}