UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

23 lines (22 loc) 982 B
import type { TFunction } from 'i18next'; import type { ErrorNotification } from '../components/FunNotification/FunNotification'; import type { Config, Connector } from '../wagmi/hooks'; export interface CheckoutConfirmationError extends ErrorNotification { durationMs?: number; code: ConfirmationErrorCode; } export declare enum ConfirmationErrorCode { QUOTE_EXPIRED = "QUOTE_EXPIRED", GENERIC_ERROR = "GENERIC_ERROR", WITHDRAWAL_RATE_LIMIT_EXCEEDED = "WITHDRAWAL_RATE_LIMIT_EXCEEDED", RISK_ERROR = "RISK_ERROR", SIGNATURE_DENIED = "SIGNATURE_DENIED", SWITCH_CHAIN_ERROR = "SWITCH_CHAIN_ERROR", WALLET_CLIENT_UNDEFINED = "WALLET_CLIENT_UNDEFINED", INSUFFICIENT_GAS = "INSUFFICIENT_GAS", POLYGON_RPC_ERROR = "POLYGON_RPC_ERROR" } export declare function toCheckoutConfirmationError(t: TFunction, error: unknown, wagmiConfig: Config, options?: { fromChainId?: string; connector?: Connector; }): Promise<CheckoutConfirmationError>;