@funkit/connect 9.23.0 → 9.23.2-next.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.
Files changed (254) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/__generated__/default_configs.d.ts +901 -0
  3. package/dist/__generated__/default_feature_gates.d.ts +20 -0
  4. package/dist/clients/aave.d.ts +1 -1
  5. package/dist/clients/chunk-25ICASD7.js +2371 -0
  6. package/dist/clients/chunk-3GO74QTP.js +2382 -0
  7. package/dist/clients/{chunk-NCCAYPLO.js → chunk-4HCOSF4M.js} +1 -1
  8. package/dist/clients/chunk-7GWX2ZS4.js +69 -0
  9. package/dist/clients/{chunk-KSSSSWR6.js → chunk-7HNGV6JU.js} +1 -1
  10. package/dist/clients/chunk-CEBG7XQ5.js +2382 -0
  11. package/dist/clients/{chunk-ZMVXBMON.js → chunk-ELLXM7RO.js} +1 -1
  12. package/dist/clients/chunk-GGXTLJ7J.js +290 -0
  13. package/dist/clients/chunk-HRWCNZJA.js +230 -0
  14. package/dist/clients/chunk-JD3FIVZ7.js +69 -0
  15. package/dist/clients/chunk-JTGKAPID.js +2382 -0
  16. package/dist/clients/{chunk-4752IYY6.js → chunk-KWIR3HO4.js} +1 -1
  17. package/dist/clients/chunk-L7PABCF2.js +54 -0
  18. package/dist/clients/chunk-LII3SVUH.js +230 -0
  19. package/dist/clients/{chunk-OWXKWC7I.js → chunk-NCUPPJ2Z.js} +8 -8
  20. package/dist/clients/chunk-NUJ6ZM5F.js +186 -0
  21. package/dist/clients/chunk-UVWNEQMD.js +186 -0
  22. package/dist/clients/chunk-VVTNR7YH.js +2382 -0
  23. package/dist/clients/chunk-ZNVFASTH.js +54 -0
  24. package/dist/clients/fanatics.css +2 -2
  25. package/dist/clients/fanatics.js +3 -3
  26. package/dist/clients/lighter.css +2 -2
  27. package/dist/clients/lighter.d.ts +1 -1
  28. package/dist/clients/lighter.js +5 -3
  29. package/dist/clients/mallard.d.ts +49 -0
  30. package/dist/clients/mallard.js +86 -0
  31. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +97 -87
  32. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +1 -1
  33. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +6 -6
  34. package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +1 -1
  35. package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
  36. package/dist/clients/polymarket/index.css +97 -87
  37. package/dist/clients/polymarket/index.js +6 -6
  38. package/dist/clients/polymarket/polymarket.d.ts +2 -2
  39. package/dist/clients/polymarket/polymarket.js +1 -1
  40. package/dist/clients/polymarket.d.ts +161 -0
  41. package/dist/clients/polymarket.js +688 -0
  42. package/dist/clients/rolly.d.ts +1 -1
  43. package/dist/clients/rolly.js +1 -14
  44. package/dist/components/ApprovalMethodToggle/ApprovalMethodToggle.d.ts +1 -1
  45. package/dist/components/BottomLinks/BottomLinks.css.d.ts +6 -0
  46. package/dist/components/BottomLinks/BottomLinks.d.ts +14 -0
  47. package/dist/components/Box/Box.d.ts +21 -21
  48. package/dist/components/Dropdown/ChainDropdown.d.ts +1 -1
  49. package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -1
  50. package/dist/components/Dropdown/TokenDropdown.d.ts +1 -1
  51. package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
  52. package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +1 -1
  53. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -1
  54. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
  55. package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +2 -2
  56. package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +1 -1
  57. package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.d.ts +1 -1
  58. package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -1
  59. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
  60. package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +1 -1
  61. package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +3 -3
  62. package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -2
  63. package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -2
  64. package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +2 -2
  65. package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +1 -1
  66. package/dist/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.d.ts +2 -2
  67. package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
  68. package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +2 -2
  69. package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +1 -1
  70. package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +1 -1
  71. package/dist/components/TransactionStatus/StepSpinner.d.ts +1 -1
  72. package/dist/components/TransactionStatus/TransactionStatus.d.ts +2 -2
  73. package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +1 -1
  74. package/dist/consts/customers.d.ts +3 -1
  75. package/dist/consts/funkit.d.ts +1 -0
  76. package/dist/css/sprinkles.css.d.ts +21 -21
  77. package/dist/domains/aave.d.ts +1 -1
  78. package/dist/domains/asset.d.ts +4 -4
  79. package/dist/domains/checkout.d.ts +1 -1
  80. package/dist/domains/checkoutErrors.d.ts +2 -2
  81. package/dist/domains/checkoutRecipient.d.ts +1 -1
  82. package/dist/domains/clientMetadata.d.ts +7 -2
  83. package/dist/domains/dynamicRouting.d.ts +1 -1
  84. package/dist/domains/fees.d.ts +3 -3
  85. package/dist/domains/paymentMethods.d.ts +1 -1
  86. package/dist/domains/quote.d.ts +5 -5
  87. package/dist/domains/quoteMode/exactOut.d.ts +1 -1
  88. package/dist/domains/quoteMode/resolveQuoteMode.d.ts +1 -1
  89. package/dist/domains/quoteMode/types.d.ts +2 -2
  90. package/dist/hooks/queries/useLightningQuote.d.ts +1 -1
  91. package/dist/hooks/queries/useMeldDefaultCurrency.d.ts +1 -1
  92. package/dist/hooks/queries/useRecentCheckouts.d.ts +1 -1
  93. package/dist/hooks/queries/useRecentDeposits.d.ts +1 -1
  94. package/dist/hooks/queries/useWithdrawalQuote.d.ts +31 -31
  95. package/dist/hooks/track/useTrack.d.ts +1 -1
  96. package/dist/hooks/useBluvo.d.ts +3 -3
  97. package/dist/hooks/useCheckoutDirectExecution.d.ts +3 -3
  98. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -1
  99. package/dist/hooks/useCheckoutItemDisplay.d.ts +2 -2
  100. package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -2
  101. package/dist/hooks/useCountdown.d.ts +1 -1
  102. package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
  103. package/dist/hooks/useExchangeOptions.d.ts +1 -1
  104. package/dist/hooks/useFrogAccount.d.ts +1 -1
  105. package/dist/hooks/useIsBlacklisted.d.ts +1 -1
  106. package/dist/hooks/useIsDynamicRoutingEnabled.d.ts +1 -1
  107. package/dist/hooks/useMinDeposit.d.ts +1 -1
  108. package/dist/hooks/useNewTokenBanner.d.ts +1 -1
  109. package/dist/hooks/useOnNewNotification.d.ts +1 -1
  110. package/dist/hooks/usePaymentMethodTabs.d.ts +1 -1
  111. package/dist/hooks/usePaymentSources.d.ts +2 -2
  112. package/dist/hooks/useRelayBypass.d.ts +1 -1
  113. package/dist/hooks/useStepQueryReadiness.d.ts +3 -3
  114. package/dist/hooks/useTokenAndChainDropdown.d.ts +1 -1
  115. package/dist/hooks/useTokenTransfer.d.ts +1 -1
  116. package/dist/hooks/useTokenTransferConfig.d.ts +8 -1
  117. package/dist/hooks/useUserIpInfo.d.ts +1 -1
  118. package/dist/index.css +42 -32
  119. package/dist/index.js +751 -763
  120. package/dist/interfaces/identity.d.ts +1 -1
  121. package/dist/interfaces/logTransport.d.ts +51 -0
  122. package/dist/interfaces/swapped-transport.d.ts +78 -0
  123. package/dist/modals/ChainModal/Chain.d.ts +1 -1
  124. package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +1 -1
  125. package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +2 -2
  126. package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +2 -2
  127. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +2 -2
  128. package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -2
  129. package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
  130. package/dist/modals/CheckoutModal/ConfirmationStep/DisclaimerText.d.ts +1 -1
  131. package/dist/modals/CheckoutModal/ConfirmationStep/mapRetryAction.d.ts +1 -1
  132. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -1
  133. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +2 -2
  134. package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +2 -2
  135. package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +1 -1
  136. package/dist/modals/CheckoutModal/ConfirmationStep/useSourceAssetConfirm.d.ts +2 -2
  137. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
  138. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
  139. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -2
  140. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -3
  141. package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +3 -3
  142. package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
  143. package/dist/modals/CheckoutModal/InputAmount/useAvailableBalanceForCheckout.d.ts +3 -3
  144. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +2 -2
  145. package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +1 -1
  146. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
  147. package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoice.d.ts +1 -1
  148. package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoiceQrCode.d.ts +1 -1
  149. package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +1 -1
  150. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
  151. package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +1 -1
  152. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +5 -5
  153. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +2 -2
  154. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +2 -2
  155. package/dist/modals/CheckoutModal/SourceChange/ConnectedSource.d.ts +1 -1
  156. package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +2 -2
  157. package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +4 -0
  158. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -2
  159. package/dist/modals/CheckoutModal/SourceChange/useSourceChangeLayout.d.ts +1 -1
  160. package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +4 -0
  161. package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +6 -0
  162. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeController.d.ts +2 -2
  163. package/dist/modals/CheckoutModal/TransferToken/CheckoutNotification.d.ts +1 -1
  164. package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
  165. package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -1
  166. package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
  167. package/dist/modals/CheckoutModal/TransferToken/types.d.ts +1 -1
  168. package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +2 -2
  169. package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +1 -1
  170. package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +1 -1
  171. package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +1 -1
  172. package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +2 -2
  173. package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +2 -2
  174. package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +14 -0
  175. package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +15 -0
  176. package/dist/modals/CheckoutModal/stepTransition.d.ts +11 -5
  177. package/dist/modals/CheckoutModal/stepTransition.track.d.ts +3 -3
  178. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +2 -2
  179. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +1 -1
  180. package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +2 -2
  181. package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
  182. package/dist/modals/WithdrawalModal/ErrorMessage.d.ts +2 -2
  183. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +4 -4
  184. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +1 -1
  185. package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +1 -1
  186. package/dist/modals/WithdrawalModal/WithdrawalCallbackSuccess.d.ts +1 -1
  187. package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +1 -1
  188. package/dist/modals/WithdrawalModal/WithdrawalModal.d.ts +1 -1
  189. package/dist/modals/WithdrawalModal/WithdrawalTypeSelect.d.ts +1 -1
  190. package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -3
  191. package/dist/providers/FunkitBrokerageProvider.d.ts +2 -2
  192. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
  193. package/dist/providers/FunkitCheckoutContext/track.d.ts +4 -4
  194. package/dist/providers/FunkitCheckoutContext/types.d.ts +2 -28
  195. package/dist/providers/FunkitConfigContext.d.ts +3 -3
  196. package/dist/providers/FunkitHistoryContext.d.ts +2 -2
  197. package/dist/providers/FunkitProvider.d.ts +2 -2
  198. package/dist/providers/FunkitQuoteContext.track.d.ts +4 -4
  199. package/dist/providers/GeneralWalletProvider.d.ts +2 -2
  200. package/dist/providers/QuoteModeContext.d.ts +1 -1
  201. package/dist/providers/SwappedProvider.d.ts +1 -1
  202. package/dist/utils/assets.d.ts +1 -1
  203. package/dist/utils/bluvo.d.ts +3 -3
  204. package/dist/utils/checkout.d.ts +3 -3
  205. package/dist/utils/depositCutoff.d.ts +1 -1
  206. package/dist/utils/flags/resolver.d.ts +34 -0
  207. package/dist/utils/funkitProvider.d.ts +1 -1
  208. package/dist/utils/payment.d.ts +1 -1
  209. package/dist/utils/polygonRpcCheck.d.ts +1 -1
  210. package/dist/utils/purifyCheckoutHistoryItem.d.ts +1 -1
  211. package/dist/utils/swapped.d.ts +1 -1
  212. package/dist/utils/tokenTransfer/disabledList.d.ts +1 -14
  213. package/dist/utils/tokenTransfer/types.d.ts +5 -30
  214. package/dist/utils/withdrawal.d.ts +1 -1
  215. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  216. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  217. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  218. package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +70 -0
  219. package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +69 -0
  220. package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +96 -0
  221. package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +218 -0
  222. package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +99 -0
  223. package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +98 -0
  224. package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +92 -0
  225. package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +93 -0
  226. package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +66 -0
  227. package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +95 -0
  228. package/dist/wallets/walletConnectors/chunk-RVOY537T.js +100 -0
  229. package/dist/wallets/walletConnectors/chunk-STVVP43G.js +94 -0
  230. package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +87 -0
  231. package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +92 -0
  232. package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +110 -0
  233. package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +103 -0
  234. package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +96 -0
  235. package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +106 -0
  236. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  237. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  238. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  239. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  240. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  241. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  242. package/dist/wallets/walletConnectors/index.js +63 -63
  243. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  244. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  245. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  246. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  247. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  248. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  249. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  250. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  251. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  252. package/package.json +5 -5
  253. /package/dist/clients/{chunk-52NKHZS2.js → chunk-7FIVHWNC.js} +0 -0
  254. /package/dist/clients/{chunk-MOUTRRN3.js → chunk-S7FRYR55.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { Address } from 'viem';
2
- import type { LoginType } from '../utils/userInfo';
2
+ import type { LoginType } from '~/utils/userInfo';
3
3
  /**
4
4
  * Platform-agnostic **user** identity surface consumed by core hooks.
5
5
  *
@@ -0,0 +1,51 @@
1
+ /** Severity levels emitted by `FunLogger`. */
2
+ export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
3
+ /** User tracking consent, mirroring the Datadog browser SDK's values. */
4
+ export type TrackingConsent = 'granted' | 'not-granted';
5
+ /**
6
+ * The structured context `FunLogger` assembles for every record: the caller's
7
+ * data plus the logger's resolved user/session fields. Concrete (rather than
8
+ * `object`) so transport implementors get property access and autocomplete.
9
+ */
10
+ export interface LogContext {
11
+ /** Caller-supplied structured data for this log line, if any. */
12
+ data?: object;
13
+ apiKey: string | null;
14
+ userId: string | null;
15
+ userName: string | null;
16
+ userAddress: string | null;
17
+ userLoginType: string | null;
18
+ typeLabel: string | null;
19
+ sdkVersion: string | null;
20
+ }
21
+ /** A single fully-assembled log record handed to a transport. */
22
+ export interface LogRecord {
23
+ level: LogLevel;
24
+ title: string;
25
+ /** Assembled by `FunLogger` so transports stay dumb sinks. */
26
+ context: LogContext;
27
+ /** Present only for `error`-level records. */
28
+ error?: Error;
29
+ }
30
+ /**
31
+ * Platform sink for `FunLogger`. The logger (queueing, env detection, level
32
+ * routing, console fallback, context tracking) is platform-agnostic; everything
33
+ * platform-specific about *emitting* lives behind this interface.
34
+ *
35
+ * Part of the React Native split (see docs/connect-rn-architecture.md): web
36
+ * implements it with `DatadogBrowserLogsTransport`, React Native will implement
37
+ * it with a Datadog React Native transport (`@datadog/mobile-react-native`).
38
+ * Kept free of DOM/`@datadog/browser-logs` types so it can move to
39
+ * `@funkit/connect-core` untouched.
40
+ */
41
+ export interface LogTransport {
42
+ /** Emit one record to the platform sink. */
43
+ log(record: LogRecord): void;
44
+ /**
45
+ * Reflect the resolved environment (e.g. `'development'` | `'production'`).
46
+ * Optional — sinks that don't segment by environment can omit it.
47
+ */
48
+ setEnv?(environment: string): void;
49
+ /** Reflect user tracking consent. Optional. */
50
+ setTrackingConsent?(consent: TrackingConsent): void;
51
+ }
@@ -0,0 +1,78 @@
1
+ import type { PaymentGroupType } from '@funkit/api-base';
2
+ import type { SwappedTheme } from '../utils/swapped';
3
+ /**
4
+ * Typed contract for the message bridge between the SDK and the embedded
5
+ * Swapped flow. On web this is bridged over an `<iframe>` + `window.postMessage`
6
+ * (see {@link createIframeSwappedTransport}); React Native will bridge the same
7
+ * messages over a `WebView`. Freezing the event catalog here lets both
8
+ * platforms share the `SwappedProvider` state machine and turns any drift in
9
+ * the message shapes into a compile-time error.
10
+ *
11
+ * Reference: the inbound switch in `SwappedIframeController` and the sends in
12
+ * `SwappedProvider`.
13
+ *
14
+ * This module is platform-agnostic and is slated to move to
15
+ * `@funkit/connect-core/interfaces/` during the RN extraction.
16
+ */
17
+ /**
18
+ * Navigation steps reported by the Swapped embed. Open-ended — the embed may
19
+ * emit steps we don't enumerate, which fall through to the default handler.
20
+ */
21
+ export type SwappedStep = 'EMPTY' | 'KYC_ADDRESS' | 'KYC_AWAITING_IDENTITY' | 'KYC_IDENTITY' | 'KYC_PERSONAL' | 'KYC_SUMSUB' | 'LOGIN_EMAIL' | 'LOGIN_EMAIL_VERIFICATION' | 'PAYMENT' | 'ORDER_CONFIRMATION' | (string & {});
22
+ /**
23
+ * Opaque payloads — the SDK never introspects these, it only forwards them to
24
+ * analytics via `JSON.stringify`. Typed as `unknown` so callers must stringify
25
+ * rather than read fields.
26
+ */
27
+ export type SwappedErrorPayload = unknown;
28
+ export type SwappedTxPayload = unknown;
29
+ /** embed → parent */
30
+ export type SwappedInboundMessage = {
31
+ type: 'SWAPPED_READY';
32
+ } | {
33
+ type: 'SWAPPED_GO_BACK';
34
+ } | {
35
+ type: 'SWAPPED_CLOSE';
36
+ } | {
37
+ type: 'SWAPPED_NEW_DEPOSIT';
38
+ } | {
39
+ type: 'SWAPPED_ERROR';
40
+ data?: SwappedErrorPayload;
41
+ } | {
42
+ type: 'SWAPPED_NAVIGATION';
43
+ data?: {
44
+ step?: SwappedStep;
45
+ };
46
+ } | {
47
+ type: 'SWAPPED_ORDER_DATA';
48
+ data?: unknown;
49
+ } | {
50
+ type: 'SWAPPED_TRANSACTION_SUCCESSFUL';
51
+ data?: SwappedTxPayload;
52
+ } | {
53
+ type: 'SWAPPED_LOGOUT';
54
+ };
55
+ /** parent → embed */
56
+ export type SwappedOutboundMessage = {
57
+ type: 'SWAPPED_METHOD';
58
+ method: PaymentGroupType;
59
+ } | {
60
+ type: 'SWAPPED_THEME';
61
+ data: SwappedTheme;
62
+ } | {
63
+ type: 'SWAPPED_FOCUS';
64
+ };
65
+ export interface SwappedTransport {
66
+ /**
67
+ * Send a message to the embed. Returns `true` if the message was dispatched,
68
+ * `false` if the embed isn't reachable yet (so callers can mirror today's
69
+ * behavior of logging only on a successful send).
70
+ */
71
+ send(msg: SwappedOutboundMessage): boolean;
72
+ /**
73
+ * Subscribe to messages from the embed. The handler is only invoked for
74
+ * messages whose origin has already been validated by the transport. Returns
75
+ * an unsubscribe function.
76
+ */
77
+ onMessage(handler: (msg: SwappedInboundMessage) => void): () => void;
78
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { useSwitchChain } from '../../wagmi/hooks';
2
+ import type { useSwitchChain } from '~/wagmi/hooks';
3
3
  import { type BoxProps } from '../../components/Box/Box';
4
4
  interface ChainProps {
5
5
  chainId: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
2
+ import type { PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
3
3
  import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
4
4
  export declare const BROKERAGE_SUCCESS_MODAL_CONTENT_ID = "brokerage-success-modal-content";
5
5
  export type BrokerageSuccessState = CheckoutModalCommonState & {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Address } from 'viem';
3
- import type { BluvoExchangeInfo } from '../../../consts/bluvo';
4
- import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
3
+ import type { BluvoExchangeInfo } from '~/consts/bluvo';
4
+ import type { PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
5
5
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
6
  export type BrokerageTwoFAState = CheckoutModalCommonState & {
7
7
  paymentMethodInfo: PaymentMethodBrokerageInfo;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type BluvoExchangeType } from '../../../consts/bluvo';
3
- import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
2
+ import { type BluvoExchangeType } from '~/consts/bluvo';
3
+ import { type PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
4
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
5
  export type ConnectExchangeState = CheckoutModalCommonState & {
6
6
  brokerType: BluvoExchangeType;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type BluvoExchangeType } from '../../../consts/bluvo';
3
- import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
2
+ import { type BluvoExchangeType } from '~/consts/bluvo';
3
+ import { type PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
4
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
5
  export type SelectBrokerageState = CheckoutModalCommonState;
6
6
  export type SelectBrokerageNext = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { QuoteDisplayAmounts } from '../../../domains/quoteMode';
3
- import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
2
+ import type { QuoteDisplayAmounts } from '~/domains/quoteMode';
3
+ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
4
4
  interface CheckoutPrimaryInfoProps {
5
5
  showLeftAlignedDollarValueWithLabel: boolean;
6
6
  showTokenAmount: boolean;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Address } from 'viem';
3
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
3
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
4
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
5
  export type ConfirmationStepState = CheckoutModalCommonState & {
6
6
  paymentMethodInfo: PaymentMethodInfo;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { FunkitActiveCheckoutItem } from '../../../providers/FunkitCheckoutContext';
2
+ import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
3
3
  interface DisclaimerTextProps {
4
4
  checkoutItem: FunkitActiveCheckoutItem | null;
5
5
  continueText: string;
@@ -1,4 +1,4 @@
1
- import { type QuoteBuilder, type QuoteRetryError } from '../../../domains/quoteMode/types';
1
+ import { type QuoteBuilder, type QuoteRetryError } from '~/domains/quoteMode/types';
2
2
  export type MappedRetryAction = {
3
3
  action: 'calibrate';
4
4
  newTargetAssetAmount: number;
@@ -1,5 +1,5 @@
1
1
  import type { Address } from 'viem';
2
- import { type CheckoutConfirmationError } from '../../../domains/checkoutErrors';
2
+ import { type CheckoutConfirmationError } from '~/domains/checkoutErrors';
3
3
  interface UseCheckoutConfirmationOptions {
4
4
  onError(error: CheckoutConfirmationError): void;
5
5
  onSuccess(depositAddress: Address): void;
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { QuoteBuilder } from '../../../domains/quoteMode/types';
3
- import type { CheckoutQuoteError } from '../../../providers/FunkitQuoteContext';
2
+ import type { QuoteBuilder } from '~/domains/quoteMode/types';
3
+ import type { CheckoutQuoteError } from '~/providers/FunkitQuoteContext';
4
4
  interface TriggerNewQuoteOptions {
5
5
  maxRetries: number;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import type { Address } from 'viem';
2
- import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
3
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
2
+ import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
3
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
4
4
  export interface PostCheckoutError extends ErrorNotification {
5
5
  disableContinue: boolean;
6
6
  durationMs?: number;
@@ -1,4 +1,4 @@
1
- import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
1
+ import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
2
2
  interface UseQuoteRefreshOptions {
3
3
  /**
4
4
  * Freeze the latest quote state, e.g. so we do not change the quote mid-confirmation
@@ -1,5 +1,5 @@
1
- import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
2
- import { type CheckoutQuoteResult } from '../../../providers/FunkitQuoteContext';
1
+ import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
2
+ import { type CheckoutQuoteResult } from '~/providers/FunkitQuoteContext';
3
3
  export interface SourceAssetConfirmed {
4
4
  isQuoteSuccess: boolean;
5
5
  maxTargetAssetAmount: number | undefined;
@@ -22,5 +22,7 @@ export declare enum FunCheckoutStep {
22
22
  BROKERAGE_TWO_FA = "brokerage_two_fa",
23
23
  BROKERAGE_SUCCESS = "brokerage_success",
24
24
  SWAPPED_IFRAME = "swapped_iframe",
25
- PERPS_TRANSFER = "perps_transfer"
25
+ PERPS_TRANSFER = "perps_transfer",
26
+ WITHDRAWAL_ENTER_AMOUNT = "withdrawal_enter_amount",
27
+ WITHDRAWAL_COMPLETE = "withdrawal_complete"
26
28
  }
@@ -1,7 +1,7 @@
1
1
  import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { Hex } from 'viem';
4
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
4
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
5
5
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
6
  export type InputAmountState = CheckoutModalCommonState & {
7
7
  paymentMethodInfo: PaymentMethodInfo;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type FunkitTextCustomizationsConfig } from '../../../providers/FunkitConfigContext';
3
- import type { AssetHoldingsItem } from '../../../utils/assets';
2
+ import { type FunkitTextCustomizationsConfig } from '~/providers/FunkitConfigContext';
3
+ import type { AssetHoldingsItem } from '~/utils/assets';
4
4
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
5
5
  import { FunCheckoutStep, type ModalStepComponentProps } from '../stepTransition';
6
6
  interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
@@ -1,8 +1,8 @@
1
1
  import type { Dnum } from 'dnum';
2
2
  import type { Address } from 'viem';
3
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
4
- import type { QuoteBuilder } from '../../../domains/quoteMode/types';
5
- import type { AssetHoldingsItem } from '../../../utils/assets';
3
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
4
+ import type { QuoteBuilder } from '~/domains/quoteMode/types';
5
+ import type { AssetHoldingsItem } from '~/utils/assets';
6
6
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
7
7
  export interface AmountInputInitOptions {
8
8
  checkoutConfig: FunkitCheckoutConfig;
@@ -7,9 +7,9 @@ import { type ERC712Signature, type SupplyRequest } from '@aave/client';
7
7
  import type { ApiFunkitCheckoutConfig } from '@funkit/utils';
8
8
  import type { Dnum } from 'dnum';
9
9
  import { type Address, type Hex, type WalletClient } from 'viem';
10
- import { type CheckoutConfirmationError } from '../../../domains/checkoutErrors';
11
- import type { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
12
- import { type Config } from '../../../wagmi/hooks';
10
+ import { type CheckoutConfirmationError } from '~/domains/checkoutErrors';
11
+ import type { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
12
+ import { type Config } from '~/wagmi/hooks';
13
13
  /**
14
14
  * Stringify an amount for Aave's `bigDecimal()`. Prefers the precise
15
15
  * base-unit Dnum (carries the token's real decimals) so we don't ship
@@ -1,6 +1,6 @@
1
1
  import type { Dnum } from 'dnum';
2
2
  import { type RefObject } from 'react';
3
- import type { FunInputChangeEvent } from '../../../components/FunInput/FunInput';
3
+ import type { FunInputChangeEvent } from '~/components/FunInput/FunInput';
4
4
  import { type AmountInputDerivedState, type AmountInputInitOptions } from './state';
5
5
  import { type InputAmountSuggestion } from './utils';
6
6
  export interface UseAmountInputResult extends AmountInputDerivedState {
@@ -1,4 +1,4 @@
1
- import type { AssetHoldingsItem } from '../../../utils/assets';
2
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
3
- import type { QueryResult } from '../../../types/utils';
1
+ import type { AssetHoldingsItem } from '~/utils/assets';
2
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
3
+ import type { QueryResult } from '~/types/utils';
4
4
  export declare function useAvailableBalanceForCheckout(paymentMethodInfo: PaymentMethodInfo, targetChainId: string, assetChainId: string, assetSymbol: string | null): QueryResult<AssetHoldingsItem>;
@@ -1,5 +1,5 @@
1
- import { PaymentMethod } from '../../../domains/paymentMethods';
2
- import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
1
+ import { PaymentMethod } from '~/domains/paymentMethods';
2
+ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
3
3
  export interface CheckoutAmountLimitsUsd {
4
4
  minUsd: number | undefined;
5
5
  maxUsd: number;
@@ -1,6 +1,6 @@
1
1
  import type { MeldQuote } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
3
+ import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
4
4
  import { FunCheckoutStep, type NextPayload } from '../stepTransition';
5
5
  export declare function useMeldUI({ meldEnabled, manuallySelectedQuote, fiatAmount, fiatCurrency, onNext, }: {
6
6
  meldEnabled: boolean;
@@ -1,5 +1,5 @@
1
- import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
2
- import type { useFunkitTranslation } from '../../../hooks/useFunkitTranslation';
1
+ import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
2
+ import type { useFunkitTranslation } from '~/hooks/useFunkitTranslation';
3
3
  import type { AmountInputError } from './state';
4
4
  type TFunction = ReturnType<typeof useFunkitTranslation>['t'];
5
5
  export declare const ASSET_DECIMALS = 5;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PaymentMethodBitcoinLightningInfo } from '../../../domains/paymentMethods';
2
+ import type { PaymentMethodBitcoinLightningInfo } from '~/domains/paymentMethods';
3
3
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
4
  export type LightningInvoiceState = CheckoutModalCommonState & {
5
5
  paymentMethodInfo: PaymentMethodBitcoinLightningInfo;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type BoxProps } from '../../../components/Box/Box';
2
+ import { type BoxProps } from '~/components/Box/Box';
3
3
  interface LightningInvoiceQrCodeProps {
4
4
  qrCodeUri: string | undefined;
5
5
  marginY?: BoxProps['marginY'];
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
2
+ import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
3
3
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
4
  export type MeldCurrencySelectState = CheckoutModalCommonState & {
5
5
  defaultCurrency: string;
@@ -1,6 +1,6 @@
1
1
  import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
3
+ import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
4
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
5
  export type MeldQuotesState = CheckoutModalCommonState & {
6
6
  paymentMethodInfo: PaymentMethodCardInfo;
@@ -1,6 +1,6 @@
1
1
  import type { MeldQuote } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
3
+ import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
4
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
5
  export type MeldRedirectState = CheckoutModalCommonState & {
6
6
  paymentMethodInfo: PaymentMethodCardInfo;
@@ -1,9 +1,9 @@
1
1
  import type { IndexedDynamicRoutingConfig } from '@funkit/fun-relay';
2
2
  import React from 'react';
3
- import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
4
- import type { AssetHoldingsItem } from '../../../domains/wallet';
5
- import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
6
- import { type DynamicTargetAssetCandidate } from '../../../providers/FunkitCheckoutContext';
3
+ import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
4
+ import type { AssetHoldingsItem } from '~/domains/wallet';
5
+ import type { TransferTokenDefault } from '~/hooks/useTokenAndChainDropdown';
6
+ import { type DynamicTargetAssetCandidate } from '~/providers/FunkitCheckoutContext';
7
7
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
8
8
  export type SelectAssetState = CheckoutModalCommonState & {
9
9
  paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
@@ -15,4 +15,4 @@ export type SelectAssetNext = {
15
15
  };
16
16
  export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>;
17
17
  export declare function SelectAsset({ modalState, onNext, onClose, }: ModalStepComponentProps<FunCheckoutStep.SELECT_ASSET>): React.JSX.Element;
18
- export declare function isTreatedAsNativeToken(apiKey: string, asset: AssetHoldingsItem, dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[], findDynamicPath: IndexedDynamicRoutingConfig[string]['findPath']): boolean;
18
+ export declare function isTreatedAsNativeToken(apiKey: string, asset: AssetHoldingsItem, dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[], findDynamicPath: IndexedDynamicRoutingConfig[string]['findPath'], isUserSelected: boolean): boolean;
@@ -1,6 +1,6 @@
1
1
  import { type FC } from 'react';
2
- import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
3
- import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
2
+ import type { PaymentMethodInfo } from '~/domains/paymentMethods';
3
+ import type { TransferTokenDefault } from '~/hooks/useTokenAndChainDropdown';
4
4
  interface SelectAssetInfoSectionProps {
5
5
  totalBalance: number;
6
6
  paymentMethodInfo: PaymentMethodInfo;
@@ -1,6 +1,6 @@
1
1
  import { type FC } from 'react';
2
- import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
3
- import type { AssetHoldingsItem } from '../../../domains/wallet';
2
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
3
+ import type { AssetHoldingsItem } from '~/domains/wallet';
4
4
  interface AssetOption {
5
5
  asset: AssetHoldingsItem;
6
6
  badgeText: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ConnectablePaymentMethodInfo } from '../../../domains/paymentMethods';
2
+ import { type ConnectablePaymentMethodInfo } from '~/domains/paymentMethods';
3
3
  interface ConnectedSourceProps {
4
4
  targetChainId: string;
5
5
  paymentInfo: ConnectablePaymentMethodInfo;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type BoxProps } from '../../../components/Box/Box';
3
- import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
2
+ import { type BoxProps } from '~/components/Box/Box';
3
+ import type { PaymentMethodType } from '~/hooks/usePaymentSources';
4
4
  interface CryptoCashToggleProps {
5
5
  activeTab: PaymentMethodType;
6
6
  disabled?: boolean;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare function EmptyFormOfPaymentsMessage({ minHeight, }: {
3
+ minHeight: number;
4
+ }): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { type SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodBitcoinLightningInfo, type PaymentMethodCardInfo, type PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
4
- import { type PaymentMethodType } from '../../../hooks/usePaymentSources';
3
+ import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodBitcoinLightningInfo, type PaymentMethodCardInfo, type PaymentMethodVirtualBankIncompleteInfo } from '~/domains/paymentMethods';
4
+ import { type PaymentMethodType } from '~/hooks/usePaymentSources';
5
5
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
6
  export type SourceChangeState = CheckoutModalCommonState & {
7
7
  paymentMethodInfo: ConnectablePaymentMethodInfo | null;
@@ -1,4 +1,4 @@
1
- import type { BoxProps } from '../../../components/Box/Box';
1
+ import type { BoxProps } from '~/components/Box/Box';
2
2
  /**
3
3
  * Layout decisions shared between SourceChange and SourceChangeLoading so the
4
4
  * loading skeleton can't drift from the loaded screen.
@@ -0,0 +1,4 @@
1
+ export declare function useUpdateCardSourceAsset(): {
2
+ onSelectCard: () => Promise<void>;
3
+ isUpdating: boolean;
4
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type BoxProps } from '../../../components/Box/Box';
3
+ export declare function SwappedErrorMessage({ minHeight, paddingBottom, }: {
4
+ minHeight: number;
5
+ paddingBottom?: BoxProps['paddingBottom'];
6
+ }): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
+ import type { PaymentMethodType } from '~/hooks/usePaymentSources';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
5
5
  export type SwappedIframeState = CheckoutModalCommonState & {
6
6
  /** The selected payment option from the fops API */
7
7
  selectedPaymentOption: SwappedFormOfPayment;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { CheckoutHistoryItem } from '@funkit/api-base';
3
3
  import type { Address } from 'viem';
4
- import { type CheckoutStatus } from '../../../domains/checkout';
4
+ import { type CheckoutStatus } from '~/domains/checkout';
5
5
  export type NotificationStatus = CheckoutStatus | 'delayed';
6
6
  interface CheckoutNotificationProps {
7
7
  checkout: CheckoutHistoryItem;
@@ -1,4 +1,4 @@
1
- import type { TrackEventData } from '../../../hooks/track/useTrack';
1
+ import type { TrackEventData } from '~/hooks/track/useTrack';
2
2
  import type { NotificationItem } from './types';
3
3
  export declare function getNotificationId(item: NotificationItem): string;
4
4
  export declare function buildNotificationMetadata(item: NotificationItem, extras: Record<string, unknown>): Record<string, unknown>;
@@ -1,7 +1,7 @@
1
1
  import type { TFunction } from 'i18next';
2
2
  import React from 'react';
3
3
  import type { Address } from 'viem';
4
- import type { MergedMultiStepDirectExecution } from '../../../domains/checkoutNotifications';
4
+ import type { MergedMultiStepDirectExecution } from '~/domains/checkoutNotifications';
5
5
  interface DirectExecutionNotificationProps {
6
6
  directExecution: MergedMultiStepDirectExecution;
7
7
  onClose: (id: string) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
2
+ import { type TransferTokenDefault } from '~/hooks/useTokenAndChainDropdown';
3
3
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
4
  export type TransferTokenState = CheckoutModalCommonState & {
5
5
  transferToken?: TransferTokenDefault;
@@ -1,6 +1,6 @@
1
1
  import type { CheckoutHistoryItem } from '@funkit/api-base';
2
2
  import type { Address } from 'viem';
3
- import type { MergedMultiStepDirectExecution, NotificationVariant } from '../../../domains/checkoutNotifications';
3
+ import type { MergedMultiStepDirectExecution, NotificationVariant } from '~/domains/checkoutNotifications';
4
4
  export type { NotificationVariant };
5
5
  export type NotificationItem = (MergedMultiStepDirectExecution & {
6
6
  isDirectExecution: true;
@@ -1,5 +1,5 @@
1
- import type { PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
2
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
1
+ import type { PaymentMethodVirtualBankIncompleteInfo } from '~/domains/paymentMethods';
2
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
3
3
  export type BridgeCustomerNext = {
4
4
  hasError?: false;
5
5
  kycLink: string;
@@ -1,5 +1,5 @@
1
1
  import { type BridgeCustomer, type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
2
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
3
3
  export declare enum NextStep {
4
4
  ShowSource = "ShowSource",
5
5
  ShowKyc = "ShowKyc",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
3
3
  export type ErrorScreenState = CheckoutModalCommonState & {
4
4
  errorCode: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type PaymentMethodVirtualBankInfo } from '../../../domains/paymentMethods';
2
+ import { type PaymentMethodVirtualBankInfo } from '~/domains/paymentMethods';
3
3
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
4
  export type FiatAccountDetailState = CheckoutModalCommonState & {
5
5
  paymentMethodInfo: PaymentMethodVirtualBankInfo;