UNPKG

rango-types

Version:
43 lines 1.93 kB
export declare enum SignerErrorCode { REJECTED_BY_USER = "REJECTED_BY_USER", SIGN_TX_ERROR = "SIGN_TX_ERROR", SEND_TX_ERROR = "SEND_TX_ERROR", TX_FAILED_IN_BLOCKCHAIN = "TX_FAILED_IN_BLOCKCHAIN", OPERATION_UNSUPPORTED = "OPERATION_UNSUPPORTED", UNEXPECTED_BEHAVIOUR = "UNEXPECTED_BEHAVIOUR", NOT_IMPLEMENTED = "NOT_IMPLEMENTED" } export declare enum RPCErrorCode { REJECTION = "REJECTION", UNDER_PRICED = "UNDER_PRICED", OUT_OF_GAS = "OUT_OF_GAS", CALL_EXCEPTION = "CALL_EXCEPTION", INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", INTERNAL = "INTERNAL", SLIPPAGE = "SLIPPAGE", UNKNOWN_ERROR = "UNKNOWN" } export declare function isSignerErrorCode(value: string): value is SignerErrorCode; export declare function getDefaultErrorMessage(code: SignerErrorCode): string; export type SignerOperationName = 'executeEvmTransaction' | 'executeCosmosMessage' | 'executeSolanaTransaction' | 'executeTransfer' | 'executeStarknetTransaction' | 'executeTronTransaction' | 'signMessage'; export declare class SignerError extends Error { name: string; readonly code: SignerErrorCode; readonly root?: any; readonly rpcCode?: RPCErrorCode; context?: Record<string, unknown>; _isSignerError: boolean; constructor(code: SignerErrorCode, m?: string | undefined, root?: any, rpcCode?: RPCErrorCode, cause?: any, context?: Record<string, unknown>); static isSignerError(obj: unknown): obj is SignerError; static isRejectedError(error: any): boolean; static UnsupportedError(operation: SignerOperationName): SignerError; static UnimplementedError(operation: SignerOperationName): SignerError; static AssertionFailed(m: string): SignerError; getErrorContext(): Record<string, unknown>; getErrorDetail(): { code: SignerErrorCode; message: string; detail?: string | undefined; }; } //# sourceMappingURL=errors.d.ts.map