Skip to main content
Version: 2.0.0

admin namespace

admin_addPeer​

Adds the given node as a static peer. The connection is maintained for the lifetime of the process. Set persistent to also write the peer to static-nodes.json so it is restored on restart.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_addPeer",
"params": [enode, persistent]
}'

admin_addTrustedPeer​

Adds the given node to the trusted peer set so it can always connect even when slots are full. Set persistent to also write the peer to trusted-nodes.json so it is restored on restart.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_addTrustedPeer",
"params": [enode, persistent]
}'

admin_dataDir​

Returns the absolute path to the node's data directory.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_dataDir",
"params": []
}'

admin_exportEraHistory​

Exports a range of historic blocks in erae format.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_exportEraHistory",
"params": [destinationPath, from, to]
}'

admin_exportHistory​

Exports a range of historic block in era1 format.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_exportHistory",
"params": [destinationPath, from, to]
}'

admin_importEraHistory​

Imports a range of historic blocks from an erae directory.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_importEraHistory",
"params": [sourcePath, from, to, accumulatorFile]
}'

admin_importHistory​

Import a range of historic block from era1 directory.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_importHistory",
"params": [sourcePath, from, to, accumulatorFile]
}'

admin_isBlockProcessingPaused​

Returns whether local block processing is currently paused.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_isBlockProcessingPaused",
"params": []
}'

admin_isStateRootAvailable​

True if state root for the block is available

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_isStateRootAvailable",
"params": [block]
}'

admin_nodeInfo​

Displays relevant information about this node.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_nodeInfo",
"params": []
}'

admin_pauseBlockProcessing​

Pauses local block processing. Blocks received from the network or consensus client are still queued but not processed; call admin_resumeBlockProcessing to process the accumulated backlog. Use admin_isBlockProcessingPaused to query the state. Intended for testing and diagnostics.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_pauseBlockProcessing",
"params": []
}'

admin_peers​

Displays a list of connected peers including information about them.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_peers",
"params": [includeDetails]
}'

admin_prune​

Runs full pruning if enabled.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_prune",
"params": []
}'

admin_removePeer​

Removes the given node from the static peer set and disconnects any active session. Set persistent to also remove the peer from static-nodes.json so it is not restored on restart.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_removePeer",
"params": [enode, persistent]
}'

admin_removeTrustedPeer​

Removes the given node from the trusted peer set. Set persistent to also remove the peer from trusted-nodes.json so it is not re-trusted on restart.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_removeTrustedPeer",
"params": [enode, persistent]
}'

admin_resumeBlockProcessing​

Resumes local block processing previously paused via admin_pauseBlockProcessing, processing any blocks accumulated in the queue. Intended for testing and diagnostics.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_resumeBlockProcessing",
"params": []
}'

admin_subscribe​

Subscribes to a particular event over WebSocket. For every event that matches the subscription, a notification with event details and subscription id is sent to a client.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_subscribe",
"params": [subscriptionName, args]
}'

admin_unsubscribe​

Unsubscribes from a subscription. Returns true on success; if the subscription does not exist, a 'subscription not found' error is returned.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_unsubscribe",
"params": [subscriptionId]
}'

admin_verifyTrie​

Runs VerifyTrie.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "admin_verifyTrie",
"params": [block]
}'