Info API
This API can be used to access basic information about the node.
This API set is for a specific node, it is unavailable on the public server.
Format#
This API uses the json 2.0 RPC format. For more information on making JSON RPC calls, see
here.
Endpoint#
_10/ext/info
Methods#
info.isBootstrapped#
Check whether a given chain is done bootstrapping
Signature:
_10info.isBootstrapped({chain: string}) -> {isBootstrapped: bool}
chain is the ID or alias of a chain.
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.isBootstrapped",_10 "params": {_10 "chain":"X"_10 }_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "result": {_10 "isBootstrapped": true_10 },_10 "id": 1_10}
info.getBlockchainID#
Given a blockchain’s alias, get its ID. (See admin.aliasChain.)
Signature:
_10info.getBlockchainID({alias:string}) -> {blockchainID:string}
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getBlockchainID",_10 "params": {_10 "alias":"X"_10 }_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "id": 1,_10 "result": {_10 "blockchainID": "sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM"_10 }_10}
info.getNetworkID#
Get the ID of the network this node is participating in.
Signature:
_10info.getNetworkID() -> {networkID:int}
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getNetworkID"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "id": 1,_10 "result": {_10 "networkID": "2"_10 }_10}
info.getNetworkName#
Get the name of the network this node is participating in.
Signature:
_10info.getNetworkName() -> {networkName:string}
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getNetworkName"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "id": 1,_10 "result": {_10 "networkName": "local"_10 }_10}
info.getNodeID#
Get the ID of this node.
Signature:
_10info.getNodeID() -> {_10 nodeID: string,_10 nodePOP: {_10 publicKey: string,_10 proofOfPossession: string_10 }_10}
nodeIDis this node's IDnodePOPis this node's BLS key and proof of possession
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getNodeID"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_11{_11 "jsonrpc": "2.0",_11 "result": {_11 "nodeID": "DijetsNode-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD",_11 "nodePOP": {_11 "publicKey": "0x8f95423f7142d00a48e1014a3de8d28907d420dc33b3052a6dee03a3f2941a393c2351e354704ca66a3fc29870282e15",_11 "proofOfPossession": "0x86a3ab4c45cfe31cae34c1d06f212434ac71b1be6cfe046c80c162e057614a94a5bc9f1ded1a7029deb0ba4ca7c9b71411e293438691be79c2dbf19d1ca7c3eadb9c756246fc5de5b7b89511c7d7302ae051d9e03d7991138299b5ed6a570a98"_11 }_11 },_11 "id": 1_11}
info.getNodeIP#
Get the IP of this node.
Signature:
_10info.getNodeIP() -> {ip: string}
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getNodeIP"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "result": {_10 "ip": "192.168.1.1:9651"_10 },_10 "id": 1_10}
info.getNodeVersion#
Get the version of this node.
Signature:
_10info.getNodeVersion() -> {_10 version: string,_10 databaseVersion: string,_10 gitCommit: string,_10 vmVersions: map[string]string,_10 rpcProtocolVersion: string,_10}
where:
versionis this node's versiondatabaseVersionis the version of the database this node is usinggitCommitis the Git commit that this node was built fromvmVersionsis map where each key/value pair is the name of a VM, and the version of that VM this node runsrpcProtocolVersionis the RPCChainVM protocol version
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getNodeVersion"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_15{_15 "jsonrpc": "2.0",_15 "result": {_15 "version": "dijets/1.9.1",_15 "databaseVersion": "v1.4.5",_15 "rpcProtocolVersion": "18",_15 "gitCommit": "79cd09ba728e1cecef40acd60702f0a2d41ea404",_15 "vmVersions": {_15 "avm": "v1.9.1",_15 "evm": "v0.11.1",_15 "platform": "v1.9.1"_15 }_15 },_15 "id": 1_15}
info.getTxFee#
Get the fees of the network.
Signature:
_12info.getTxFee() ->_12{_12 txFee: uint64,_12 createAssetTxFee: uint64,_12 createSubnetTxFee: uint64,_12 transformSubnetTxFee: uint64,_12 createBlockchainTxFee: uint64,_12 addPrimaryNetworkValidatorFee: uint64,_12 addPrimaryNetworkDelegatorFee: uint64,_12 addSubnetValidatorFee: uint64,_12 addSubnetDelegatorFee: uint64_12}
txFeeis the default fee for making transactions.createAssetTxFeeis the fee for creating a new asset.createSubnetTxFeeis the fee for creating a new Subnet.transformSubnetTxFeeis the fee for converting a PoA Subnet into a PoS Subnet.createBlockchainTxFeeis the fee for creating a new blockchain.addPrimaryNetworkValidatorFeeis the fee for adding a new primary network validator.addPrimaryNetworkDelegatorFeeis the fee for adding a new primary network delegator.addSubnetValidatorFeeis the fee for adding a new Subnet validator.addSubnetDelegatorFeeis the fee for adding a new Subnet delegator.
All fees are denominated in nDJT.
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getTxFee"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_15{_15 "jsonrpc": "2.0",_15 "id": 1,_15 "result": {_15 "txFee": "1000000",_15 "createAssetTxFee": "10000000",_15 "createSubnetTxFee": "1000000000",_15 "transformSubnetTxFee": "10000000000",_15 "createBlockchainTxFee": "1000000000",_15 "addPrimaryNetworkValidatorFee": "0",_15 "addPrimaryNetworkDelegatorFee": "0",_15 "addSubnetValidatorFee": "1000000",_15 "addSubnetDelegatorFee": "1000000"_15 }_15}
info.getVMs#
Get the virtual machines installed on this node.
Signature:
_10info.getVMs() -> {_10 vms: map[string][]string_10}
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.getVMs",_10 "params" :{}_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_14{_14 "jsonrpc": "2.0",_14 "result": {_14 "vms": {_14 "jvYyfQTxGMJLuGWa55kdP2p2zSUYsQ5Raupu4TW34ZAUBAbtq": ["avm"],_14 "mgj786NP7uDwBCcq6YwThhaN8FLyybkCa4zBWTQbNgmK6k9A6": ["evm"],_14 "qd2U4HDWUvMrVUeTcCHp6xH3Qpnn1XbU5MDdnBoiifFqvgXwT": ["nftfx"],_14 "rWhpuQPF1kb72esV2momhMuTYGkEb1oL29pt2EBXWmSy4kxnT": ["platform"],_14 "rXJsCSEYXg2TehWxCEEGj6JU2PWKTkd6cBdNLjoe2SpsKD9cy": ["propertyfx"],_14 "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ": ["secp256k1fx"]_14 }_14 },_14 "id": 1_14}
info.peers#
Get a description of peer connections.
Signature:
_17info.peers({_17 nodeIDs: string[] // optional_17}) ->_17{_17 numPeers: int,_17 peers:[]{_17 ip: string,_17 publicIP: string,_17 nodeID: string,_17 version: string,_17 lastSent: string,_17 lastReceived: string,_17 benched: string[],_17 observedUptime: int,_17 observedSubnetUptime: map[string]int,_17 }_17}
nodeIDsis an optional parameter to specify what DijetsNode ID's descriptions should be returned. If this parameter is left empty, descriptions for all active connections will be returned. If the node is not connected to a specified nodeID, it will be omitted from the response.ipis the remote IP of the peer.publicIPis the public IP of the peer.nodeIDis the prefixed Node ID of the peer.versionshows which version the peer runs on.lastSentis the timestamp of last message sent to the peer.lastReceivedis the timestamp of last message received from the peer.benchedshows chain IDs that the peer is being benched.observedUptimeis this node's primary network uptime, observed by the peer.observedSubnetUptimeis a map of Subnet IDs to this node's Subnet uptimes, observed by the peer.
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.peers",_10 "params": {_10 "nodeIDs": []_10 }_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_52{_52 "jsonrpc": "2.0",_52 "id": 1,_52 "result": {_52 "numPeers": 3,_52 "peers": [_52 {_52 "ip": "206.189.137.87:9651",_52 "publicIP": "206.189.137.87:9651",_52 "nodeID": "DijetsNode-8PYXX47kqLDe2wD4oPbvRRchcnSzMA4J4",_52 "version": "dijets/1.9.4",_52 "lastSent": "2020-06-01T15:23:02Z",_52 "lastReceived": "2020-06-01T15:22:57Z",_52 "benched": [],_52 "observedUptime": "99",_52 "observedSubnetUptimes": {},_52 "trackedSubnets": [],_52 "benched": []_52 },_52 {_52 "ip": "158.255.67.151:9651",_52 "publicIP": "158.255.67.151:9651",_52 "nodeID": "DijetsNode-C14fr1n8EYNKyDfYixJ3rxSAVqTY3a8BP",_52 "version": "dijets/1.9.4",_52 "lastSent": "2020-06-01T15:23:02Z",_52 "lastReceived": "2020-06-01T15:22:34Z",_52 "benched": [],_52 "observedUptime": "75",_52 "observedSubnetUptimes": {_52 "29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL": "100"_52 },_52 "trackedSubnets": [_52 "29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL"_52 ],_52 "benched": []_52 },_52 {_52 "ip": "83.42.13.44:9651",_52 "publicIP": "83.42.13.44:9651",_52 "nodeID": "DijetsNode-LPbcSMGJ4yocxYxvS2kBJ6umWeeFbctYZ",_52 "version": "dijets/1.9.3",_52 "lastSent": "2020-06-01T15:23:02Z",_52 "lastReceived": "2020-06-01T15:22:55Z",_52 "benched": [],_52 "observedUptime": "95",_52 "observedSubnetUptimes": {},_52 "trackedSubnets": [],_52 "benched": []_52 }_52 ]_52 }_52}
info.uptime#
Returns the network's observed uptime of this node.
Signature:
_10info.uptime({_10 subnetID: string // optional_10}) ->_10{_10 rewardingStakePercentage: float64,_10 weightedAveragePercentage: float64_10}
-
subnetIDis the Subnet to get the uptime of. If not provided, returns the uptime of the node on the primary network. -
rewardingStakePercentageis the percent of stake which thinks this node is above the uptime requirement. -
weightedAveragePercentageis the stake-weighted average of all observed uptimes for this node.
Example Call:
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.uptime"_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Response:
_10{_10 "jsonrpc": "2.0",_10 "id": 1,_10 "result": {_10 "rewardingStakePercentage": "100.0000",_10 "weightedAveragePercentage": "99.0000"_10 }_10}
Example Subnet Call
_10curl -X POST --data '{_10 "jsonrpc":"2.0",_10 "id" :1,_10 "method" :"info.uptime",_10 "params" :{_10 "subnetID":"29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL"_10 }_10}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Example Subnet Response
_10{_10 "jsonrpc": "2.0",_10 "id": 1,_10 "result": {_10 "rewardingStakePercentage": "74.0741",_10 "weightedAveragePercentage": "72.4074"_10 }_10}