UNPKG

@funkit/connect

Version:

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

17 lines (16 loc) 1.01 kB
import { type GetFopsResponse, type ThirdPartyPaymentConfigs } from '@funkit/api-base'; /** * Build the Swapped `thirdPartyPaymentConfigs` for a /fops request, shared by * `useFops` and `useWithdrawFops`. * * `prefillFiatEmail` is normalized + validated here, but the backend is the * authoritative validator: invalid emails are dropped (never block checkout) * and the email value is never logged (PII). */ export declare function buildSwappedThirdPartyPaymentConfigs(prefillFiatEmail: string | undefined, themeConfig: Record<string, string>, logTag: 'useFops' | 'useWithdrawFops'): ThirdPartyPaymentConfigs; export { FOPS_STALE_TIME, getFopsLimit, roundFopsLimit, sortFops, } from '@funkit/connect-core'; /** * Validates FOPs by checking icon URL, embedded flow URL, and payment group. * Deduplicates generic FOPs whose fopType already appears in saved FOPs. */ export declare function validateFops(res: GetFopsResponse, logTag: 'useFops' | 'useWithdrawFops' | 'useSwappedExchanges'): GetFopsResponse;