Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 522 Bytes

File metadata and controls

30 lines (22 loc) · 522 Bytes
description Return the currently configured StarkNet chain id

starknet_chainId

Parameters:

None

Returns:

The chain id the node is connected to

Example:

{% code overflow="wrap" %}

// Request
curl https://starknet.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" 
--data '{"jsonrpc":"2.0","method":"starknet_chainId","params":[],"id":0}'

// Result
{
    "id": 0,
    "jsonrpc": "2.0",
    "result": "0x534e5f4d41494e"
}

{% endcode %}