UNPKG

blockchain-api

Version:

API utilities for interacting with the Exatechl2 blockchain

45 lines (44 loc) 1.07 kB
export interface NetworkStats { total_transactions: string; total_blocks: number; last_block_number: string; average_block_time: string; transactions_per_second: string; today_transactions: string; new_contracts: number; active_validators: number; avg_txn_per_block: string; success_rate: string; tx_change_percent: number; blocks_change_percent: number; block_time_change_percent: number; tx_per_block_change_percent: number; } export interface IndexerStatus { last_indexed_block: string; current_block: number; is_syncing: boolean; sync_percentage: number; } export interface NetworkStatsResponse { stats: NetworkStats; latest_blocks: any[]; indexer: IndexerStatus; } /** * * @returns */ export declare function getNetworkStats(): Promise<NetworkStatsResponse>; /** * * @param value * @returns */ export declare function formatNumber(value: string | number): string; /** * * @param value * @returns */ export declare function formatPercentChange(value: number): string;