import type { Agent, HttpAgentOptions } from "@dfinity/agent"; import type { DeciderClientOptions } from "../decider/prover.js"; import { HttpDeciderClient } from "../decider/prover.js"; import { StealthCanisterClient } from "./client.js"; export interface StealthClientConnectionOptions { icReplicaUrl: string; storageCanisterId: string; keyManagerCanisterId: string; agent?: Agent; agentOptions?: HttpAgentOptions; fetchRootKey?: boolean; } export declare function isLocalReplica(url: string): boolean; /** * Manager for caching StealthCanisterClient instances. */ export declare class StealthClientCacheManager { private readonly cache; /** * Gets or creates a cached stealth client. * If creation fails, the failed promise is removed from the cache to allow retry. */ getOrCreate(options: StealthClientConnectionOptions, cacheKey?: string): Promise; /** * Clears a specific entry or all entries from the cache. */ clear(key?: string): void; /** * Resets the cache to its initial empty state. * Alias for clear() - useful for testing. */ reset(): void; /** * Returns the number of cached entries. */ size(): number; /** * Returns true if the cache contains an entry for the given key. */ has(key: string): boolean; } /** * Manager for caching HttpDeciderClient instances. */ export declare class DeciderClientCacheManager { private readonly cache; /** * Gets or creates a cached decider client. */ getOrCreate(baseUrl: string, options?: DeciderClientOptions, cacheKey?: string): HttpDeciderClient; /** * Clears a specific entry or all entries from the cache. */ clear(key?: string): void; /** * Resets the cache to its initial empty state. * Alias for clear() - useful for testing. */ reset(): void; /** * Returns the number of cached entries. */ size(): number; /** * Returns true if the cache contains an entry for the given key. */ has(key: string): boolean; } /** * Creates a new stealth client without caching. */ export declare function createStealthClient(options: StealthClientConnectionOptions): Promise; //# sourceMappingURL=connections.d.ts.map