[Go to site: main page, start]

net_peerCount - Celo

net_peerCount. Returns the number of peers connected to the client

net_peerCount - celo [Value: 20CU]
Retrieves the number of peers currently connected to the client
Use cases
Use cases
  • Retrieve a list of managed accounts
  • Verify available accounts on the connected node
  • Populate account dropdown menus
Constraints
Constraints
  • Requires node with account management capability
  • Risk of exposing addresses
  • Depends on node's current account configuration
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://celo.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":67}'
'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 67,
  "result": "0x8"  
}
Copy
Request params
idinteger
jsonrpcstring
methodstring
ParametersThis method does not accept any parameters.
Response
200
The number of peers connected to the client, returned as a hexadecimal string.
Response params
object
idinteger
jsonrpcstring
resultstring