import { ErrorCode, ErrorDetails, JSONValue } from "../interfaces"; export declare class RpcError extends Error { readonly code: ErrorCode; readonly details?: Record; readonly timestamp: string; readonly requestId?: string | number | null; readonly source?: string; readonly errorId: string; constructor({ message, code, details, requestId, source, }: { message: string; code: ErrorCode; details?: Record; requestId?: string | number | null; source?: string; }); toJSON(): ErrorDetails; static fromJSON(json: ErrorDetails): RpcError; } export declare class ErrorService { private static createError; static parseError(message?: string, details?: Record): RpcError; static invalidRequest(message?: string, details?: Record): RpcError; static methodNotFound(message?: string, details?: Record): RpcError; static invalidParams(message: string, field?: string, details?: Record): RpcError; static internalError(message?: string, details?: Record): RpcError; static requestTimeout(message?: string, details?: Record): RpcError; static extensionNotFound(message?: string, details?: Record): RpcError; static serviceUnavailable(message?: string, details?: Record): RpcError; static unauthorized(message?: string, details?: Record): RpcError; static forbidden(message?: string, details?: Record): RpcError; static rateLimited(message?: string, details?: Record): RpcError; static isRpcError(error: unknown): error is RpcError; static wrapError(error: unknown): RpcError; }