import { JsonRpcRequest, JsonRpcSuccessResponse } from "@cosmjs/json-rpc"; import { HttpEndpoint } from "./httpclient"; import { RpcClient } from "./rpcclient"; export interface HttpBatchClientOptions { /** Interval for dispatching batches (in milliseconds) */ dispatchInterval: number; /** Max number of items sent in one request */ batchSizeLimit: number; /** Timeout for HTTP requests in milliseconds. Set to undefined to disable timeout. */ httpTimeout?: number; } export declare class HttpBatchClient implements RpcClient { protected readonly url: string; protected readonly headers: Record | undefined; protected readonly options: HttpBatchClientOptions; private timer?; private readonly queue; constructor(endpoint: string | HttpEndpoint, options?: Partial); disconnect(): void; execute(request: JsonRpcRequest): Promise; private validate; /** * This is called in an interval where promise rejections cannot be handled. * So this is not async and HTTP errors need to be handled by the queued promises. */ private tick; }