Net module

net_listening

Invocation
{"method":"net_listening","params":[]}
Returned type
Description
Boolean
Example request of net_listening
Example response of net_listening
1
curl --data '{"method":"net_listening","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": true,
4
"id": 1
5
}
Copied!

net_localAddress

Invocation
{"method":"net_localAddress","params":[]}
Returned type
Description
Address
Example request of net_localAddress
Example response of net_localAddress
1
curl --data '{"method":"net_localAddress","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": 0x247b5f5f007fb5d50de13cfcbd4460db21c12bcb,
4
"id": 1
5
}
Copied!

net_localEnode

Invocation
{"method":"net_localEnode","params":[]}
Returned type
Description
String
Example request of net_localEnode
Example response of net_localEnode
1
curl --data '{"method":"net_localEnode","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": enode://a9cfa3cb16b537e131b0f141b5ef0c0ab9bf0dbec7799c3fc7bf8a974ff3e74e9[email protected]18.193.43.58:30303,
4
"id": 1
5
}
Copied!

net_peerCount

Invocation
{"method":"net_peerCount","params":[]}
Returned type
Description
Quantity
Example request of net_peerCount
Example response of net_peerCount
1
curl --data '{"method":"net_peerCount","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": 0x11,
4
"id": 1
5
}
Copied!

net_version

Invocation
{"method":"net_version","params":[]}
Returned type
Description
String
Example request of net_version
Example response of net_version
1
curl --data '{"method":"net_version","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": 4,
4
"id": 1
5
}
Copied!
Last modified 1mo ago