@funkit/connect 13.2.0 → 13.3.2

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/{chunk-53FF4ZHH.js → chunk-SJ7E3DKC.js} +6 -0
  3. package/dist/{chunk-2RND3WWH.js → chunk-V4VFNIG4.js} +6 -0
  4. package/dist/clients/{chunk-44LV4GCX.js → chunk-2INCUCQQ.js} +1 -0
  5. package/dist/clients/chunk-6JL6PF5P.js +22 -0
  6. package/dist/clients/chunk-747THMHY.js +185 -0
  7. package/dist/clients/{chunk-Q4JGDB4L.js → chunk-BMU5EYUJ.js} +8 -24
  8. package/dist/clients/{chunk-T6YNXIOS.js → chunk-HBW7AZUH.js} +7 -5
  9. package/dist/clients/{chunk-4LM2J6AX.js → chunk-KDZFZETH.js} +168 -0
  10. package/dist/clients/{chunk-LNUR7YLW.js → chunk-PVBHWD47.js} +1 -1
  11. package/dist/clients/chunk-RNTQ7KEL.js +76 -0
  12. package/dist/clients/{chunk-PNYV3G5M.js → chunk-RTHDOT5K.js} +1 -1
  13. package/dist/clients/{chunk-3NHG6UYS.js → chunk-SKYQYPX5.js} +58 -2
  14. package/dist/clients/{chunk-AN6A4SB5.js → chunk-Z6FHIDTD.js} +5 -5
  15. package/dist/clients/fanatics.css +3136 -2947
  16. package/dist/clients/fanatics.js +1 -1
  17. package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
  18. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  19. package/dist/clients/internal/nado/withdrawalForm.js +12 -77
  20. package/dist/clients/internal/nado/withdrawalStatus.css +18233 -0
  21. package/dist/clients/internal/nado/withdrawalStatus.js +218 -20
  22. package/dist/clients/lighter.css +3519 -2947
  23. package/dist/clients/lighter.js +8 -10
  24. package/dist/clients/mallard.d.ts +17 -2
  25. package/dist/clients/mallard.js +5 -3
  26. package/dist/clients/nado.js +4 -4
  27. package/dist/clients/polymarket/createPolymarketDepositConfig.js +4 -3
  28. package/dist/clients/polymarket/index.js +9 -7
  29. package/dist/clients/polymarket/polymarket.js +6 -4
  30. package/dist/components/Box/Box.d.ts +18 -18
  31. package/dist/components/FunAsset/FunAssetItem.d.ts +3 -1
  32. package/dist/components/FunBadge/FunBadge.d.ts +1 -1
  33. package/dist/css/sprinkles.css.d.ts +24 -18
  34. package/dist/domains/clientMetadata.d.ts +1 -0
  35. package/dist/hooks/track/analytics/swappedIframeError.d.ts +0 -1
  36. package/dist/hooks/useHostDepositSettlement.d.ts +12 -0
  37. package/dist/index.css +3519 -2947
  38. package/dist/index.d.ts +3 -1
  39. package/dist/index.js +5790 -3907
  40. package/dist/modals/CheckoutModal/FiatV2/FiatV2Step.d.ts +10 -8
  41. package/dist/modals/CheckoutModal/FiatV2/fiatV2DepositInputs.d.ts +38 -0
  42. package/dist/modals/CheckoutModal/FiatV2/useFiatV2DepositInputs.d.ts +6 -0
  43. package/dist/modals/CheckoutModal/FiatV2/useFiatV2Text.d.ts +7 -0
  44. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -0
  45. package/dist/modals/CheckoutModal/SourceChange/fiatV2Reroute.d.ts +24 -0
  46. package/dist/modals/CheckoutModal/SourceChange/useAddCardRow.d.ts +4 -3
  47. package/dist/modals/CheckoutModal/SourceChange/useFiatV2Entry.d.ts +21 -0
  48. package/dist/providers/FunSessionContext.d.ts +20 -0
  49. package/dist/providers/FunkitCheckoutContext/index.d.ts +7 -1
  50. package/dist/providers/FunkitCheckoutContext/types.d.ts +30 -0
  51. package/dist/providers/FunkitProvider.d.ts +7 -0
  52. package/dist/providers/FunkitThemeProvider.d.ts +9 -0
  53. package/dist/shadow-css.js +1 -1
  54. package/dist/themes/darkTheme.js +1 -1
  55. package/dist/themes/lightTheme.js +1 -1
  56. package/dist/utils/localStorageFunSessionStorage.d.ts +9 -0
  57. package/dist/v2/components/PrimaryButton.css.d.ts +5 -0
  58. package/dist/v2/components/PrimaryButton.d.ts +16 -0
  59. package/dist/v2/components/Sheet.css.d.ts +13 -0
  60. package/dist/v2/components/Sheet.d.ts +23 -0
  61. package/dist/v2/components/Spinner.css.d.ts +2 -0
  62. package/dist/v2/components/Spinner.d.ts +6 -0
  63. package/dist/v2/flows/fiat/FiatDepositGate.d.ts +20 -0
  64. package/dist/v2/flows/fiat/FiatScreenPicker.d.ts +37 -0
  65. package/dist/v2/flows/funLogin/FunLoginScreenPicker.d.ts +30 -0
  66. package/dist/v2/screens/amount/AmountDisplay.css.d.ts +5 -0
  67. package/dist/v2/screens/amount/AmountDisplay.d.ts +15 -0
  68. package/dist/v2/screens/amount/AmountScreen.css.d.ts +2 -0
  69. package/dist/v2/screens/amount/AmountScreen.d.ts +37 -0
  70. package/dist/v2/screens/amount/PresetButton.css.d.ts +1 -0
  71. package/dist/v2/screens/amount/PresetButton.d.ts +9 -0
  72. package/dist/v2/screens/amount/fittedText/useFittedText.d.ts +19 -0
  73. package/dist/v2/screens/amount/fittedText/useIsomorphicEffect.d.ts +2 -0
  74. package/dist/v2/screens/amount/fittedText/useTextMeasurer.d.ts +3 -0
  75. package/dist/v2/screens/amount/typedAmount/amountText.d.ts +37 -0
  76. package/dist/v2/screens/amount/typedAmount/attachInputNormalization.d.ts +1 -0
  77. package/dist/v2/screens/funLogin/FunLoginCodeScreen.d.ts +35 -0
  78. package/dist/v2/screens/funLogin/FunLoginEmailScreen.d.ts +26 -0
  79. package/dist/v2/screens/funLogin/FunLoginScreen.css.d.ts +20 -0
  80. package/dist/v2/screens/funLogin/looksLikeEmail.d.ts +5 -0
  81. package/dist/v2/theme/colors.d.ts +28 -0
  82. package/dist/v2/theme/fonts.d.ts +9 -0
  83. package/dist/v2/theme/radii.d.ts +6 -0
  84. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  85. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  86. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  87. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  88. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  89. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  90. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  91. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  92. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  93. package/dist/wallets/walletConnectors/index.js +56 -56
  94. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  95. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  96. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  97. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  98. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  99. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  100. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  101. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  102. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  103. package/package.json +4 -4
  104. package/dist/clients/chunk-JXTKKLVA.js +0 -185
  105. package/dist/clients/chunk-PZSKO3BJ.js +0 -60
  106. package/dist/components/FunPayments/icons/coinbase.d.ts +0 -5
  107. package/dist/hooks/track/analytics/swappedIframePayload.d.ts +0 -1
  108. package/dist/wallets/walletConnectors/{chunk-CU5J53XR.js → chunk-53MYTA42.js} +3 -3
  109. package/dist/wallets/walletConnectors/{chunk-ZSSSLFQF.js → chunk-65ULY6OC.js} +3 -3
  110. package/dist/wallets/walletConnectors/{chunk-XODA5ESL.js → chunk-A5POD5SV.js} +3 -3
  111. package/dist/wallets/walletConnectors/{chunk-RXRYHMRI.js → chunk-ANODOMIN.js} +3 -3
  112. package/dist/wallets/walletConnectors/{chunk-IWOMSW64.js → chunk-ASTCNVJC.js} +3 -3
  113. package/dist/wallets/walletConnectors/{chunk-U52QO5HF.js → chunk-F45CUFRR.js} +3 -3
  114. package/dist/wallets/walletConnectors/{chunk-YRMBR6NA.js → chunk-FYPQ3HP4.js} +3 -3
  115. package/dist/wallets/walletConnectors/{chunk-BBDNB5TQ.js → chunk-IWPW26AL.js} +3 -3
  116. package/dist/wallets/walletConnectors/{chunk-4FHNLTR3.js → chunk-JJBLW4IU.js} +3 -3
  117. package/dist/wallets/walletConnectors/{chunk-NXWG6FG2.js → chunk-KE4CWI3A.js} +3 -3
  118. package/dist/wallets/walletConnectors/{chunk-BBB2J3US.js → chunk-MWB6LFSG.js} +3 -3
  119. package/dist/wallets/walletConnectors/{chunk-34B7OJNT.js → chunk-OVDCDVFX.js} +3 -3
  120. package/dist/wallets/walletConnectors/{chunk-SR5CZR3L.js → chunk-PPQ6L4K2.js} +3 -3
  121. package/dist/wallets/walletConnectors/{chunk-IA5432IR.js → chunk-RJF2YEZ5.js} +3 -3
  122. package/dist/wallets/walletConnectors/{chunk-RFCZYLNR.js → chunk-RQYEGJKL.js} +3 -3
  123. package/dist/wallets/walletConnectors/{chunk-TRZDAXCQ.js → chunk-TIHTQ3OB.js} +3 -3
  124. package/dist/wallets/walletConnectors/{chunk-ALGPGI6V.js → chunk-TM7UBV3Q.js} +3 -3
  125. package/dist/wallets/walletConnectors/{chunk-HOCKAU5H.js → chunk-USLZMUJ3.js} +3 -3
@@ -1,17 +1,19 @@
1
1
  import type { CheckoutModalCommonState } from '../stepTransition.shared';
2
2
  import type { FunCheckoutStep } from '../FunCheckoutStep';
3
3
  import type { ModalStepInfo } from '../stepTransition';
4
- export type FiatV2State = CheckoutModalCommonState;
4
+ /** The picker row that opened the step. Only Apple Pay has a V2 deposit today. */
5
+ export type FiatV2Method = 'apple_pay' | 'card';
6
+ export type FiatV2State = CheckoutModalCommonState & {
7
+ fiatV2Method: FiatV2Method;
8
+ };
5
9
  /**
6
- * The flow has no forward exit yet, and Back returns to the picker through
7
- * history. `null` makes the step's `onNext` uncallable on purpose, because
8
- * `onNext` below returns the state unchanged.
10
+ * The flow has no forward exit yet. `null` makes the step's `onNext`
11
+ * uncallable on purpose, because `onNext` below returns the state unchanged.
9
12
  */
10
13
  export type FiatV2Next = null;
11
14
  /**
12
- * The bridge from the V1 checkout modal into the V2 checkout, which arrives
13
- * with the FiatV2 payment method today. Every V2 screen renders under this one
14
- * step, so the V1 step registry and picker never branch on which V2 screen is
15
- * showing.
15
+ * The bridge from the V1 checkout modal into the V2 checkout. Every V2 screen renders under this
16
+ * one step, so the V1 step registry and picker never branch on which V2 screen is showing.
17
+ * - V2 screens draw their own title and close, so V1's top bar is hidden.
16
18
  */
17
19
  export declare const FiatV2StepInfo: ModalStepInfo<FunCheckoutStep.FIAT_V2>;
@@ -0,0 +1,38 @@
1
+ import type { FiatDepositGateProps } from '../../../v2/flows/fiat/FiatDepositGate';
2
+ /**
3
+ * The providers web runs: MoonPay (Jeremy's call). Its steps after the first request still need
4
+ * web components, so a deposit waits there until they land.
5
+ */
6
+ export declare const WEB_RUNNABLE_PROVIDERS: FiatDepositGateProps['runnable'];
7
+ /** Why the Apple Pay row keeps the Swapped flow instead of opening V2. */
8
+ export type FiatV2SkipReason = 'no_checkout' | 'no_recipient' | 'unmapped_destination' | 'no_geo';
9
+ export type FiatV2DepositInputs = {
10
+ kind: 'ready';
11
+ context: FiatDepositGateProps['context'];
12
+ runnable: FiatDepositGateProps['runnable'];
13
+ routing: Omit<FiatDepositGateProps['routing'], 'identityAssertionProvider'>;
14
+ } | {
15
+ kind: 'skip';
16
+ reason: FiatV2SkipReason;
17
+ };
18
+ export interface FiatV2CheckoutFacts {
19
+ targetChain: string;
20
+ targetAsset: string;
21
+ /** The wallet the deposit lands in, or null when none can receive on `targetChain`. */
22
+ recipient: string | null;
23
+ ipInfo: {
24
+ alpha2: string;
25
+ state: string;
26
+ } | undefined;
27
+ apiKey: string;
28
+ userId: string;
29
+ checkoutId: string;
30
+ }
31
+ /**
32
+ * What the V2 deposit needs from the V1 checkout, or why the checkout can't open it.
33
+ * - The destination is the token the provider buys. Only a target that is USDC on a chain the
34
+ * rail table lists maps. Any other target would need the backend to swap, which web does not
35
+ * ask for yet, so it keeps the Swapped flow.
36
+ * - The bearer is left out: the deposit gate supplies the Fun login as one provider instance.
37
+ */
38
+ export declare function fiatV2DepositInputsOf(facts: FiatV2CheckoutFacts): FiatV2DepositInputs;
@@ -0,0 +1,6 @@
1
+ import { type FiatV2DepositInputs } from './fiatV2DepositInputs';
2
+ /**
3
+ * What the V2 deposit needs from the open checkout, read where V1 keeps it. The Apple Pay row
4
+ * reads it to decide whether to open V2, and the V2 step reads it to mount the deposit.
5
+ */
6
+ export declare function useFiatV2DepositInputs(): FiatV2DepositInputs;
@@ -0,0 +1,7 @@
1
+ import type { AmountScreenText } from '../../../v2/screens/amount/AmountScreen';
2
+ import type { FunLoginText } from '../../../v2/flows/funLogin/FunLoginScreenPicker';
3
+ /** The V2 deposit's strings in the buyer's language. V2 can't import V1's translate function (R1). */
4
+ export declare function useFiatV2Text(): {
5
+ amount: AmountScreenText;
6
+ login: FunLoginText;
7
+ };
@@ -8,6 +8,7 @@ import { type MultiSourceWithdrawalConfig, type SingleWithdrawalConfig } from '.
8
8
  import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
9
9
  import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
10
10
  import type { SwappedMode } from '../../../providers/SwappedProvider';
11
+ import type { FiatV2Method } from '../FiatV2/FiatV2Step';
11
12
  export type SourceChangeState = CheckoutModalCommonState & {
12
13
  paymentMethodInfo: ConnectablePaymentMethodInfo | null;
13
14
  /** Persisted payment method type filter (crypto/fiat tab) */
@@ -62,6 +63,7 @@ export type SourceChangeNext = {
62
63
  } | {
63
64
  /** Open the V2 checkout with FiatV2 from its picker row. */
64
65
  fiatV2: true;
66
+ fiatV2Method: FiatV2Method;
65
67
  } | {
66
68
  /** Enter the cashier withdrawal flow with a resolved single-method config. */
67
69
  withdraw: true;
@@ -0,0 +1,24 @@
1
+ import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
2
+ import type { FiatV2DepositInputs, FiatV2SkipReason } from '../FiatV2/fiatV2DepositInputs';
3
+ export type FiatV2Reroute =
4
+ /** Not an Apple Pay deposit with the gate on: the row works as before, with nothing to log. */
5
+ {
6
+ kind: 'not_eligible';
7
+ } | {
8
+ kind: 'reroute';
9
+ }
10
+ /** An Apple Pay deposit V2 can't serve: Swapped opens as before, and the reason is logged. */
11
+ | {
12
+ kind: 'skip';
13
+ reason: FiatV2SkipReason;
14
+ };
15
+ /**
16
+ * Whether the Apple Pay row opens the V2 deposit instead of Swapped's. Only a deposit, only with
17
+ * the Web V2 gate on, and only when V2 has every input it needs.
18
+ */
19
+ export declare function fiatV2RerouteOf({ isGateOn, tab, fopType, inputs, }: {
20
+ isGateOn: boolean;
21
+ tab: PaymentMethodType;
22
+ fopType: string;
23
+ inputs: FiatV2DepositInputs;
24
+ }): FiatV2Reroute;
@@ -1,10 +1,11 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
3
3
  /**
4
- * The only place the V1 picker reads the FiatV2 gate. Returns the
5
- * "Add a card" row, or null when the gate is off so the picker is unchanged.
4
+ * The "Add a card" row, or null when the Web V2 gate is off so the picker is
5
+ * unchanged. The picker reads the gate once and passes it in.
6
6
  */
7
- export declare function useAddCardRow({ isDisabled, isSwappedEnabled, tab, onOpen, }: {
7
+ export declare function useAddCardRow({ isEnabled, isDisabled, isSwappedEnabled, tab, onOpen, }: {
8
+ isEnabled: boolean;
8
9
  isDisabled: boolean;
9
10
  isSwappedEnabled: boolean;
10
11
  tab: PaymentMethodType;
@@ -0,0 +1,21 @@
1
+ import type { SwappedFormOfPayment } from '@funkit/api-base';
2
+ import type { ReactNode } from 'react';
3
+ import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
4
+ import type { FiatV2Method } from '../FiatV2/FiatV2Step';
5
+ /**
6
+ * The picker's ways into the V2 deposit, behind its one read of the Web V2 gate: the "Add a card"
7
+ * row, and the Apple Pay row sent to V2 instead of Swapped.
8
+ * - `openedV2` decides at the click and logs it, so a row that renders logs nothing.
9
+ * - A row sent to V2 still counts as a method selection, with no rail: Swapped never runs.
10
+ */
11
+ export declare function useFiatV2Entry({ isDisabled, isSwappedEnabled, tab, onOpen, }: {
12
+ isDisabled: boolean;
13
+ isSwappedEnabled: boolean;
14
+ tab: PaymentMethodType;
15
+ /** Opens the V2 step for the row's method. */
16
+ onOpen: (method: FiatV2Method) => void;
17
+ }): {
18
+ addCardRow: ReactNode | null;
19
+ /** Opens V2 and returns true when this Apple Pay click belongs there. */
20
+ openedV2: (fop: SwappedFormOfPayment) => boolean;
21
+ };
@@ -0,0 +1,20 @@
1
+ import { type FunSessionStorage, type FunSessionStore } from '@funkit/connect-core';
2
+ import React, { type ReactNode } from 'react';
3
+ /** Ends Fun's login for `owner`, the current user by default. Never rejects. */
4
+ export type FunSignOut = (owner?: string) => Promise<void>;
5
+ /** Fun's login for the current user: the store the web fiat flow signs in with and sends. */
6
+ export declare function useFunSessionStore(): FunSessionStore | undefined;
7
+ /** Ends Fun's login: outside a `FunkitProvider` there is none, so it does nothing. */
8
+ export declare function useFunSignOut(): FunSignOut;
9
+ /**
10
+ * Holds Fun's login, one store per API key and user, for the provider's life.
11
+ * - A login lasts up to a year, longer than any checkout, so it lives here and not in a flow.
12
+ * - Nothing is restored here: the fiat flow restores the login when a checkout needs it.
13
+ * - A user switched back to gets the same store, since a second one could spend a refresh handle
14
+ * the first is still refreshing with.
15
+ * - Without a known user the login stays in memory, so two users never share one stored login.
16
+ */
17
+ export declare function FunSessionProvider({ storage, children, }: {
18
+ storage: FunSessionStorage;
19
+ children: ReactNode;
20
+ }): React.JSX.Element;
@@ -4,6 +4,7 @@ import type { Address, Hex } from 'viem';
4
4
  import { type ApplyDynamicRoutingPath } from '../../domains/dynamicRouting';
5
5
  import { type PaymentMethodInfo } from '../../domains/paymentMethods';
6
6
  import type { AssetHoldingsItem } from '../../utils/assets';
7
+ import { type FunSignOut } from '../FunSessionContext';
7
8
  import type { WithdrawalClient, WithdrawalSignContext, WithdrawalTransaction } from '../../wallets/Wallet';
8
9
  import { type FunkitCheckoutQuoteResult } from '../FunkitHistoryContext';
9
10
  import type { DynamicTargetAssetCandidate, FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, FunkitWithdrawalConfig, MultiSourceWithdrawalConfig, PolymarketPerpsTransferPending, SingleWithdrawalConfig, UseFunkitCheckoutProps, UseFunkitCheckoutPropsWithFullConfig } from './types';
@@ -98,17 +99,22 @@ export declare function CheckoutConfigOverride({ config, children, }: {
98
99
  children: ReactNode;
99
100
  }): React.JSX.Element | null;
100
101
  /**
101
- * External hook for user to kickstart a checkout in their app
102
+ * External hook for user to kickstart a checkout in their app.
103
+ * `signOut` ends Fun's own email login, which web fiat deposits sign in with, as connect-rn's does.
102
104
  */
103
105
  export declare function useFunkitCheckout(props: UseFunkitCheckoutPropsWithFullConfig): {
104
106
  beginCheckout: (config?: Partial<FunkitCheckoutConfig>) => Promise<{
105
107
  isActivated: boolean;
106
108
  }>;
107
109
  beginWithdrawal: (config: FunkitWithdrawalConfig) => void;
110
+ /** Ends the buyer's Fun email login: the server revokes it, and it leaves storage. */
111
+ signOut: FunSignOut;
108
112
  };
109
113
  export declare function useFunkitCheckout(props: UseFunkitCheckoutProps): {
110
114
  beginCheckout: (config: FunkitCheckoutConfig) => Promise<{
111
115
  isActivated: boolean;
112
116
  }>;
113
117
  beginWithdrawal: (config: FunkitWithdrawalConfig) => void;
118
+ /** Ends the buyer's Fun email login: the server revokes it, and it leaves storage. */
119
+ signOut: FunSignOut;
114
120
  };
@@ -666,6 +666,36 @@ export type FunkitCheckoutResult = {
666
666
  message: string;
667
667
  metadata: object | Error;
668
668
  };
669
+ export type FunkitDepositSettlementResult = {
670
+ type: 'success';
671
+ } | {
672
+ type: 'error';
673
+ message: string;
674
+ };
675
+ export interface FunkitDepositSettlementContext {
676
+ checkoutId: string;
677
+ dynamicRoutingId: string | undefined;
678
+ destination: {
679
+ chainId: string;
680
+ tokenAddress: string;
681
+ walletAddress: string;
682
+ };
683
+ /** May be empty when no on-chain transaction is reported. */
684
+ sourceTransactions: {
685
+ chainId: string;
686
+ txId: string;
687
+ }[];
688
+ /** Same-chain: the user's own transaction, which is also the delivery. */
689
+ destinationTransactions: {
690
+ chainId: string;
691
+ txId: string;
692
+ }[];
693
+ /**
694
+ * Aborted at the time limit, or when the checkout is discarded. Closing the
695
+ * modal after the deposit is submitted only hides it, so the check goes on.
696
+ */
697
+ signal: AbortSignal;
698
+ }
669
699
  /** Props common to every checkout, regardless of form factor. */
670
700
  interface UseFunkitCheckoutBaseProps {
671
701
  /** @optional the checkout config object **/
@@ -1,3 +1,4 @@
1
+ import type { FunSessionStorage } from '@funkit/connect-core';
1
2
  import { QueryClient } from '@tanstack/react-query';
2
3
  import React, { type ReactNode } from 'react';
3
4
  import type { Chain } from '../wagmi/chains';
@@ -35,6 +36,12 @@ interface FunkitProviderInnerProps {
35
36
  * runtime changes are ignored. Remount the provider to change it.
36
37
  */
37
38
  adoptWallet?: WalletAdoptionConfig;
39
+ /**
40
+ * Where Fun's own login is kept between visits, for fiat deposits where the buyer signs in with
41
+ * an email code. Defaults to the browser's `localStorage`. The value is a credential that lasts
42
+ * up to a year, so pass storage of your own to keep it elsewhere.
43
+ */
44
+ funSessionStorage?: FunSessionStorage;
38
45
  }
39
46
  export type FunkitWagmiConfig = Omit<CreateFunkitWagmiConfigParameters, 'funkitApiKey' | 'initialChainId' | 'appName'> & {
40
47
  projectId: string;
@@ -114,6 +114,9 @@ export declare const useActiveTheme: () => {
114
114
  failedBadgeBackground: string;
115
115
  failedBadgeBorder: string;
116
116
  failedBadgeText: string;
117
+ nativeBadgeBackground: string;
118
+ nativeBadgeBorder: string;
119
+ nativeBadgeText: string;
117
120
  inputAmountQuickOptionBaseBackground: string;
118
121
  inputAmountQuickOptionHoverBackground: string;
119
122
  inputAmountQuickOptionActiveBackground: string;
@@ -649,6 +652,9 @@ export declare const useActiveTheme: () => {
649
652
  failedBadgeBackground: string;
650
653
  failedBadgeBorder: string;
651
654
  failedBadgeText: string;
655
+ nativeBadgeBackground: string;
656
+ nativeBadgeBorder: string;
657
+ nativeBadgeText: string;
652
658
  inputAmountQuickOptionBaseBackground: string;
653
659
  inputAmountQuickOptionHoverBackground: string;
654
660
  inputAmountQuickOptionActiveBackground: string;
@@ -1182,6 +1188,9 @@ export declare const useActiveTheme: () => {
1182
1188
  failedBadgeBackground: string;
1183
1189
  failedBadgeBorder: string;
1184
1190
  failedBadgeText: string;
1191
+ nativeBadgeBackground: string;
1192
+ nativeBadgeBorder: string;
1193
+ nativeBadgeText: string;
1185
1194
  inputAmountQuickOptionBaseBackground: string;
1186
1195
  inputAmountQuickOptionHoverBackground: string;
1187
1196
  inputAmountQuickOptionActiveBackground: string;