Skip to main content

starknet_chainId

Return the currently configured StarkNet chain id

Parameters#

This method does not accept parameters.

Request#

{
"jsonrpc": "2.0",
"method": "starknet_chainId",
"params": [],
"id": 1
}

Returns#

The chain id this node is connected to

StarkNet chain ID (hex string)

Examples#

curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_chainId",
"params": [],
"id": 1
}'