UNPKG

@funkit/connect

Version:

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

19 lines (18 loc) 1.44 kB
import type { IndexedDynamicRoutingConfig } from '@funkit/fun-relay'; import React from 'react'; import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods'; import type { AssetHoldingsItem } from '../../../domains/wallet'; import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown'; import { type DynamicTargetAssetCandidate } from '../../../providers/FunkitCheckoutContext'; import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition'; export type SelectAssetState = CheckoutModalCommonState & { paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo; }; export type SelectAssetNext = { paymentMethodInfo?: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo; disconnectedBrokerage?: boolean; transferToken?: TransferTokenDefault; }; export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>; export declare function SelectAsset({ modalState, onNext, onClose, }: ModalStepComponentProps<FunCheckoutStep.SELECT_ASSET>): React.JSX.Element; export declare function isTreatedAsNativeToken(apiKey: string, asset: AssetHoldingsItem, dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[], findDynamicPath: IndexedDynamicRoutingConfig[string]['findPath'], isUserSelected: boolean, isDirectTokenTransfer?: boolean): boolean;