import { BaseWeb3Error } from '../web3_error_base.js'; export declare class ProviderError extends BaseWeb3Error { code: number; } export declare class InvalidProviderError extends BaseWeb3Error { clientUrl: string; code: number; constructor(clientUrl: string); } export declare class InvalidClientError extends BaseWeb3Error { code: number; constructor(clientUrl: string); } export declare class SubscriptionError extends BaseWeb3Error { code: number; } export declare class Web3WSProviderError extends BaseWeb3Error { code: number; } /** * Thrown when a JSON-RPC request exceeds its total deadline (`requestTimeout`). * * This covers the whole request lifetime, including any time spent waiting for a * connection to become available. It is distinct from {@link ConnectionTimeoutError}, * which only bounds the connect/handshake phase. */ export declare class RequestTimeoutError extends ProviderError { duration: number; method?: string | undefined; code: number; constructor(duration: number, method?: string | undefined); toJSON(): { duration: number; method: string | undefined; name: string; code: number; message: string; innerError: Error | Error[] | undefined; }; } /** * Thrown when a provider already has `maxInFlightRequests` requests outstanding. * * This error is retryable: the condition is transient backpressure, not a bad request. * Callers should back off and retry rather than treating it as a permanent failure. */ export declare class RequestQueueFullError extends ProviderError { maxInFlightRequests: number; code: number; readonly retryable = true; constructor(maxInFlightRequests: number); toJSON(): { maxInFlightRequests: number; retryable: boolean; name: string; code: number; message: string; innerError: Error | Error[] | undefined; }; } /** * Thrown when the runtime or an injected dependency cannot provide a capability that * is required to enforce a safety bound, so the provider fails closed rather than * silently dropping the bound. * * The motivating case: a custom `fetch` returns a non-empty response with no readable * body stream, which makes it impossible to enforce `maxResponseBytes` incrementally. * Falling back to an unbounded `response.text()` would defeat the bound entirely. */ export declare class ProviderCapabilityError extends ProviderError { capability: string; code: number; constructor(capability: string, reason?: string); toJSON(): { capability: string; name: string; code: number; message: string; innerError: Error | Error[] | undefined; }; }