import type { Promisable } from '@ariestools/sdk';
/**
 * Async-safe cache of opened runtime connection handles (ethers providers, S3 clients,
 * RPC transports, …) keyed by connection name. Lives on `CreatableProviderContext` so
 * providers that self-provision from their bound connection share one handle per
 * connection instead of each opening their own.
 */
export interface ConnectionHandleCache {
    /** Returns get. */
    get(name: string): unknown;
    /** Returns or open. */
    getOrOpen<T>(name: string, open: () => Promisable<T>): Promise<T>;
    /** Updates set. */
    set(name: string, handle: unknown): void;
}
/** Default `ConnectionHandleCache` — creation is mutex-serialized so concurrent openers share one handle. */
export declare class SimpleConnectionHandleCache implements ConnectionHandleCache {
    private readonly cache;
    private readonly mutex;
    /** Returns get. */
    get(name: string): unknown;
    /** Returns or open. */
    getOrOpen<T>(name: string, open: () => Promisable<T>): Promise<T>;
    /** Updates set. */
    set(name: string, handle: unknown): void;
}
//# sourceMappingURL=ConnectionHandleCache.d.ts.map