@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
29 lines (28 loc) • 1.54 kB
TypeScript
import type { Address } from 'viem';
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
import { LoginType } from '~/providers/GeneralWalletProvider';
import type { AssetHoldingsItem } from '~/utils/assets';
import { PaymentMethod } from '../domains/paymentMethods';
export declare const isStablecoin: (symbol: string) => boolean;
export declare function isNativeTokenAddress(address: Address): boolean;
export declare function isDefaultToken(asset: AssetHoldingsItem, checkoutConfig: FunkitCheckoutConfig): boolean;
export declare const isPolygonEcosystemToken: (chainId: string, tokenAddress: string) => boolean;
interface AssetUsableToPayParms {
config: FunkitCheckoutConfig;
payerAddress: string;
paymentMethod: PaymentMethod;
targetChainId: string;
targetTokenAddress: string;
assetChainId: string;
assetTokenAddress: string;
assetUsdAmount: number | null;
loginType: LoginType;
isAllowedForCheckout: boolean;
minValueThreshold?: number;
}
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, minValueThreshold, }: AssetUsableToPayParms) => {
isUsable: boolean;
reason: string;
};
export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
export {};