import { AbortHandle } from '@splunkdlt/async-tasks';
import { EthRequest } from './requests';
import { EthereumTransport } from './transport';
interface BatchReq<P extends any[] = any[], R = any> {
    request: EthRequest<P, R>;
    callback: (error: Error | null, result: R) => void;
}
export declare function md5(data: Object | string): string;
export declare function executeBatchRequest(batch: BatchReq[], transport: EthereumTransport, abortHandle: AbortHandle, waitAfterFailure?: import("@splunkdlt/async-tasks").WaitTimeFn): Promise<void>;
export declare class EthereumClient {
    readonly transport: EthereumTransport;
    abortHandle: AbortHandle;
    constructor(transport: EthereumTransport);
    request<P extends any[], R>(req: EthRequest<P, R>, options?: {
        immediate?: boolean;
        ignoreErrors?: boolean;
    }): Promise<R>;
    requestBatch<P extends any[], R>(reqs: EthRequest<P, R>[]): Promise<R[]>;
}
export interface BatchedEthereumClientConfig {
    maxBatchTime: number;
    maxBatchSize: number;
}
export declare class BatchedEthereumClient extends EthereumClient {
    private config;
    private queue;
    private flushTimer;
    constructor(transport: EthereumTransport, config: BatchedEthereumClientConfig);
    request<P extends any[], R>(req: EthRequest<P, R>, { immediate }?: {
        immediate?: boolean;
    }): Promise<R>;
    private processQueue;
    private scheduleFlush;
}
export {};
