net
Last updated
Was this helpful?
The net API provides insight about the networking aspect of the client.
Returns an indication if the node is listening for network connections.
Console
net.listening
RPC
{"method": "net_listening"}
Returns the number of connected peers.
Console
net.peerCount
RPC
{"method": "net_peerCount"}
Returns the devp2p network ID (e.g. 1 for mainnet, 5 for goerli).
Console
net.version
RPC
{"method": "net_version"}
Last updated
Was this helpful?
Was this helpful?