import type { ViewStyle } from 'react-native'; import { type CreditCardInfo, type ThreeDSConfig, type ThreeDSResult } from './types'; export interface UseThreeDSecureReturn { /** * Render this component in your JSX tree. The 3DS WebView is hidden * until a challenge is triggered, but it must be mounted for device * data collection to work. */ Component: (props: { style?: ViewStyle; }) => React.JSX.Element; /** * Fetch a 3DS reference ID by performing device data collection. * Accepts either a TokenResult (from tokenize()) or a CreditCardId * (from Bolt's Add Card API — { id, expiration }). * THROWS ThreeDSError on failure — matches the web SDK behavior. */ fetchReferenceID: (creditCardInfo: CreditCardInfo) => Promise; /** * Trigger a 3DS challenge if the payment requires step-up authentication. * Returns ThreeDSResult with success/error — never throws. * Matches the web SDK behavior. */ challengeWithConfig: (orderToken: string, config: ThreeDSConfig) => Promise; } /** * Hook that creates a 3DS controller. * * Usage: * const threeDSecure = useThreeDSecure() * * const refId = await threeDSecure.fetchReferenceID({ token, bin, last4 }) * const result = await threeDSecure.challengeWithConfig(orderId, config) * if (!result.success) { console.error(result.error) } */ export declare const useThreeDSecure: () => UseThreeDSecureReturn; //# sourceMappingURL=useThreeDSecure.d.ts.map