import { HexString } from '@dedot/utils'; import { SerdeEnum } from './serde.js'; /** * The type of a chain. * This can be used by tools to determine the type of a chain for * displaying additional information or enabling additional features. */ export type ChainType = SerdeEnum<{ /** * A development chain that runs mainly on one node. */ Development: void; /** * A local chain that runs locally on multiple nodes for testing purposes. */ Local: void; /** * A live chain. */ Live: void; /** * Some custom chain type. */ Custom: string; }>; export interface ChainProperties { isEthereum?: boolean; ss58Format?: number; tokenDecimals?: number | Array; tokenSymbol?: string | Array; [prop: string]: any; } /** * Health struct returned by the RPC */ export interface Health { peers: number; isSyncing: boolean; shouldHavePeers: boolean; } /** * The state of the syncing of the node. */ export interface SyncState { startingBlock: number; currentBlock: number; highestBlock: number; } /** * Network Peer information */ export interface PeerInfo { peerId: string; roles: string; bestHash: HexString; bestNumber: number; } /** * The role the node is running as */ export type NodeRole = SerdeEnum<{ Full: void; Authority: void; }>; export type NetworkState = Record;