Get Node Information
Obtaining a node's information allows you to gather important details about the node's current status and capabilities. By checking if a node is synced, you can ensure it has successfully synchronized with the network's latest state, providing accurate and up-to-date information.
Additionally, knowing which features are enabled on a node helps you understand its functionalities and capabilities, allowing you to make informed decisions on interacting with the node and utilizing its specific features.
Client in Wallet
If you are using a wallet you can always get the client by calling the client()
/getClient()
/get_client()
method
Example Code
- Rust
- Typescript (Node.js)
- Python
- Create a
Client
that will connect to the node defined in your.env
file'sNODE_URL
variable.
- Use the created client to get the information of the specified url using the
Client.get_info()
function.
- Create a
Client
that will connect to the node defined in your.env
file'sNODE_URL
variable.
- Use the created client to get the information of the specified url using the
Client.getInfo()
function.
- Create a
Client
that will connect to the node defined in your.env
file'sNODE_URL
variable.
- Use the created client to get the information of the specified url using the
Client.get_info()
function.
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/client/get_info.rs
loading...
bindings/nodejs/examples/how_tos/client/get-info.ts
loading...
bindings/python/examples/how_tos/client/get_info.py
loading...
Expected Output
- Rust
- Typescript (Node.js)
- Python
{
"name": "HORNET",
"version": "2.0.0-rc.6",
"status": {
"isHealthy": true,
"latestMilestone": {
"index": 5857259,
"timestamp": 1687786864,
"milestoneId": "0x4acfdc55bf4d7eab9e947cda3f6c4c88578c3fd59e44d3b461b706ef73186622"
},
"confirmedMilestone": {
"index": 5857259,
"timestamp": 1687786864,
"milestoneId": "0x4acfdc55bf4d7eab9e947cda3f6c4c88578c3fd59e44d3b461b706ef73186622"
},
"pruningIndex": 4749782
},
"supportedProtocolVersions": [
2
],
"protocol": {
"version": 2,
"networkName": "testnet-1",
"bech32Hrp": "rms",
"minPowScore": 1500,
"belowMaxDepth": 15,
"rentStructure": {
"vByteCost": 100,
"vByteFactorKey": 10,
"vByteFactorData": 1
},
"tokenSupply": "1450896407249092"
},
"pendingProtocolParameters": [],
"baseToken": {
"name": "Shimmer",
"tickerSymbol": "SMR",
"unit": "SMR",
"subunit": "glow",
"decimals": 6,
"useMetricPrefix": false
},
"metrics": {
"blocksPerSecond": 1.2,
"referencedBlocksPerSecond": 0.6,
"referencedRate": 50.0
},
"features": []
}
{
name: 'HORNET',
version: '2.0.0-rc.6',
status: {
isHealthy: true,
latestMilestone: {
index: 5792633,
timestamp: 1687456380,
milestoneId: '0x5d554e0c20779dae25288efefb33c385b11c2dc6088f9418d3a1fececa1385fc'
},
confirmedMilestone: {
index: 5792633,
timestamp: 1687456380,
milestoneId: '0x5d554e0c20779dae25288efefb33c385b11c2dc6088f9418d3a1fececa1385fc'
},
pruningIndex: 4750998
},
supportedProtocolVersions: [ 2 ],
protocol: {
version: 2,
networkName: 'testnet-1',
bech32Hrp: 'rms',
minPowScore: 1500,
belowMaxDepth: 15,
rentStructure: { vByteCost: 100, vByteFactorKey: 10, vByteFactorData: 1 },
tokenSupply: '1450896407249092'
},
pendingProtocolParameters: [],
baseToken: {
name: 'Shimmer',
tickerSymbol: 'SMR',
unit: 'SMR',
subunit: 'glow',
decimals: 6,
useMetricPrefix: false
},
metrics: {
blocksPerSecond: 1.4,
referencedBlocksPerSecond: 0.2,
referencedRate: 14.285714285714285
},
features: []
}
{
"name": "HORNET",
"version": "2.0.0-rc.6",
"status": {
"isHealthy": true,
"latestMilestone": {
"index": 5792633,
"timestamp": 1687456380,
"milestoneId": "0x5d554e0c20779dae25288efefb33c385b11c2dc6088f9418d3a1fececa1385fc"
},
"confirmedMilestone": {
"index": 5792633,
"timestamp": 1687456380,
"milestoneId": "0x5d554e0c20779dae25288efefb33c385b11c2dc6088f9418d3a1fececa1385fc"
},
"pruningIndex": 4750998
},
"supportedProtocolVersions": [
2
],
"protocol": {
"version": 2,
"networkName": "testnet-1",
"bech32Hrp": "rms",
"minPowScore": 1500,
"belowMaxDepth": 15,
"rentStructure": {
"vByteCost": 100,
"vByteFactorKey": 10,
"vByteFactorData": 1
},
"tokenSupply": "1450896407249092"
},
"pendingProtocolParameters": [],
"baseToken": {
"name": "Shimmer",
"tickerSymbol": "SMR",
"unit": "SMR",
"subunit": "glow",
"decimals": 6,
"useMetricPrefix": false
},
"metrics": {
"blocksPerSecond": 1.4,
"referencedBlocksPerSecond": 0.2,
"referencedRate": 14.285714285714285
},
"features": []
}