UNPKG

@pavlovcik/permit2-rpc-manager

Version:

Intelligent RPC manager with Permit2 validation and advanced fallback strategy

22 lines 830 B
import type { LatencyTestResult } from "./latency-tester.ts"; type LoggerFn = (level: "debug" | "info" | "warn" | "error", message: string, ...optionalParams: any[]) => void; interface ChainCache { fastestRpc: string | null; latencyMap: Record<string, LatencyTestResult>; lastTested: number; } type CacheData = Record<number, ChainCache>; /** * Node.js specific cache handler using the file system. * This is intended to be used internally or explicitly by Node applications. */ export declare class NodeCacheHandler { private nodeCachePath; private log; constructor(userPath?: string, logger?: LoggerFn); private _initializeNodePath; loadCacheFromFile(): Promise<CacheData>; saveCacheToFile(cacheData: CacheData): Promise<void>; } export {}; //# sourceMappingURL=cache-manager.node.d.ts.map