import { TxEventMap, WsReadyState } from "./types"; declare type Listeners = { [K in keyof TxEventMap]?: TxEventMap[K][]; }; /** * TxTracer is almost same with the `TendermintTxTracer` in the @keplr-wallet/cosmos library. * Changes for some mistake on the original `TendermintTxTracer` and this would be remove if the changes are merged to the original library. */ export declare class TxTracer { protected readonly url: string; protected readonly wsEndpoint: string; protected readonly options: { wsObject?: new (url: string, protocols?: string | string[]) => WebSocket; }; protected ws: WebSocket; protected newBlockSubscribes: { handler: (block: any) => void; }[]; protected txSubscribes: Map; resolver: (data?: unknown) => void; rejector: (e: Error) => void; }>; protected pendingQueries: Map; resolver: (data?: unknown) => void; rejector: (e: Error) => void; }>; protected listeners: Listeners; constructor(url: string, wsEndpoint: string, options?: { wsObject?: new (url: string, protocols?: string | string[]) => WebSocket; }); protected getWsEndpoint(): string; open(): void; close(): void; get numberOfSubscriberOrPendingQuery(): number; get readyState(): WsReadyState; addEventListener(type: T, listener: TxEventMap[T]): void; protected readonly onOpen: (e: Event) => void; protected readonly onMessage: (e: MessageEvent) => void; protected readonly onClose: (e: CloseEvent) => void; /** * SubscribeBlock receives the handler for the block. * The handelrs shares the subscription of block. * @param handler * @return unsubscriber */ subscribeBlock(handler: (block: any) => void): () => void; protected sendSubscribeBlockRpc(): void; traceTx(query: Uint8Array | Record): Promise; subscribeTx(query: Uint8Array | Record): Promise; protected sendSubscribeTxRpc(id: number, params: Record): void; queryTx(query: Uint8Array | Record): Promise; protected query(method: string, params: Record): Promise; protected sendQueryRpc(id: number, method: string, params: Record): void; protected createRandomId(): number; } export {};