/** * @name tools/adrena/adrena-rpc-fallback * @description Shared Solana RPC fallback for Adrena on-chain reads. * * The hosted gateway frequently runs from datacenter IPs that the public * mainnet RPC throttles with HTTP 426 (Upgrade Required). Read tools that * go through `context.connection` therefore fail with 426 even though the * logic is correct. This helper retries the same read across the configured * primary RPC and well-known public fallbacks so a single blocked endpoint * does not fail the whole tool call. * * @module tools/adrena/adrena-rpc-fallback */ import { Connection } from '@solana/web3.js'; import type { SapMcpContext } from '../../../core/src/types.js'; /** * Run an on-chain read against the context connection, retrying across * public RPC fallbacks when the primary endpoint fails (426/403/429/5xx or * network error). * @param context — SAP MCP context. * @param operation — Read to execute with each candidate connection. * @param label — Error label used when every endpoint fails. * @returns The first successful result. * @throws Aggregated error when all endpoints fail. */ export declare function withAdrenaConnectionFallback(context: SapMcpContext, operation: (connection: Connection, rpcUrl: string) => Promise, label?: string): Promise; //# sourceMappingURL=adrena-rpc-fallback.d.ts.map