Skip to main content
The net API provides insight about the networking aspect of the client.

net_listening

Returns an indication if the node is listening for network connections.
CLIENTMETHOD INVOCATION
Consolenet.listening
RPC{“method”: “net_listening”}

net_peerCount

Returns the number of connected peers.
CLIENTMETHOD INVOCATION
Consolenet.peerCount
RPC{“method”: “net_peerCount”}

net_version

Returns the devp2p network ID (e.g. 2110 for mainnet, 2111 for testnet).
CLIENTMETHOD INVOCATION
Consolenet.version
RPC{“method”: “net_version”}
I