/** * Enhanced Error Classification for LIT Protocol Operations * Provides detailed error categorization and specific retry strategies */ /** * Error categories for different types of failures */ export declare enum ErrorCategory { NETWORK = "network", PROTOCOL = "protocol", AUTHENTICATION = "authentication", RESOURCE = "resource", VALIDATION = "validation", TIMEOUT = "timeout", RATE_LIMIT = "rate_limit", CONFIGURATION = "configuration", UNKNOWN = "unknown" } /** * Retry strategy types */ export declare enum RetryStrategy { AGGRESSIVE = "aggressive",// Fast retries for transient issues CONSERVATIVE = "conservative",// Slower retries for resource issues EXPONENTIAL = "exponential",// Standard exponential backoff LINEAR = "linear",// Linear delay increase NONE = "none" } /** * Error classification result */ export interface ErrorClassification { category: ErrorCategory; retryStrategy: RetryStrategy; isRetryable: boolean; maxAttempts: number; baseDelayMs: number; maxDelayMs: number; description: string; troubleshooting?: string[]; } /** * Classify an error and determine retry strategy */ export declare function classifyError(error: any): ErrorClassification; /** * Get retry configuration from error classification */ export declare function getRetryConfigFromClassification(classification: ErrorClassification): { maxAttempts: number; initialDelayMs: number; maxDelayMs: number; backoffMultiplier: number; retryableErrors: string[]; }; /** * Enhanced error analyzer for detailed error information */ export declare function analyzeError(error: any): { originalError: any; errorMessage: any; errorStack: any; timestamp: string; retryConfig: { maxAttempts: number; initialDelayMs: number; maxDelayMs: number; backoffMultiplier: number; retryableErrors: string[]; }; category: ErrorCategory; retryStrategy: RetryStrategy; isRetryable: boolean; maxAttempts: number; baseDelayMs: number; maxDelayMs: number; description: string; troubleshooting?: string[]; }; /** * Create a human-readable error report */ export declare function createErrorReport(error: any): string; /** * LIT Protocol specific error matchers */ export declare const litProtocolErrors: { isNetworkError: (error: any) => boolean; isProtocolError: (error: any) => boolean; isAuthenticationError: (error: any) => boolean; isResourceError: (error: any) => boolean; isTimeoutError: (error: any) => boolean; isRateLimitError: (error: any) => boolean; isConfigurationError: (error: any) => boolean; isRetryable: (error: any) => boolean; }; //# sourceMappingURL=error-classification.d.ts.map