UNPKG

@funkit/connect

Version:

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

19 lines (18 loc) 915 B
import { type FunAddress } from '@funkit/api-base'; import { CheckoutRefundState, CheckoutState } from '@funkit/api-base'; import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider'; export declare const hasRisk: (apiKey: string, walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => Promise<boolean>; export type CheckoutStatus = 'failed' | 'expired' | 'processing' | 'completed'; type CheckoutStateBooleans = { isProcessing: boolean; isCompleted: boolean; isError: boolean; isExpired: boolean; isFailed: boolean; isTerminal: boolean; /** won't have correct value if `refundState` is not passed into the hook */ isRefundProceeded: boolean; status: CheckoutStatus; }; export declare function getCheckoutStateBooleans(checkoutState: CheckoutState, refundState?: CheckoutRefundState): CheckoutStateBooleans; export {};