@funkit/connect-rn 11.1.0 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/dist/{chunk-QIDFAWW4.js → chunk-7SP2UUHA.js} +9 -2
- package/dist/chunk-7SP2UUHA.js.map +7 -0
- package/dist/{chunk-N626N462.js → chunk-AXAQRGDI.js} +2 -2
- package/dist/{chunk-S7UN7EKL.js → chunk-KRQW5S2X.js} +25 -25
- package/dist/chunk-KRQW5S2X.js.map +7 -0
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/nado.js +2 -2
- package/dist/index.js +28244 -21969
- package/dist/index.js.map +4 -4
- package/dist/preview.js +115 -7
- package/dist/preview.js.map +4 -4
- package/dist/src/fiat/common/FiatUnsupportedStep.d.ts.map +1 -1
- package/dist/src/fiat/contact/FiatContactScreen.d.ts.map +1 -1
- package/dist/src/fiat/contact/phoneRegionRedirect.d.ts +17 -0
- package/dist/src/fiat/contact/phoneRegionRedirect.d.ts.map +1 -0
- package/dist/src/fiat/contact/useRedirectHold.d.ts +31 -0
- package/dist/src/fiat/contact/useRedirectHold.d.ts.map +1 -0
- package/dist/src/fiat/entry/useCaptureHold.d.ts +1 -0
- package/dist/src/fiat/entry/useCaptureHold.d.ts.map +1 -1
- package/dist/src/fiat/kyc/kycCapture.d.ts.map +1 -1
- package/dist/src/fiat/kyc/kycForm.d.ts +1 -0
- package/dist/src/fiat/kyc/kycForm.d.ts.map +1 -1
- package/dist/src/fiat/kyc/useKycScreens.d.ts +1 -0
- package/dist/src/fiat/kyc/useKycScreens.d.ts.map +1 -1
- package/dist/src/fiat/otp/useFunSession.d.ts +3 -0
- package/dist/src/fiat/otp/useFunSession.d.ts.map +1 -1
- package/dist/src/fiat/payment/failoverKind.d.ts +10 -12
- package/dist/src/fiat/payment/failoverKind.d.ts.map +1 -1
- package/dist/src/fiat/payment/failoverPrompt.d.ts +2 -7
- package/dist/src/fiat/payment/failoverPrompt.d.ts.map +1 -1
- package/dist/src/fiat/payment/paymentReroute.d.ts +2 -0
- package/dist/src/fiat/payment/paymentReroute.d.ts.map +1 -1
- package/dist/src/fiat/payment/providerFailover.d.ts +20 -8
- package/dist/src/fiat/payment/providerFailover.d.ts.map +1 -1
- package/dist/src/fiat/payment/usePaymentFailureAnswer.d.ts +7 -6
- package/dist/src/fiat/payment/usePaymentFailureAnswer.d.ts.map +1 -1
- package/dist/src/fiat/providerFlow.d.ts +15 -3
- package/dist/src/fiat/providerFlow.d.ts.map +1 -1
- package/dist/src/fiat/providerFlows.d.ts.map +1 -1
- package/dist/src/fiat/providerHandoff.d.ts +10 -2
- package/dist/src/fiat/providerHandoff.d.ts.map +1 -1
- package/dist/src/fiat/providers/adapter.d.ts +2 -0
- package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
- package/dist/src/fiat/providers/applePayPaintGate.d.ts +4 -0
- package/dist/src/fiat/providers/applePayPaintGate.d.ts.map +1 -1
- package/dist/src/fiat/providers/checkout/statusScreens.d.ts +3 -1
- package/dist/src/fiat/providers/checkout/statusScreens.d.ts.map +1 -1
- package/dist/src/fiat/providers/checkout/useFiatNextApi.d.ts +4 -2
- package/dist/src/fiat/providers/checkout/useFiatNextApi.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/next/Checkout.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/next/useCoinbaseCheckout.d.ts +1 -1
- package/dist/src/fiat/providers/coinbase/next/useCoinbaseCheckout.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/errors.d.ts +12 -6
- package/dist/src/fiat/providers/moonpay/errors.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/events.d.ts +16 -1
- package/dist/src/fiat/providers/moonpay/events.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/fullCheckout/Checkout.d.ts +4 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/checkoutScreens.d.ts +12 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/checkoutScreens.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/{sdk → fullCheckout}/connection.d.ts +4 -2
- package/dist/src/fiat/providers/moonpay/fullCheckout/connection.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/{useCheckoutModel.d.ts → fullCheckout/useCheckoutModel.d.ts} +21 -10
- package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutModel.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/Checkout.d.ts +4 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/GuestPhone.d.ts +24 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/GuestPhone.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/checkoutScreens.d.ts +7 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/checkoutScreens.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/connection.d.ts +18 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/connection.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useCheckoutCalls.d.ts +13 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheck.d.ts +34 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheck.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheckoutModel.d.ts +66 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheckoutModel.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/index.d.ts +2 -0
- package/dist/src/fiat/providers/moonpay/index.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/moonpayPaymentDisclosures.d.ts +18 -4
- package/dist/src/fiat/providers/moonpay/moonpayPaymentDisclosures.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/ApplePayButton.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/Challenge.d.ts +10 -1
- package/dist/src/fiat/providers/moonpay/sdk/Challenge.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/deviceQuote.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/transaction.d.ts +7 -0
- package/dist/src/fiat/providers/moonpay/sdk/transaction.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/useReadiness.d.ts +2 -2
- package/dist/src/fiat/providers/moonpay/useReadiness.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/next/Checkout.d.ts +11 -0
- package/dist/src/fiat/providers/stripe/next/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/index.d.ts +4 -0
- package/dist/src/fiat/providers/stripe/next/index.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts +64 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts +10 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeExit.d.ts +15 -0
- package/dist/src/fiat/providers/stripe/next/useStripeExit.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts +4 -0
- package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts +23 -0
- package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeKycForm.d.ts +36 -0
- package/dist/src/fiat/providers/stripe/next/useStripeKycForm.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts +19 -0
- package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts +28 -0
- package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts +7 -0
- package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts +21 -0
- package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/stripeAccountCreation.d.ts +16 -0
- package/dist/src/fiat/providers/stripe/stripeAccountCreation.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts +34 -15
- package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts +6 -2
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts +2 -0
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useApplePayFirst.d.ts +17 -6
- package/dist/src/fiat/providers/stripe/useApplePayFirst.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeKycPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeState.d.ts.map +1 -1
- package/dist/src/fiat/quote/providerSelection.d.ts +6 -3
- package/dist/src/fiat/quote/providerSelection.d.ts.map +1 -1
- package/dist/src/fiat/surface/ScreenSurfaceCover.d.ts +6 -1
- package/dist/src/fiat/surface/ScreenSurfaceCover.d.ts.map +1 -1
- package/dist/src/fiat/useProviderCheckout.d.ts +3 -1
- package/dist/src/fiat/useProviderCheckout.d.ts.map +1 -1
- package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
- package/dist/src/flow/Drawer.d.ts.map +1 -1
- package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/FlowSheet.d.ts.map +1 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/entryBanners.d.ts +8 -1
- package/dist/src/flow/entryBanners.d.ts.map +1 -1
- package/dist/src/flow/fiatStepScreens.d.ts.map +1 -1
- package/dist/src/flow/fiatSubmitRenderer.d.ts.map +1 -1
- package/dist/src/flow/renderFiatFlowScreen.d.ts.map +1 -1
- package/dist/src/flow/screenBundles.d.ts +0 -1
- package/dist/src/flow/screenBundles.d.ts.map +1 -1
- package/dist/src/flow/sheetAccessibility.d.ts +21 -0
- package/dist/src/flow/sheetAccessibility.d.ts.map +1 -0
- package/dist/src/flow/sheetSizing.d.ts.map +1 -1
- package/dist/src/flow/useV2DepositEnabled.d.ts.map +1 -1
- package/dist/src/flow/v1DepositCustomers.d.ts +2 -0
- package/dist/src/flow/v1DepositCustomers.d.ts.map +1 -0
- package/dist/src/hooks/track/events.d.ts +1 -0
- package/dist/src/hooks/track/events.d.ts.map +1 -1
- package/dist/src/preview/fixtures/moonPayChallenge.d.ts +10 -0
- package/dist/src/preview/fixtures/moonPayChallenge.d.ts.map +1 -0
- package/dist/src/preview/flowPreview.d.ts +20 -1
- package/dist/src/preview/flowPreview.d.ts.map +1 -1
- package/dist/src/preview/replay/replayFetch.d.ts.map +1 -1
- package/dist/src/preview/scenarioCatalog.d.ts +18 -0
- package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
- package/dist/src/preview/scenarios.d.ts.map +1 -1
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
- package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-QIDFAWW4.js.map +0 -7
- package/dist/chunk-S7UN7EKL.js.map +0 -7
- package/dist/src/fiat/providers/moonpay/Checkout.d.ts +0 -4
- package/dist/src/fiat/providers/moonpay/Checkout.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/checkoutScreens.d.ts +0 -7
- package/dist/src/fiat/providers/moonpay/checkoutScreens.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/sdk/connection.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/unavailableAlert.d.ts +0 -11
- package/dist/src/fiat/providers/moonpay/unavailableAlert.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/useCheckoutCalls.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/useCheckoutModel.d.ts.map +0 -1
- package/dist/src/flow/v2DepositCustomers.d.ts +0 -2
- package/dist/src/flow/v2DepositCustomers.d.ts.map +0 -1
- /package/dist/{chunk-N626N462.js.map → chunk-AXAQRGDI.js.map} +0 -0
- /package/dist/src/fiat/providers/moonpay/{useCheckoutCalls.d.ts → fullCheckout/useCheckoutCalls.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/Checkout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,4BAA4B,CAAA;AAM5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAA;AAG5B,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,sCA8C1D;AAED,oHAAoH;AACpH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,mBAAmB,EAC1B,cAAc,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,GACzD,UAAU,GAAG,SAAS,CAqExB;AAED,yGAAyG;AACzG,wBAAgB,cAAc,CAC5B,KAAK,EAAE,mBAAmB,GACzB,UAAU,GAAG,SAAS,CAyHxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,6FAA6F;AAC7F,eAAO,MAAM,UAAU,EAAE,YAExB,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type FormValues, type StripeKycNextAction, type StripePrice, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import type { FeeQuote } from '../../../common/stepDetails';
|
|
3
|
+
import type { ProviderCheckoutProps } from '../../../providerFlow';
|
|
4
|
+
import { type ApplePaySelectionOutcome } from '../stripeApplePaySelection';
|
|
5
|
+
/**
|
|
6
|
+
* The fee line the amount screen shows: Stripe's own fees, never the backend's estimate. `undefined`
|
|
7
|
+
* for a fee that is not a finite, non-negative amount, so the line keeps the estimate.
|
|
8
|
+
*/
|
|
9
|
+
export declare function stripeFeeQuoteOf(price: StripePrice): FeeQuote | undefined;
|
|
10
|
+
/** Stripe's checkout, from the handed-off quote to the order. It runs the reducer, its calls and the SDK. */
|
|
11
|
+
export declare function useStripeCheckout({ quote, geo, slot, clientCapabilities, onOrder, onExit, onFeeQuote, analytics, onPaymentStarted, awaitsTap, depositAddress, }: ProviderCheckoutProps): {
|
|
12
|
+
acceptTerms: () => void;
|
|
13
|
+
/** The buyer's Continue on a held step: its screen takes over, and Link sign-in may start. */
|
|
14
|
+
releaseIdentity: () => void;
|
|
15
|
+
submitKyc: () => void;
|
|
16
|
+
contactPending: boolean;
|
|
17
|
+
/** The Apple Pay sheet asked first closed: its round opens, with the contact if one came. */
|
|
18
|
+
applePayAnswered: (quoteRef: string, outcome: ApplePaySelectionOutcome) => void;
|
|
19
|
+
/** Mounted under the failover sheet: nothing goes until the buyer's tap. */
|
|
20
|
+
tapAwaited: boolean;
|
|
21
|
+
tap: () => void;
|
|
22
|
+
retry: () => void;
|
|
23
|
+
payAgain: (orderId: string) => void;
|
|
24
|
+
exit: (reason: string) => void;
|
|
25
|
+
analytics: import("../../../../hooks/track/useProviderCheckoutEvents").ProviderCheckoutEvents;
|
|
26
|
+
applePayFirst: {
|
|
27
|
+
state: import("../stripeApplePaySelection").ApplePayFirst;
|
|
28
|
+
stateFor: (firstAsk: boolean) => import("../stripeApplePaySelection").ApplePayFirst;
|
|
29
|
+
markAsked: (quoteRef: string) => void;
|
|
30
|
+
};
|
|
31
|
+
readinessTiming: {
|
|
32
|
+
attemptId: string;
|
|
33
|
+
selectedAt: number;
|
|
34
|
+
};
|
|
35
|
+
identity: {
|
|
36
|
+
kycPushing: boolean;
|
|
37
|
+
kycPushError: string | undefined;
|
|
38
|
+
verifying: boolean;
|
|
39
|
+
submitKyc: (response: StripeKycNextAction, values: FormValues) => void;
|
|
40
|
+
verifyIdentity: () => void;
|
|
41
|
+
};
|
|
42
|
+
payment: {
|
|
43
|
+
collecting: boolean;
|
|
44
|
+
payWithApplePay: () => void;
|
|
45
|
+
};
|
|
46
|
+
geo: {
|
|
47
|
+
alpha2: string;
|
|
48
|
+
region?: string;
|
|
49
|
+
ip?: string;
|
|
50
|
+
};
|
|
51
|
+
identityHeld: boolean;
|
|
52
|
+
kycValues: FormValues;
|
|
53
|
+
reviewGaveUp: boolean;
|
|
54
|
+
setKycValues: import("react").Dispatch<import("react").SetStateAction<FormValues>>;
|
|
55
|
+
setSupportClosed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
56
|
+
slot: import("../../../providerFlow").ProviderSlot;
|
|
57
|
+
stage: StripeStage;
|
|
58
|
+
state: import("@funkit/connect-core").StripeCheckoutState;
|
|
59
|
+
stripe: import("../stripeOnramp").StripeOnrampClient | undefined;
|
|
60
|
+
supportClosed: boolean;
|
|
61
|
+
t: import("i18next").TFunction<"translation", undefined>;
|
|
62
|
+
};
|
|
63
|
+
export type StripeCheckoutModel = ReturnType<typeof useStripeCheckout>;
|
|
64
|
+
//# sourceMappingURL=useStripeCheckout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeCheckout.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,WAAW,EAKjB,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,KAAK,EAAgB,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAEhF,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAA;AAyBnC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,CAWzE;AAED,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,GAAG,EACH,IAAI,EACJ,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,cAAc,GACf,EAAE,qBAAqB;;IAuNpB,8FAA8F;;;;IAmB9F,6FAA6F;iCAChE,MAAM,WAAW,wBAAwB;IAUtE,4EAA4E;;;;wBAIxD,MAAM;mBAtJN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0K7B;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type StripeCall, type StripeCheckoutEvent, type StripeCheckoutState, type StripeStepResponse } from '@funkit/connect-core';
|
|
2
|
+
import { type Dispatch } from 'react';
|
|
3
|
+
import type { useFiatNextApi } from '../../checkout/useFiatNextApi';
|
|
4
|
+
/**
|
|
5
|
+
* Sends the request the state asks for and feeds back its answer, once per request: a retry is a
|
|
6
|
+
* new object with the same body. Also runs the `wait` before `observe` and the waits between the
|
|
7
|
+
* order's reads.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useStripeCheckoutCalls(state: StripeCheckoutState, dispatch: Dispatch<StripeCheckoutEvent>, context: ReturnType<typeof useFiatNextApi>, pollReview: boolean, onAnswer: (call: StripeCall, response: StripeStepResponse) => void, paused: boolean): void;
|
|
10
|
+
//# sourceMappingURL=useStripeCheckoutCalls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeCheckoutCalls.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeCheckoutCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAMxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,OAAO,CAAA;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAEnE;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,mBAAmB,EAC1B,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACvC,OAAO,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,EAC1C,UAAU,EAAE,OAAO,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,kBAAkB,KAAK,IAAI,EAClE,MAAM,EAAE,OAAO,QAuDhB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type StripeCheckoutExit, type StripeCheckoutState } from '@funkit/connect-core';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import type { ProviderCheckoutProps, ProviderExit } from '../../../providerFlow';
|
|
4
|
+
/** The one telemetry event per Stripe checkout that ends. */
|
|
5
|
+
export declare const STRIPE_CHECKOUT_EXIT_EVENT = "fiat:stripe_next_exit";
|
|
6
|
+
/** How the amount screen is told the checkout ended. */
|
|
7
|
+
export declare function stripeProviderExit(exit: StripeCheckoutExit, t: TFunction): ProviderExit;
|
|
8
|
+
/** Tells the amount screen once the checkout ended, with legacy's logs for how it ended. */
|
|
9
|
+
export declare function useStripeExit({ state, onExit, analytics, t, }: {
|
|
10
|
+
state: StripeCheckoutState;
|
|
11
|
+
onExit: ProviderCheckoutProps['onExit'];
|
|
12
|
+
analytics: ProviderCheckoutProps['analytics'];
|
|
13
|
+
t: TFunction;
|
|
14
|
+
}): void;
|
|
15
|
+
//# sourceMappingURL=useStripeExit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeExit.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeExit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAEzB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEhF,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,0BAA0B,CAAA;AAEjE,wDAAwD;AACxD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,kBAAkB,EACxB,CAAC,EAAE,SAAS,GACX,YAAY,CAsBd;AAED,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,SAAS,EACT,CAAC,GACF,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAA;IAC1B,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAA;IACvC,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAA;IAC7C,CAAC,EAAE,SAAS,CAAA;CACb,QA+CA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeFunnel.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeFunnel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,sBAAsB,CAAA;AAInE,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,QAcjD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type FormValues, type StripeCheckoutEvent, type StripeKycNextAction, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import { type Dispatch } from 'react';
|
|
3
|
+
import type { StripeOnrampClient } from '../stripeOnramp';
|
|
4
|
+
import { type StripeSignIn } from './useStripeSignIn';
|
|
5
|
+
/**
|
|
6
|
+
* The identity rounds on the device: each form's values pushed to Stripe before the backend hears
|
|
7
|
+
* of them, and Stripe's identity sheet after its intro.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useStripeIdentity({ stripe, stage, dispatch, signIn, }: {
|
|
10
|
+
stripe: StripeOnrampClient | undefined;
|
|
11
|
+
stage: StripeStage;
|
|
12
|
+
dispatch: Dispatch<StripeCheckoutEvent>;
|
|
13
|
+
signIn: StripeSignIn;
|
|
14
|
+
}): {
|
|
15
|
+
kycPushing: boolean;
|
|
16
|
+
kycPushError: string | undefined;
|
|
17
|
+
verifying: boolean;
|
|
18
|
+
/** Gives Stripe the form's values for the round, then tells the backend. */
|
|
19
|
+
submitKyc: (response: StripeKycNextAction, values: FormValues) => void;
|
|
20
|
+
/** Stripe's identity sheet, after the intro's Continue. A dismissal is a cancel, not a failure. */
|
|
21
|
+
verifyIdentity: () => void;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=useStripeIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeIdentity.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,QAAQ,EAAoB,MAAM,OAAO,CAAA;AAOvD,OAAO,KAAK,EAAE,kBAAkB,EAAoB,MAAM,iBAAiB,CAAA;AAQ3E,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,mBAAmB,CAAA;AAO7E;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAA;IACvC,MAAM,EAAE,YAAY,CAAA;CACrB;;;;IAmEG,4EAA4E;0BACtD,mBAAmB,UAAU,UAAU;IA2G7D,mGAAmG;;EAgEtG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FormValues, type StripeKycNextAction, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import type { ApplePayFirst } from '../stripeApplePaySelection';
|
|
3
|
+
/**
|
|
4
|
+
* The values in the KYC round's form. Each round starts from what Stripe already holds, then the
|
|
5
|
+
* buyer's Apple Pay contact under it: a round's answers are not carried into the next round's form.
|
|
6
|
+
*
|
|
7
|
+
* As legacy, a round those values answer whole is sent without its form, once: `open` runs as the
|
|
8
|
+
* round opens, from the event that opens it. While that send runs, `registering` keeps the form
|
|
9
|
+
* down; a refusal leaves it up for the buyer.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useStripeKycForm({ stage, identityHeld, applePayFirst, purchase, busy, }: {
|
|
12
|
+
stage: StripeStage;
|
|
13
|
+
identityHeld: boolean;
|
|
14
|
+
applePayFirst: ApplePayFirst;
|
|
15
|
+
/** The purchase the round is asked for: a round opens once per purchase. */
|
|
16
|
+
purchase: string;
|
|
17
|
+
/** The round's push or its `kyc` call is in flight. */
|
|
18
|
+
busy: boolean;
|
|
19
|
+
}): {
|
|
20
|
+
kycValues: FormValues;
|
|
21
|
+
setKycValues: import("react").Dispatch<import("react").SetStateAction<FormValues>>;
|
|
22
|
+
registering: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The round opens with `contact` under what Stripe holds. Answered whole, it goes through
|
|
25
|
+
* `submit` as the buyer's own, unless the kill switch is on or this round already opened.
|
|
26
|
+
*/
|
|
27
|
+
open: (response: StripeKycNextAction, contact: FormValues, submit: (values: FormValues) => void) => void;
|
|
28
|
+
};
|
|
29
|
+
/** The shared form's id for a Stripe KYC round, named by its round and fields. */
|
|
30
|
+
export declare function stripeKycFormId(response: {
|
|
31
|
+
round: string;
|
|
32
|
+
fields: {
|
|
33
|
+
id: string;
|
|
34
|
+
}[];
|
|
35
|
+
}): string;
|
|
36
|
+
//# sourceMappingURL=useStripeKycForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeKycForm.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeKycForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAM/D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,IAAI,GACL,EAAE;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,aAAa,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,IAAI,EAAE,OAAO,CAAA;CACd;;;;IA+DG;;;OAGG;qBAES,mBAAmB,WACpB,UAAU,UACX,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;EAqBzC;AAMD,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACzB,UAEA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type StripeCheckoutState, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import type { ProviderCheckoutProps } from '../../../providerFlow';
|
|
3
|
+
/**
|
|
4
|
+
* What the sheet around the checkout shows while an order may be paid: held so it cannot close on a
|
|
5
|
+
* payment, main's processing card while a paid order is read, and the order handed over at `done`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useStripeOrderSlot({ slot, state, stage, onOrder, attemptId, contactPending, }: {
|
|
8
|
+
slot: ProviderCheckoutProps['slot'];
|
|
9
|
+
state: StripeCheckoutState;
|
|
10
|
+
stage: StripeStage;
|
|
11
|
+
onOrder: ProviderCheckoutProps['onOrder'];
|
|
12
|
+
attemptId: string;
|
|
13
|
+
/** Apple Pay is asked before a form round, or that round is sent unseen. */
|
|
14
|
+
contactPending: boolean;
|
|
15
|
+
}): {
|
|
16
|
+
supportClosed: boolean;
|
|
17
|
+
setSupportClosed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useStripeOrderSlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeOrderSlot.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeOrderSlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAI7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAElE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,cAAc,GACf,EAAE;IACD,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IACnC,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAA;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,4EAA4E;IAC5E,cAAc,EAAE,OAAO,CAAA;CACxB;;;EAoEA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type FiatRouteContext, type StripeCheckoutEvent, type StripeCheckoutState, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import { type Dispatch } from 'react';
|
|
3
|
+
import type { StripeOnrampClient } from '../stripeOnramp';
|
|
4
|
+
import type { StripeSignIn } from './useStripeSignIn';
|
|
5
|
+
/**
|
|
6
|
+
* The payment on the device: Apple Pay's token chain for the priced order, then `performCheckout`
|
|
7
|
+
* for the order `pay` names, with the checkout callback answered from `/fiat/next`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useStripePayment({ stripe, stage, state, dispatch, context, signIn, paymentFailed, onPaymentStarted, quoteRef, subject, }: {
|
|
10
|
+
stripe: StripeOnrampClient | undefined;
|
|
11
|
+
stage: StripeStage;
|
|
12
|
+
state: StripeCheckoutState;
|
|
13
|
+
dispatch: Dispatch<StripeCheckoutEvent>;
|
|
14
|
+
context: FiatRouteContext;
|
|
15
|
+
signIn: StripeSignIn;
|
|
16
|
+
/** Nothing was charged: main's payment-failed sheet answers `code`. */
|
|
17
|
+
paymentFailed: (code: string) => void;
|
|
18
|
+
onPaymentStarted: () => void;
|
|
19
|
+
/** The purchase an Apple Pay selection made before the form pays, without a second sheet. */
|
|
20
|
+
quoteRef: string;
|
|
21
|
+
/** The buyer paying: another buyer's selection never pays. */
|
|
22
|
+
subject: string | undefined;
|
|
23
|
+
}): {
|
|
24
|
+
collecting: boolean;
|
|
25
|
+
/** The Apple Pay button's tap: Stripe's chain to a payment token for the priced order. */
|
|
26
|
+
payWithApplePay: () => void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useStripePayment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripePayment.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripePayment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,QAAQ,EAA+B,MAAM,OAAO,CAAA;AAKlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAMzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE;IACD,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,mBAAmB,CAAA;IAC1B,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAA;IACvC,OAAO,EAAE,gBAAgB,CAAA;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,uEAAuE;IACvE,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,6FAA6F;IAC7F,QAAQ,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;;IAiHG,0FAA0F;;EA6D7F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import type { ProviderCheckoutProps } from '../../../providerFlow';
|
|
3
|
+
/** How long a review is polled before it reads as on hold, as MoonPay's and Coinbase's. */
|
|
4
|
+
export declare const REVIEW_POLL_CAP_MS = 90000;
|
|
5
|
+
/** Whether an identity review outlasted its polling: the review screen then reads as on hold. */
|
|
6
|
+
export declare function useStripeReview(stage: StripeStage, analytics: ProviderCheckoutProps['analytics']): boolean;
|
|
7
|
+
//# sourceMappingURL=useStripeReview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeReview.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeReview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAA;AAIvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAElE,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,QAAS,CAAA;AAExC,iGAAiG;AACjG,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAAC,GAC5C,OAAO,CA8BT"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type StripeCheckoutEvent, type StripeLinkAuthToken, type StripeStage } from '@funkit/connect-core';
|
|
2
|
+
import { type Dispatch } from 'react';
|
|
3
|
+
import type { StripeOnrampClient } from '../stripeOnramp';
|
|
4
|
+
/** Redeems a prompt's `linkAuthToken` once; resolves whether the SDK signed in. */
|
|
5
|
+
export type StripeSignIn = (token: StripeLinkAuthToken | null) => Promise<boolean>;
|
|
6
|
+
/** Past its expiry, a credential cannot sign in: only the backend can hand a fresh one. */
|
|
7
|
+
export declare function stripeLinkTokenExpired(token: StripeLinkAuthToken): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Link sign-in on the device: the prompts' `linkAuthToken`s, redeemed once each, and the SDK's
|
|
10
|
+
* `authorize` for an `authorize` prompt's intent once the buyer asked to sign in.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useStripeSignIn({ stripe, stage, dispatch, held, onDismissed, }: {
|
|
13
|
+
stripe: StripeOnrampClient | undefined;
|
|
14
|
+
stage: StripeStage;
|
|
15
|
+
dispatch: Dispatch<StripeCheckoutEvent>;
|
|
16
|
+
/** The buyer has not asked for this step yet: nothing of Stripe's opens. */
|
|
17
|
+
held: boolean;
|
|
18
|
+
/** The buyer closed or declined Link's sheet: the next sign-in waits for their Continue again. */
|
|
19
|
+
onDismissed: () => void;
|
|
20
|
+
}): StripeSignIn;
|
|
21
|
+
//# sourceMappingURL=useStripeSignIn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStripeSignIn.d.ts","sourceRoot":"","sources":["../../../../../../src/fiat/providers/stripe/next/useStripeSignIn.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,OAAO,CAAA;AAKxD,OAAO,KAAK,EAAyB,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AA+BhF,mFAAmF;AACnF,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAA;AAErB,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAE1E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAA;IACvC,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAA;IACb,kGAAkG;IAClG,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,GAAG,YAAY,CAqIf"}
|
|
@@ -29,4 +29,20 @@ export declare function getPrefilledStripeFormData(stepResponse: FiatFlow['stepR
|
|
|
29
29
|
values: FormValues;
|
|
30
30
|
complete: boolean;
|
|
31
31
|
} | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* A Stripe round's values on legacy and `/fiat/next`: per field, what the backend holds wins over
|
|
34
|
+
* `deviceValues`, and a blank holds nothing. `complete` when they answer every required field, so
|
|
35
|
+
* the round can be sent without its form.
|
|
36
|
+
*/
|
|
37
|
+
export declare function stripeRoundPrefill(fields: readonly {
|
|
38
|
+
id: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
}[], held: {
|
|
41
|
+
readonly [id: string]: JsonValue | undefined;
|
|
42
|
+
}, deviceValues: FormValues): {
|
|
43
|
+
values: FormValues;
|
|
44
|
+
complete: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** Legacy names the account round `ACCOUNT_CREATION`; logs use `/fiat/next`'s `ACCOUNT` for both flows. */
|
|
47
|
+
export declare function stripeRoundName(round: unknown): string | undefined;
|
|
32
48
|
//# sourceMappingURL=stripeAccountCreation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripeAccountCreation.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeAccountCreation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAG3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAE5D;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,UAAU,EAClB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,sBAAsB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Q,EAAE,OAAO,CAAA;CAAE,EAAE,EACpD,IAAI,EAAE;IAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;CAAE,EACtD,YAAY,EAAE,UAAU,GACvB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAa3C;AAED,2GAA2G;AAC3G,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKlE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FiatClientCapability } from '@funkit/api-base';
|
|
2
|
-
import { type FiatFlow, type FormValues, type JsonValue } from '@funkit/connect-core';
|
|
2
|
+
import { type FiatFlow, type FormValues, type JsonValue, type StripeKycNextAction } from '@funkit/connect-core';
|
|
3
3
|
import type { StripeOnrampClient } from './stripeOnramp';
|
|
4
4
|
/**
|
|
5
5
|
* Where a Stripe form round stands on Apple Pay first:
|
|
@@ -13,32 +13,47 @@ export type ApplePayFirst = {
|
|
|
13
13
|
kind: 'ASK';
|
|
14
14
|
stripe: StripeOnrampClient;
|
|
15
15
|
subject: string;
|
|
16
|
-
|
|
16
|
+
purchase: ApplePayPurchase;
|
|
17
17
|
} | {
|
|
18
18
|
kind: 'COLLECTED';
|
|
19
19
|
contact: FormValues;
|
|
20
20
|
};
|
|
21
|
+
/** What the sheet opens for. `quoteRef` names the purchase: a selection pays only the one it names. */
|
|
22
|
+
export interface ApplePayPurchase {
|
|
23
|
+
quoteRef: string;
|
|
24
|
+
amount: string;
|
|
25
|
+
currencyCode: string;
|
|
26
|
+
}
|
|
27
|
+
/** Which checkout logged it, so Datadog tells legacy and `/fiat/next` apart. */
|
|
28
|
+
export interface StripeCheckoutLog {
|
|
29
|
+
checkoutFlow: 'legacy' | 'next';
|
|
30
|
+
/** The checkout's telemetry attempt, where the screen gave it one. */
|
|
31
|
+
checkoutAttemptId: string | undefined;
|
|
32
|
+
}
|
|
21
33
|
/**
|
|
22
34
|
* What a flow tells the server it can do. Only a host with a Stripe client can open the sheet, and
|
|
23
|
-
* the server
|
|
35
|
+
* the server asks no other client to open it first. Stable per client, as the flow needs.
|
|
24
36
|
*/
|
|
25
37
|
export declare function stripeClientCapabilities(stripe: StripeOnrampClient | undefined): readonly FiatClientCapability[];
|
|
26
38
|
/**
|
|
27
|
-
* Apple Pay opens before
|
|
28
|
-
*
|
|
29
|
-
* form exists to fix values Stripe refused.
|
|
39
|
+
* Apple Pay opens before the first ask of a round at Stripe's `l0`, which its contact answers whole.
|
|
40
|
+
* Never on a correction, since that form exists to fix values Stripe refused.
|
|
30
41
|
*/
|
|
31
|
-
export declare function applePayFirst({ stripe, subject,
|
|
42
|
+
export declare function applePayFirst({ stripe, subject, purchase, firstAsk, selection, askedFor, }: {
|
|
32
43
|
stripe: StripeOnrampClient | undefined;
|
|
33
44
|
subject: string | undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
purchase: ApplePayPurchase | undefined;
|
|
46
|
+
/** This round is that first ask: `legacyAsksApplePayFirst` or `nextAsksApplePayFirst`. */
|
|
47
|
+
firstAsk: boolean;
|
|
37
48
|
/** This buyer's selection for this purchase, from `applePaySelectionFor`. */
|
|
38
49
|
selection: ApplePaySelection | undefined;
|
|
39
50
|
/** The purchase the sheet last opened for: without a selection, the buyer dismissed it. */
|
|
40
51
|
askedFor: string | undefined;
|
|
41
52
|
}): ApplePayFirst;
|
|
53
|
+
/** Legacy: the backend marks that round's submit with `paymentSheetFirst`. */
|
|
54
|
+
export declare function legacyAsksApplePayFirst(stepResponse: FiatFlow['stepResponse'], params: Record<string, JsonValue> | undefined): boolean;
|
|
55
|
+
/** `/fiat/next`: the prompt itself says it is that round, as the backend's `paymentSheetFirst` rule reads it. */
|
|
56
|
+
export declare function nextAsksApplePayFirst({ tier, correctionRound, reask, fieldErrors, }: StripeKycNextAction): boolean;
|
|
42
57
|
/** Apple Pay approved on the device before a form round, waiting for checkout to spend it. Never sent to the backend. */
|
|
43
58
|
export interface ApplePaySelection {
|
|
44
59
|
/** Whose selection it is: the contact is that buyer's name and address. */
|
|
@@ -58,14 +73,18 @@ export type ApplePaySelectionSpend = {
|
|
|
58
73
|
kind: 'NONE';
|
|
59
74
|
} | {
|
|
60
75
|
kind: 'DROPPED';
|
|
61
|
-
reason: 'quote_mismatch' | 'amount_mismatch';
|
|
76
|
+
reason: 'subject_mismatch' | 'quote_mismatch' | 'amount_mismatch';
|
|
62
77
|
};
|
|
63
78
|
/**
|
|
64
|
-
* Spends the selection for a pay sheet of `amount` on purchase `quoteRef
|
|
65
|
-
*
|
|
66
|
-
*
|
|
79
|
+
* Spends the selection for a pay sheet of `amount` on purchase `quoteRef`, paid by `subject`. A
|
|
80
|
+
* selection pays only for the buyer who approved it, and never another purchase, even one of the
|
|
81
|
+
* same amount: the buyer confirms each purchase on its own sheet. Single use: Stripe spends the
|
|
82
|
+
* selection on the token, so a second sheet must collect again.
|
|
67
83
|
*/
|
|
68
|
-
export declare function spendApplePaySelection(stripe: StripeOnrampClient, amount: string,
|
|
84
|
+
export declare function spendApplePaySelection(stripe: StripeOnrampClient, amount: string, { subject, quoteRef, }: {
|
|
85
|
+
subject: string | undefined;
|
|
86
|
+
quoteRef: string | undefined;
|
|
87
|
+
}): ApplePaySelectionSpend;
|
|
69
88
|
export type ApplePaySelectionOutcome = {
|
|
70
89
|
kind: 'COLLECTED';
|
|
71
90
|
contact: FormValues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripeApplePaySelection.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeApplePaySelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"stripeApplePaySelection.d.ts","sourceRoot":"","sources":["../../../../../src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,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC/D,sBAAsB,CAkBxB;AAED,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAA;AAEtB;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,kBAAkB,EAC1B,EACE,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;CACrB,GACA,OAAO,CAAC,wBAAwB,CAAC,CA6DnC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Surface } from '@funkit/connect-core';
|
|
2
2
|
import type { SurfaceAdapter } from '../adapter';
|
|
3
3
|
import type { StripeOnrampClient } from './stripeOnramp';
|
|
4
|
+
import { type StripeCheckoutLog } from './stripeApplePaySelection';
|
|
4
5
|
interface StripePayParams {
|
|
5
6
|
action: 'CREATE_CRYPTO_PAYMENT_TOKEN';
|
|
6
7
|
walletAddress: string;
|
|
@@ -17,6 +18,9 @@ export interface StripeApplePayTap {
|
|
|
17
18
|
* selection pays only the purchase it was made for (`spendApplePaySelection`).
|
|
18
19
|
*/
|
|
19
20
|
quoteRef?: string;
|
|
21
|
+
/** Who is paying: a selection pays only for the buyer who approved it. */
|
|
22
|
+
subject: string | undefined;
|
|
23
|
+
log: StripeCheckoutLog;
|
|
20
24
|
seamlessClientSecret?: string;
|
|
21
25
|
seamlessExpiresAtMs?: number;
|
|
22
26
|
}
|
|
@@ -32,11 +36,11 @@ export declare function matchStripePayParams(surface: Surface): StripePayParams
|
|
|
32
36
|
*/
|
|
33
37
|
export declare const STRIPE_PAYMENT_CANCELLED = "collect_apple_pay:cancelled";
|
|
34
38
|
/** Stripe's real native sheet, deliberately restricted to Apple Pay. */
|
|
35
|
-
export declare function stripePaymentAdapter(stripe: StripeOnrampClient, response
|
|
39
|
+
export declare function stripePaymentAdapter(stripe: StripeOnrampClient, response: object, quoteRef: string | undefined, subject: string | undefined): SurfaceAdapter;
|
|
36
40
|
export declare function stripePaymentReport(token: string): {
|
|
37
41
|
cryptoPaymentToken: string;
|
|
38
42
|
};
|
|
39
43
|
export declare function stripePaymentErrorCode(error: unknown): string;
|
|
40
|
-
export declare function collectApplePay(stripe: StripeOnrampClient, params: StripePayParams, { quoteRef, seamlessClientSecret, seamlessExpiresAtMs, }
|
|
44
|
+
export declare function collectApplePay(stripe: StripeOnrampClient, params: StripePayParams, { quoteRef, subject, log, seamlessClientSecret, seamlessExpiresAtMs, }: StripeApplePayTap): Promise<string>;
|
|
41
45
|
export {};
|
|
42
46
|
//# sourceMappingURL=stripePayment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripePayment.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripePayment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAMnD,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAChE,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"stripePayment.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripePayment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAMnD,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAChE,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,gBAAgB,CAAA;AAYvB,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@@ -39,6 +39,7 @@ export declare function temporaryStripePushKey(kycRound: unknown, formId: unknow
|
|
|
39
39
|
export declare function stripePushFailureCopy(error: StripeOnrampError, copy: {
|
|
40
40
|
phoneSharingLimit: string;
|
|
41
41
|
rateLimited: string;
|
|
42
|
+
invalidPhone: string;
|
|
42
43
|
fallback: string;
|
|
43
44
|
}): string;
|
|
44
45
|
/**
|
|
@@ -47,6 +48,7 @@ export declare function stripePushFailureCopy(error: StripeOnrampError, copy: {
|
|
|
47
48
|
* either: it is only a wait, and the same push can pass once it is over.
|
|
48
49
|
*/
|
|
49
50
|
export declare function isStripePushRefusal(error: StripeOnrampError): boolean;
|
|
51
|
+
export declare function isStripeInvalidPhone(error: StripeOnrampError): boolean;
|
|
50
52
|
/**
|
|
51
53
|
* A registration the SDK will refuse every time, named as the code the failover is logged under.
|
|
52
54
|
* The SDK never looks up an Apple relay address (`@privaterelay.appleid.com`), so `registerLinkUser`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripeRoundPush.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeRoundPush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAIhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAM3E;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,GACd,EAAE;IACD,YAAY,EAAE,kBAAkB,GAAG,SAAS,CAAA;IAC5C,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;IACtC,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,OAAO,CAAA;CACvB,GACG;IACE,IAAI,EAAE,kBAAkB,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAClD,GACD,SAAS,CAsCZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,OAAO,GACd,MAAM,GAAG,SAAS,CAKpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"stripeRoundPush.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeRoundPush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAIhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAM3E;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,GACd,EAAE;IACD,YAAY,EAAE,kBAAkB,GAAG,SAAS,CAAA;IAC5C,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;IACtC,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,OAAO,CAAA;CACvB,GACG;IACE,IAAI,EAAE,kBAAkB,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAClD,GACD,SAAS,CAsCZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,OAAO,GACd,MAAM,GAAG,SAAS,CAKpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE;IACJ,iBAAiB,EAAE,MAAM,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,GACA,MAAM,CAYR;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAMrE;AASD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAItE;AAQD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,kBAAkB,GAAG,eAAe,EAC1C,KAAK,EAAE,iBAAiB,GACvB,2BAA2B,GAAG,SAAS,CAMzC;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,kBAAkB,GAAG,eAAe,EAC1C,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAKT"}
|
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type ApplePayFirst } from './stripeApplePaySelection';
|
|
1
|
+
import { type ApplePayFirst, type ApplePayPurchase, type ApplePaySelectionOutcome, type StripeCheckoutLog } from './stripeApplePaySelection';
|
|
3
2
|
import type { StripeOnrampClient } from './stripeOnramp';
|
|
4
3
|
/**
|
|
5
4
|
* Where the flow's Stripe round stands on Apple Pay first. The selection is read on every render
|
|
6
5
|
* rather than held in state: it lives with the SDK client, so a later round of the same purchase
|
|
7
6
|
* fills from it without opening the sheet again. `markAsked` records that the sheet opened for a
|
|
8
7
|
* purchase, so a buyer who dismissed it is asked once per purchase, not once per response.
|
|
8
|
+
* `stateFor` is the same reading for a round that opens in an event, before it renders.
|
|
9
9
|
*/
|
|
10
|
-
export declare function useApplePayFirst(
|
|
10
|
+
export declare function useApplePayFirst({ stripe, subject, purchase, firstAsk, }: {
|
|
11
|
+
stripe: StripeOnrampClient | undefined;
|
|
12
|
+
subject: string | undefined;
|
|
13
|
+
purchase: ApplePayPurchase | undefined;
|
|
14
|
+
firstAsk: boolean;
|
|
15
|
+
}): {
|
|
11
16
|
state: ApplePayFirst;
|
|
17
|
+
stateFor: (firstAsk: boolean) => ApplePayFirst;
|
|
12
18
|
markAsked: (quoteRef: string) => void;
|
|
13
19
|
};
|
|
14
20
|
/** Opens Apple Pay once from where the busy screen mounts it, then hands the round on. */
|
|
15
|
-
export declare function CollectApplePaySelection({ ask: { stripe, subject,
|
|
21
|
+
export declare function CollectApplePaySelection({ ask: { stripe, subject, purchase }, log, onDone, }: {
|
|
16
22
|
ask: Extract<ApplePayFirst, {
|
|
17
23
|
kind: 'ASK';
|
|
18
24
|
}>;
|
|
19
|
-
/**
|
|
20
|
-
|
|
25
|
+
/** The checkout and the form round the sheet opens before. */
|
|
26
|
+
log: StripeCheckoutLog & {
|
|
27
|
+
round: string | undefined;
|
|
28
|
+
tier: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
/** Called once the sheet closes, with or without a selection, unless the checkout closed first. */
|
|
31
|
+
onDone: (outcome: ApplePaySelectionOutcome) => void;
|
|
21
32
|
}): null;
|
|
22
33
|
//# sourceMappingURL=useApplePayFirst.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApplePayFirst.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/useApplePayFirst.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useApplePayFirst.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/useApplePayFirst.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EAIvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,MAAM,EA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CAAA;IAC5C,qEAAqE;IACrE,SAAS,EAAE,CAAC,IAAI,EAAE,gBAAgB,GAAG,SAAS,KAAK,OAAO,CAAA;IAC1D,gGAAgG;IAChG,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAA;CAC/D;qBA8ByB,UAAU,WAAW,MAAM,IAAI;;;;
|
|
1
|
+
{"version":3,"file":"useStripeKycPush.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/useStripeKycPush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACX,MAAM,sBAAsB,CAAA;AAM7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAUxD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,EAAE,QAAQ,CAAA;IACd,YAAY,EAAE,kBAAkB,GAAG,SAAS,CAAA;IAC5C,qEAAqE;IACrE,SAAS,EAAE,CAAC,IAAI,EAAE,gBAAgB,GAAG,SAAS,KAAK,OAAO,CAAA;IAC1D,gGAAgG;IAChG,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAA;CAC/D;qBA8ByB,UAAU,WAAW,MAAM,IAAI;;;;EAqIxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStripeState.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/useStripeState.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGxD,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,kBAAkB,GAAG,SAAS;;
|
|
1
|
+
{"version":3,"file":"useStripeState.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/useStripeState.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGxD,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,kBAAkB,GAAG,SAAS;;EAyD7C"}
|
|
@@ -3,9 +3,12 @@ import { type ProviderFailover } from '../payment/providerFailover';
|
|
|
3
3
|
/**
|
|
4
4
|
* Every source's say on each provider, folded into one disposition apiece.
|
|
5
5
|
*
|
|
6
|
-
* - Exclusion beats deferral: nothing
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* - Exclusion beats deferral and preference: nothing moves a provider already
|
|
7
|
+
* shut out.
|
|
8
|
+
* - A failover's target is preferred over the wallet's deferral: the buyer
|
|
9
|
+
* was sent there because it takes them.
|
|
10
|
+
* - Failovers apply in order, so a later prepaid card lifts an earlier closed
|
|
11
|
+
* sheet off a provider that takes it, and a later failure demotes a target.
|
|
9
12
|
*/
|
|
10
13
|
export declare function providerSelectionFor({ walletDeferred, undrawable, failovers, flowExited, }: {
|
|
11
14
|
walletDeferred: readonly FiatProvider[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerSelection.d.ts","sourceRoot":"","sources":["../../../../src/fiat/quote/providerSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,KAAK,gBAAgB,EAAY,MAAM,6BAA6B,CAAA;AAI7E
|
|
1
|
+
{"version":3,"file":"providerSelection.d.ts","sourceRoot":"","sources":["../../../../src/fiat/quote/providerSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,KAAK,gBAAgB,EAAY,MAAM,6BAA6B,CAAA;AAI7E;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAe,GAChB,EAAE;IACD,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,UAAU,EAAE,SAAS,YAAY,EAAE,CAAA;IACnC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC,qEAAqE;IACrE,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;CACrC,GAAG,iBAAiB,CAepB"}
|