UNPKG

abstractionkit

Version:

Account Abstraction 4337 SDK by Candidelabs

25 lines 1.4 kB
import { Dictionary } from "./types"; export type BasicErrorCode = "UNKNOWN_ERROR" | "TIMEOUT" | "BAD_DATA" | "BUNDLER_ERROR" | "PAYMASTER_ERROR"; export type BundlerErrorCode = "INVALID_FIELDS" | "SIMULATE_VALIDATION" | "SIMULATE_PAYMASTER_VALIDATION" | "OPCODE_VALIDATION" | "EXPIRE_SHORTLY" | "REPUTATION" | "INSUFFICIENT_STAKE" | "UNSUPPORTED_SIGNATURE_AGGREGATOR" | "INVALID_SIGNATURE" | "INVALID_USEROPERATION_HASH" | "EXECUTION_REVERTED"; export type JsonRpcErrorCode = "PARSE_ERROR" | "INVALID_REQUEST" | "METHOD_NOT_FOUND" | "INVALID_PARAMS" | "INTERNAL_ERROR" | "SERVER_ERROR"; export declare const BundlerErrorCodeDict: Dictionary<BundlerErrorCode>; export declare const JsonRpcErrorDict: Dictionary<JsonRpcErrorCode>; type Jsonable = string | number | boolean | null | undefined | readonly Jsonable[] | { readonly [key: string]: Jsonable; } | { toJSON(): Jsonable; }; export declare class AbstractionKitError extends Error { readonly code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode; readonly context?: Jsonable; readonly errno?: number; constructor(code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode, message: string, options?: { cause?: Error; errno?: number; context?: Jsonable; }); stringify(): string; } export declare function ensureError(value: unknown): Error; export {}; //# sourceMappingURL=errors.d.ts.map