import { ApiRejectedDetails } from "./shared/api_response"; export type HttpErrorVariant = "Request" | "ServerError" | "RateLimited" | "Unauthorized" | "NotFound" | "BadRequest" | "Timeout" | "MaxRetriesExceeded"; export declare class HttpError extends Error { readonly variant: HttpErrorVariant; readonly status?: number; readonly body?: string; readonly retryAfterMs?: number; readonly attempts?: number; constructor(params: { variant: HttpErrorVariant; message: string; status?: number; body?: string; retryAfterMs?: number; attempts?: number; }); static request(message: string): HttpError; static timeout(): HttpError; static unauthorized(): HttpError; static notFound(body: string): HttpError; static badRequest(body: string): HttpError; static rateLimited(retryAfterMs?: number): HttpError; static serverError(status: number, body: string): HttpError; static maxRetriesExceeded(attempts: number, lastError: string): HttpError; } export type WsErrorVariant = "NotConnected" | "ConnectionFailed" | "SendFailed" | "DeserializationError" | "ProtocolError" | "Closed"; export declare class WsError extends Error { readonly variant: WsErrorVariant; readonly code?: number; constructor(variant: WsErrorVariant, message: string, code?: number); } export type AuthErrorVariant = "NotAuthenticated" | "LoginFailed" | "SignatureVerificationFailed" | "TokenExpired"; export declare class AuthError extends Error { readonly variant: AuthErrorVariant; constructor(variant: AuthErrorVariant, message: string); } export type SdkErrorVariant = "Http" | "Ws" | "Auth" | "Validation" | "Serde" | "MissingMarketContext" | "Signing" | "UserCancelled" | "ApiRejected" | "Program" | "Other"; export declare class SdkError extends Error { readonly variant: SdkErrorVariant; readonly causeError?: Error; readonly apiRejectedDetails?: ApiRejectedDetails; constructor(variant: SdkErrorVariant, message: string, causeError?: Error, apiRejectedDetails?: ApiRejectedDetails); static from(error: unknown): SdkError; static validation(message: string): SdkError; static serde(message: string): SdkError; static missingMarketContext(message: string): SdkError; static signing(message: string): SdkError; static userCancelled(): SdkError; static apiRejected(details: ApiRejectedDetails): SdkError; } //# sourceMappingURL=error.d.ts.map