export interface RetryOptions { retryCount?: number; retryDelay?: number; } /** * Error type thrown by transports when the server explicitly rate-limits * the caller (HTTP 429 or a JSON-RPC error frame with code=429). Carries * the server's retry hint in milliseconds so `withRetry` can wait the * suggested amount instead of using exponential backoff. * * Sources of the hint (both honored by `withRetry`): * - HTTP: `retry-after-ms` header (priority) or `Retry-After` (sec→ms). * The ms variant carries sub-second precision where `Retry-After` * would round to 0 or 1. * - JSON-RPC error frame: `error.data.retry_after_ms`. */ export declare class RateLimitError extends Error { readonly retryAfterMs: number; readonly cause?: unknown; constructor(message: string, retryAfterMs: number, cause?: unknown); } /** * Execute an async function with retry. Exponential backoff by default; * if the thrown error is a `RateLimitError`, the server-supplied hint * replaces the backoff for that attempt (capped at MAX_RATE_LIMIT_DELAY_MS). */ export declare function withRetry(fn: () => Promise, options?: RetryOptions): Promise; //# sourceMappingURL=retry.d.ts.map