Info API
This API can be used to access basic information about the node.

Format

This API uses the json 2.0 RPC format. For more information on making JSON RPC calls, see here.

Endpoint

1
/ext/info
Copied!

API Methods

info.getBlockchainID

Given a blockchain’s alias, get its ID. (See admin.aliasChain.)

Signature

1
info.getBlockchainID({alias:string}) -> {blockchainID:string}
Copied!

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getBlockchainID",
5
"params": {
6
"alias":"X"
7
}
8
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"result" :{
5
"blockchainID":"sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM"
6
}
7
}
Copied!

info.getNetworkID

Get the ID of the network this node is participating in.

Signature

1
info.getNetworkID() -> {networkID:int}
Copied!

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getNetworkID"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"result" :{
5
"networkID":"2"
6
}
7
}
Copied!

info.getNetworkName

Get the name of the network this node is participating in.

Signature

1
info.getNetworkName() -> {networkName:string}
Copied!

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getNetworkName"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"result" :{
5
"networkName":"local"
6
}
7
}
Copied!

info.getNodeID

Get the ID of this node.

Signature

1
info.getNodeID() -> {nodeID: string}
Copied!

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getNodeID"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD"
5
},
6
"id": 1
7
}
Copied!

info.getNodeIP

Get the IP of this node.

Signature

1
info.getNodeIP() -> {ip: string}
Copied!

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getNodeIP"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"ip": "192.168.1.1:9651"
5
},
6
"id": 1
7
}
Copied!

info.getNodeVersion

Get the version of this node.

Signature

1
info.getNodeVersion() -> {
2
version: string,
3
databaseVersion: string,
4
gitCommit: string,
5
vmVersions: map[string]string,
6
}
Copied!
where:
    version is this node's version
    databaseVersion is the version of the database this node is using
    gitCommit is the Git commit that this node was built from
    vmVersions is map where each key/value pair is the name of a VM, and the version of that VM this node runs

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getNodeVersion"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"version": "avalanche/1.4.10",
5
"databaseVersion": "v1.4.5",
6
"gitCommit": "a3930fe3fa115c018e71eb1e97ca8cec34db67f1",
7
"vmVersions": {
8
"avm": "v1.4.10",
9
"evm": "v0.5.5-rc.1",
10
"platform": "v1.4.10"
11
}
12
},
13
"id": 1
14
}
Copied!

info.isBootstrapped

Check whether a given chain is done bootstrapping

Signature

1
info.isBootstrapped({chain: string}) -> {isBootstrapped: bool}
Copied!
chain is the ID or alias of a chain.

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.isBootstrapped",
5
"params": {
6
"chain":"X"
7
}
8
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"isBootstrapped": true
5
},
6
"id": 1
7
}
Copied!

info.peers

Get a description of peer connections.

Signature

1
info.peers({
2
nodeIDs: string[] // optional
3
}) ->
4
{
5
numPeers: int,
6
peers:[]{
7
ip: string,
8
publicIP: string,
9
nodeID: string,
10
version: string,
11
lastSent: string,
12
lastReceived: string
13
}
14
}
Copied!
    nodeIDs is an optional parameter to specify what nodeID'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.

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.peers",
5
"params": {
6
"nodeIDs": []
7
}
8
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"result" :{
5
"numPeers":3,
6
"peers":[
7
{
8
"ip":"206.189.137.87:9651",
9
"publicIP":"206.189.137.87:9651",
10
"nodeID":"NodeID-8PYXX47kqLDe2wD4oPbvRRchcnSzMA4J4",
11
"version":"avalanche/0.5.0",
12
"lastSent":"2020-06-01T15:23:02Z",
13
"lastReceived":"2020-06-01T15:22:57Z"
14
},
15
{
16
"ip":"158.255.67.151:9651",
17
"publicIP":"158.255.67.151:9651",
18
"nodeID":"NodeID-C14fr1n8EYNKyDfYixJ3rxSAVqTY3a8BP",
19
"version":"avalanche/0.5.0",
20
"lastSent":"2020-06-01T15:23:02Z",
21
"lastReceived":"2020-06-01T15:22:34Z"
22
},
23
{
24
"ip":"83.42.13.44:9651",
25
"publicIP":"83.42.13.44:9651",
26
"nodeID":"NodeID-LPbcSMGJ4yocxYxvS2kBJ6umWeeFbctYZ",
27
"version":"avalanche/0.5.0",
28
"lastSent":"2020-06-01T15:23:02Z",
29
"lastReceived":"2020-06-01T15:22:55Z"
30
}
31
]
32
}
33
}
Copied!

info.getTxFee

Get the fees of the network.

Signature

1
info.getTxFee() ->
2
{
3
creationTxFee: uint64,
4
txFee: uint64
5
}
Copied!
    creationTxFee is the fee for creating assets on the network.
    txFee is the fee for making transactions on the network.

Example Call

1
curl -X POST --data '{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"method" :"info.getTxFee"
5
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
Copied!

Example Response

1
{
2
"jsonrpc":"2.0",
3
"id" :1,
4
"result" :{
5
"creationTxFee": "10000000",
6
"txFee": "1000000"
7
}
8
}
Copied!
Last modified 3mo ago