Network information for blockchain connectivity and monitoring.
Remarks
Provides comprehensive details about the connected blockchain network,
including configuration URLs and real-time status. Use this information
to verify network connectivity, display network details to users, and
construct explorer links for transactions.
Example
// Get current network info constnetwork: NetworkInfo = awaitvana.protocol.getNetworkInfo();
console.log(`Connected to: ${network.chainName} (ID: ${network.chainId})`); console.log(`Current block: ${network.currentBlock}`);
// Check network health if (network.status !== 'healthy') { console.warn(`Network ${network.status}: consider switching RPC`); }
// Generate explorer link for transaction functiongetExplorerLink(txHash: string): string { if (!network.explorerUrl) { return`Transaction: ${txHash}`; } return`${network.explorerUrl}/tx/${txHash}`; }
Network information for blockchain connectivity and monitoring.
Remarks
Provides comprehensive details about the connected blockchain network, including configuration URLs and real-time status. Use this information to verify network connectivity, display network details to users, and construct explorer links for transactions.
Example