Admin module

admin_addPeer

Adds given node.
Invocation
{"method":"admin_addPeer","params":[enode, addToStaticNodes]}
Parameter
Type
Description
enode
String
Given node
addToStaticNodes
Boolean
Adding to static nodes if true (optional)
Returned type
Description
String
Added node
Example request of admin_addPeer
Example response of admin_addPeer
1
curl --data '{"method":"admin_addPeer","params":["enode://deed356ddcaa1eb33a859b818a134765fff2a3dd5cd5b3d6cbe08c9424dca53b9[email protected]85.221.141.144:30303", true],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": "enode://deed356ddcaa1eb33a859b818a134765fff2a3dd5cd5b3d6cbe08c9424dca53b9[email protected]85.221.141.144:30303",
4
"id": 1
5
}
Copied!

admin_nodeInfo

Displays relevant information about this node.
Invocation
{"method":"admin_nodeInfo","params":[]}
This method doesn't have parameters.
Returned type
Description
NodeInfo object
Information about this node
Example request of admin_nodeInfo
Example response of admin_nodeInfo
Objects in admin_nodeInfo
1
curl --data '{"method":"admin_nodeInfo","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"enode": "enode://deed356ddcaa1eb33a859b818a134765fff2a3dd5cd5b3d6cbe08c9424dca53b9[email protected]85.221.141.144:30303",
5
"id": "b70bb308924de8247d73844f80561e488ae731105a6ef46004e4579edd4f378a",
6
"ip": "85.221.141.144",
7
"listenAddr": "85.221.141.144:30303",
8
"name": "Nethermind/v1.10.37-0-068e5c399-20210315/X64-Windows/5.0.3",
9
"ports": {
10
"discovery": 30303,
11
"listener": 30303
12
},
13
"protocols": {
14
"eth": {
15
"difficulty": "0x6372ca",
16
"genesis": "0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a",
17
"head": "0xf266b2639ef7e1db6ee769f7b161ef7eb2d74beb0ab8ffcd270036da04b41cd4",
18
"network": "0x5"
19
}
20
}
21
},
22
"id": 1
23
}
Copied!
NodeInfo
Field name
Type
Enode
String
Id
String
Ip
String
ListenAddress
String
Name
String
Ports
PortsInfo object
Protocols
Array
PortsInfo
Field name
Type
Discovery
Quantity
Listener
Quantity

admin_peers

Displays a list of connected peers including information about them (clientId, host, port, address, isBootnode, isStatic, enode).
Invocation
{"method":"admin_peers","params":[includeDetails]}
Parameter
Type
Description
includeDetails
Boolean
If true, including clientType, ethDetails and lastSignal (optional)
Returned type
Description
PeerInfo object
List of connected peers including information
Example request of admin_peers
Example response of admin_peers
Objects in admin_peers
1
curl --data '{"method":"admin_peers","params":[true],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": [
4
{
5
"clientId": "Nethermind/v1.10.33-1-5c4c185e8-20210310/X64-Linux/5.0.2",
6
"host": "94.237.54.114",
7
"port": 30313,
8
"address": "94.237.54.114:30313",
9
"isBootnode": false,
10
"isTrusted": false,
11
"isStatic": false,
12
"enode": "enode://46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4d[email protected]94.237.54.114:30313",
13
"clientType": "Nethermind",
14
"ethDetails": "eth65",
15
"lastSignal": "03/11/2021 12:33:58"
16
},
17
18
(...)
19
20
],
21
"id": 1
22
}
Copied!
PeerInfo
Field name
Type
ClientId
String
Host
String
Port
Quantity
Address
String
IsBootnode
Boolean
IsTrusted
Boolean
IsStatic
Boolean
Enode
String
ClientType
String
EthDetails
String
LastSignal
String

admin_removePeer

Removes given node.
Invocation
{"method":"admin_removePeer","params":[enode, removeFromStaticNodes]}
Parameter
Type
Description
enode
String
Given node
removeFromStaticNodes
Boolean
Removing from static nodes if true (optional)
Returned type
Description
String
Removed node
Example request of admin_removePeer
Example response of admin_removePeer
1
curl --data '{"method":"admin_removePeer","params":["enode://deed356ddcaa1eb33a859b818a134765fff2a3dd5cd5b3d6cbe08c9424dca53b9[email protected]85.221.141.144:30303", true],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Copied!
1
{
2
"jsonrpc": "2.0",
3
"result": "enode://deed356ddcaa1eb33a859b818a134765fff2a3dd5cd5b3d6cbe08c9424dca53b9[email protected]85.221.141.144:30303",
4
"id": 1
5
}
Copied!
Last modified 1mo ago