import { Address } from "../core/address"; import { AccountOnNetwork } from "./accounts"; interface IAccountFetcher { getAccount(address: Address): Promise; } export declare class AccountAwaiter { private readonly fetcher; private readonly pollingIntervalInMilliseconds; private readonly timeoutIntervalInMilliseconds; private readonly patienceTimeInMilliseconds; /** * AccountAwaiter allows one to await until a specific event occurs on a given address. * * @param fetcher - Used to fetch the account of the network. * @param pollingIntervalInMilliseconds - The polling interval, in milliseconds. * @param timeoutIntervalInMilliseconds - The timeout, in milliseconds. * @param patienceTimeInMilliseconds - The patience, an extra time (in milliseconds) to wait, after the account has reached its desired condition. */ constructor(options: { fetcher: IAccountFetcher; pollingIntervalInMilliseconds?: number; timeoutIntervalInMilliseconds?: number; patienceTimeInMilliseconds?: number; }); /** * Waits until the condition is satisfied. * * @param address - The address to monitor. * @param condition - A callable that evaluates the desired condition. */ awaitOnCondition(address: Address, condition: (account: AccountOnNetwork) => boolean): Promise; private awaitConditionally; private _sleep; } export {};