Comment on page
Network API
Returns whether the node is listening for network connections.
None.
Boolean
- true is the node is listening for connections; otherwise, false.// Request
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"net_listening"}'
// Response
{
"jsonrpc":"2.0",
"id":1,
"result":true
}
Returns the node's information.
None.
Object
- the object containing node's information.// Request
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"net_nodeInfo"}'
// Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"name":"comcom_node",
"location":"KOR",
"version":"1.0.0"
}
}
Returns the number of peers the node is connected to.
None.
Number
- number of peers.// Request
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"net_peerCount"}'
// Response
{
"jsonrpc":"2.0",
"id":1,
"result":7
}
Returns whether the node is syncing with the network or not.
None.
Boolean
- true if the node is syncing, false otherwise.// Request
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"net_syncing"}'
// Response
{
"jsonrpc":"2.0",
"id":1,
"result":true
}
Returns the network id.
None.
Number
- the network id.- 0: main network
- 1: test network
// Request
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"net_id"}'
// Response
{
"jsonrpc":"2.0",
"id":1,
"result":0
}
Last modified 4yr ago