@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
23 lines (22 loc) • 874 B
TypeScript
import type { Address } from 'viem';
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
export interface PostCheckoutError extends ErrorNotification {
disableContinue: boolean;
durationMs?: number;
}
export interface PostCheckoutSuccessData {
depositAddress: Address;
paymentMethodInfo: PaymentMethodInfo;
}
interface UsePostCheckoutOptions {
onSuccess(data: PostCheckoutSuccessData): void;
}
interface UsePostCheckoutResult {
handlePostCheckout(depositAddress: Address): Promise<void>;
isPostCheckoutLoading: boolean;
postCheckoutError: PostCheckoutError | null;
postCheckoutStepMessage: string | null;
}
export declare function usePostCheckout({ onSuccess, }: UsePostCheckoutOptions): UsePostCheckoutResult;
export {};