import { Web3Callback } from "../types"; /** * Helper for converting functions which take a callback as their final argument * to functions which return a promise. */ export declare function promisify(f: (callback: Web3Callback) => void): Promise; /** * Helper for converting functions which return a promise to functions which * take a callback as their final argument. */ export declare function callWhenDone(promise: Promise, callback: Web3Callback): void; export declare function delay(ms: number): Promise; export declare function withTimeout(promise: Promise, ms: number): Promise; export declare function withBackoffRetries(f: () => Promise, retryCount: number, shouldRetry?: (error: unknown) => boolean): Promise; export interface CancelToken { cancel(): void; isCancelled(): boolean; } export declare function makeCancelToken(): CancelToken; export declare function throwIfCancelled(isCancelled: () => boolean): void; export declare const CANCELLED: Error;