import { JsonRpcProvider } from '@polkadot-api/json-rpc-provider'; export { JsonRpcProvider } from '@polkadot-api/json-rpc-provider'; declare enum WsEvent { CONNECTING = 0, CONNECTED = 1, ERROR = 2, CLOSE = 3 } type WsConnecting = { type: WsEvent.CONNECTING; uri: string; protocols?: string | string[]; }; type WsConnected = { type: WsEvent.CONNECTED; uri: string; protocols?: string | string[]; }; type WsError = { type: WsEvent.ERROR; event: any; }; type WsClose = { type: WsEvent.CLOSE; event: any; }; type StatusChange = WsConnecting | WsConnected | WsError | WsClose; type WsJsonRpcProvider = JsonRpcProvider & { switch: (uri?: string, protocol?: string[]) => void; getStatus: () => StatusChange; }; type WebSocketClass = typeof WebSocket; declare const getWsProvider: (endpoints: string | Array, config?: Partial<{ onStatusChanged: (status: StatusChange) => void; innerEnhancer: (input: JsonRpcProvider) => JsonRpcProvider; timeout: number; heartbeatTimeout: number; websocketClass: WebSocketClass; }>) => WsJsonRpcProvider; export { WsEvent, getWsProvider }; export type { StatusChange, WebSocketClass, WsClose, WsConnected, WsConnecting, WsError, WsJsonRpcProvider };