Node administration
- Endpoint
http://127.0.0.1:3413/v2/owner- Credential
- HTTP Basic, username epic, password from ~/.epic/<network>/.api_secret
- Methods here
- 8
- Documented against
- node 4.0.3, wallet 4.0.0
get_status
Read onlySync state, connected peer count, the chain tip, and the supply figures the node reports.
- Surface
/v2/owneron port 3413- Parameters
- none
- Declared in
- api/src/owner_rpc.rs:73
- supply and max_supply are whole EPIC, not freemen, and blocks_to_next_halving counts reward steps that are not all halvings.
- total_difficulty is an object keyed by algorithm. A client expecting an integer fails to parse.
This method takes no parameters.
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_status",
"params": []
}{
"blocks_to_next_halving": 479521,
"connections": 0,
"max_supply": 21000000,
"protocol_version": 2,
"supply": 23024,
"sync_status": "no_sync",
"tip": {
"height": 1439,
"last_block_pushed": "9abbd80483f9b082a9362ebac0aba5619bdba7cf647cb15f5ed33102faf3cd1b",
"prev_block_to_last": "6ceed7ff0ff7da1d44b01dc03189edeb1323bfa6d3625768520dd1a0498a0735",
"total_difficulty": {
"cuckaroo": 1440,
"cuckatoo": 1440,
"progpow": 1440,
"randomx": 1440
}
},
"user_agent": "MW/Epic 4.0.3"
}get_connected_peers
Read onlyThe peers this node currently has a live connection to.
- Surface
/v2/owneron port 3413- Parameters
- none
- Declared in
- api/src/owner_rpc.rs:294
- Returns an empty array on a private chain with no peers, which is expected.
This method takes no parameters.
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_connected_peers",
"params": []
}[]get_peers
Read onlyEvery peer the node knows about, healthy, banned or defunct.
- Surface
/v2/owneron port 3413- Parameters
- 1 positional
- Declared in
- api/src/owner_rpc.rs:175
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_peers",
"params": [
null
]
}N/Aban_peer
Changes stateBan a peer address.
Changes how your node connects. Reversed by unban_peer.
- Surface
/v2/owneron port 3413- Parameters
- 1 positional
- Declared in
- api/src/owner_rpc.rs:324
{
"jsonrpc": "2.0",
"id": 1,
"method": "ban_peer",
"params": [
"1.2.3.4:3414"
]
}N/Aunban_peer
Changes stateLift a ban.
Changes how your node connects.
- Surface
/v2/owneron port 3413- Parameters
- 1 positional
- Declared in
- api/src/owner_rpc.rs:354
{
"jsonrpc": "2.0",
"id": 1,
"method": "unban_peer",
"params": [
"1.2.3.4:3414"
]
}N/Avalidate_chain
Read onlyRe-validate the chain the node holds.
Reads only, but it is expensive and can take a long time on mainnet.
- Surface
/v2/owneron port 3413- Parameters
- none
- Declared in
- api/src/owner_rpc.rs:103
This method takes no parameters.
{
"jsonrpc": "2.0",
"id": 1,
"method": "validate_chain",
"params": []
}N/Acompact_chain
DestructiveCompact the chain data, discarding what pruning allows.
Removes prunable history from local storage. The chain stays valid; a node in archive_mode should not do this.
- Surface
/v2/owneron port 3413- Parameters
- none
- Declared in
- api/src/owner_rpc.rs:133
This method takes no parameters.
{
"jsonrpc": "2.0",
"id": 1,
"method": "compact_chain",
"params": []
}N/Aget_onion_addresses
Read onlyThe node's own onion addresses, if it has any.
- Surface
/v2/owneron port 3413- Parameters
- none
- Declared in
- api/src/owner_rpc.rs:387
This method takes no parameters.
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_onion_addresses",
"params": []
}N/A