/** * Shared BlockRun Gateway HTTP client + short-TTL cache. * * Used by every BlockRun-backed fetcher (price, future OHLCV, etc). Mirrors * the shape of `coingecko/client.ts` so the two providers feel the same to * callers and tests. * * Chain-aware: base URL follows `loadChain()` — Base mainnet users hit * `blockrun.ai`, Solana users hit `sol.blockrun.ai`. Trading data endpoints * live under `/v1/*` (not `/api/v1`, which is the LLM proxy surface). * * PR 1 scope: free endpoints only (crypto / fx / commodity price). Paid * stocks endpoints (`/v1/stocks/{market}/price/{symbol}`) arrive in PR 2 * together with the x402 signing wrapper. */ import type { ProviderError } from '../standard-models.js'; export declare function cached(key: string, ttlMs: number, fn: () => Promise): Promise; /** For tests: wipe every cached entry. */ export declare function clearCache(): void; /** * Fire-and-parse: GET a BlockRun Gateway REST endpoint. Returns parsed JSON * or a structured ProviderError — never throws. Records latency + outcome * to the telemetry singleton so the Panel Markets page can show live health. */ export declare function blockrunGet(path: string, opts?: { endpoint: string; paid?: boolean; costUsd?: number; }): Promise; /** * GET a paid BlockRun Gateway endpoint with automatic x402 signing. * Returns parsed JSON or a structured ProviderError. Never throws. */ export declare function blockrunGetPaid(path: string, opts: { endpoint: string; costUsd: number; }): Promise; /** * Pyth-style symbols always end in `-USD`. Agents may pass `BTC` meaning * `BTC-USD`; normalize so both shapes work. */ export declare function normalizePythSymbol(ticker: string): string; /** TTLs chosen to match CoinGecko's; Pyth pushes more often but we don't * need sub-minute freshness for Franklin's agent cadence. */ export declare const TTL: { readonly price: number; readonly ohlcv: number; };