/** * @name McpSessionCache * @description Client-side MCP session cache for x402 paid calls. * * The x402 paid-call client otherwise creates a new MCP session on every call. * Reusing a short-lived initialized session reduces round trips without caching * live on-chain data, payment challenges, or signed payment payloads. * * Cache entries are scoped per endpoint and process. They do not persist across * restarts and are invalidated when a runtime reports session_not_found. */ /** * Get a cached session for an endpoint, or null if expired/missing. */ export declare function getCachedSession(endpoint: string): string | null; /** * Store a session in the cache. If the cache is full, evict the least-recently-used entry. */ export declare function cacheSession(endpoint: string, sessionId: string): void; /** * Invalidate a cached session (e.g. when the server returns 404 session_not_found). */ export declare function invalidateSession(endpoint: string): void; /** * Clear all cached sessions. */ export declare function clearSessionCache(): void; /** * Get cache stats for diagnostics. */ export declare function getSessionCacheStats(): { size: number; endpoints: string[]; }; //# sourceMappingURL=mcp-session-cache.d.ts.map