Util and Dashboard API
Tip
To enable the Util and/or Dashboard RPC API on the node, add the "util" and/or "dashboard" namespaces to "PublicModules" in node_config.json
.
util_getPoWNonce
Calculate the PoW nonce based on the difficulty. See here for more details.
- Parameters:
difficulty
:bigint string
PoW difficulty.hash
:hash
32-byte $Blake2b(address + previousHash)$ hash.
For example, if the address is "vite_ab24ef68b84e642c0ddca06beec81c9acb1977bbd7da27a87a" and the previousHash is "0000000000000000000000000000000000000000000000000000000000000000", then the hash is "8689fc3e7d0bcad0a1213fd90ab53437ce745408750f7303a16c75bad28da8c3".
- Returns:
base64
: Nonce.
Example
dashboard_processInfo
Get go-vite information
-
Parameters:
id
:string
Optional request id
-
Returns:
reqId
:string
Request idbuild_version
:string
Go-vite versioncommit_version
:string
Go-vite commit idnodeName
:string
Node namerewardAddress
:string
If the node has registered for full node reward program, this field is the address to receive rewards, otherwise returns an empty string.pid
:int
Go-vite process id
Example
dashboard_runtimeInfo
Get go-vite runtime information
-
Parameters:
id
:string
Optional request id
-
Returns:
reqId
:string
Request idpeersNum
:int
Number of connected peerssnapshotPendingNum
:uint64 string
Number of snapshot blocks in mempoolaccountPendingNum
:bigint string
Number of account blocks in mempoollatestSnapshot
:hashHeightTime
Hash
:string
Current snapshot block hashHeight
:uint64
Current snapshot block heightTime
:int64
Current snapshot block timestamp. In milliseconds.
updateTime
:int64
Node's time. In milliseconds.delayTime
:Array<int>
Block Propagate Latency. Seenet_nodeInfo
for detailsproducer
:address
Block creation address if the node is SBP. OptionalsignData
:hex
64 byte signature of the current snapshot block hash signed by node's PeerKey
Example
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"accountPendingNum": "0",
"delayTime": [
11659,
12311,
0,
0
],
"latestSnapshot": {
"Hash": "405ff8f0c48b838e293a640eccc13e3ce150fe7e472d8ccf6c87c09ff448a816",
"Height": 22655149,
"Time": 1661708711000
},
"peersNum": 2,
"producer": "vite_360232b0378111b122685a15e612143dc9a89cfa7e803f4b5a",
"reqId": "56678abcd",
"signData": "0x30b146b755c1b29ff3492df0ab079875a585fb4aa3080306149cfa1ef997f39f412f592058ed6b561f860300997c8620828d4830041a58177c760faed14af808",
"snapshotPendingNum": 0,
"updateTime": 1661708719144
}
}
dashboard_osInfo
Get node's operating system information
-
Parameters:
id
:string
Optional request id
-
Returns:
reqId
:string
Request idos
:string
Node's operating systemplatform
:string
Operating system platformplatformFamily
:string
Operating system familyplatformVersion
:string
Operating system versionkernelVersion
:string
Operating system kernel versionmemTotal
:uint64
Total memory. In bytesmemFree
:uint64
Free memory. In bytescpuNum
:int
Number of CPU coresgorountine
:int
Number of Go routines
Example
dashboard_netId
Get network id
-
Parameters: none
-
Returns:
string
Vite Network id. 1 is the mainnet.