@funkit/connect 9.19.0 → 9.20.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 (173) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/clients/argentWallet-2WSTOUAO.js +7 -0
  3. package/dist/clients/bifrostWallet-5NQVDZ5P.js +7 -0
  4. package/dist/clients/bitgetWallet-CBQAJOIK.js +7 -0
  5. package/dist/clients/bitskiWallet-OLIYN3IU.js +7 -0
  6. package/dist/clients/bitverseWallet-AQMAJ2NN.js +7 -0
  7. package/dist/clients/bloomWallet-MJRQJYSG.js +7 -0
  8. package/dist/clients/braveWallet-T76TVZA6.js +7 -0
  9. package/dist/clients/bybitWallet-GOPAS32Q.js +7 -0
  10. package/dist/clients/chunk-4752IYY6.js +94 -0
  11. package/dist/clients/chunk-47AQXZQE.js +230 -0
  12. package/dist/clients/chunk-CSONEKIF.js +54 -0
  13. package/dist/clients/chunk-JOM2J5WB.js +2371 -0
  14. package/dist/clients/{chunk-GSK3TMI5.js → chunk-JVTKIEOP.js} +2 -223
  15. package/dist/clients/{polymarket.js → chunk-MOUTRRN3.js} +15 -27
  16. package/dist/clients/chunk-MRBN4XCA.js +96 -0
  17. package/dist/clients/chunk-UNCVGPTD.js +186 -0
  18. package/dist/clients/chunk-UUHGOBKZ.js +51 -0
  19. package/dist/clients/clvWallet-VVMLP7BK.js +7 -0
  20. package/dist/clients/coin98Wallet-I5CP5KYZ.js +7 -0
  21. package/dist/clients/coinbaseWallet-ICYEIYQD.js +7 -0
  22. package/dist/clients/coreWallet-RFVUHOVE.js +7 -0
  23. package/dist/clients/dawnWallet-QBFTQLS4.js +7 -0
  24. package/dist/clients/desigWallet-IBKYOHSY.js +7 -0
  25. package/dist/clients/enkryptWallet-ZVUZMI7H.js +7 -0
  26. package/dist/clients/fanatics.js +42 -83
  27. package/dist/clients/foxWallet-I7D5KIW4.js +7 -0
  28. package/dist/clients/frameWallet-UDD4OVZX.js +7 -0
  29. package/dist/clients/frontierWallet-5QV7ZACT.js +7 -0
  30. package/dist/clients/gateWallet-CJNGQQCV.js +7 -0
  31. package/dist/clients/imTokenWallet-UPA7ADZ2.js +7 -0
  32. package/dist/clients/injectedWallet-OIRJSVBZ.js +7 -0
  33. package/dist/clients/kresusWallet-7ROCNWAU.js +7 -0
  34. package/dist/clients/ledgerWallet-3FCEIKPD.js +7 -0
  35. package/dist/clients/lighter.js +10 -180
  36. package/dist/clients/metaMaskWallet-RMHEKBDR.js +7 -0
  37. package/dist/clients/mewWallet-ANFGVCZT.js +7 -0
  38. package/dist/clients/oktoWallet-Q5XCEOTD.js +7 -0
  39. package/dist/clients/okxWallet-GJMKZIND.js +7 -0
  40. package/dist/clients/omniWallet-YH4FEL6J.js +7 -0
  41. package/dist/clients/oneInchWallet-4S73ZPPN.js +7 -0
  42. package/dist/clients/oneKeyWallet-YVJDPHJS.js +7 -0
  43. package/dist/clients/phantomWallet-LZDJJ5XR.js +7 -0
  44. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +17293 -0
  45. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +30 -0
  46. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +14 -0
  47. package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +54 -0
  48. package/dist/clients/polymarket/createPolymarketDepositConfig.js +15 -0
  49. package/dist/clients/polymarket/index.css +17293 -0
  50. package/dist/clients/polymarket/index.d.ts +8 -0
  51. package/dist/clients/polymarket/index.js +42 -0
  52. package/dist/clients/{polymarket.d.ts → polymarket/polymarket.d.ts} +59 -2
  53. package/dist/clients/polymarket/polymarket.js +24 -0
  54. package/dist/clients/polymarket/usePolymarketAccountBalances.d.ts +66 -0
  55. package/dist/clients/polymarket/usePolymarketAccountBalances.js +12 -0
  56. package/dist/clients/rabbyWallet-TYX2JDHU.js +7 -0
  57. package/dist/clients/rainbowWallet-MFJQCICF.js +7 -0
  58. package/dist/clients/ramperWallet-Q2XAH4WA.js +7 -0
  59. package/dist/clients/rolly.d.ts +2 -0
  60. package/dist/clients/rolly.js +6 -2
  61. package/dist/clients/roninWallet-SAB5ESVK.js +7 -0
  62. package/dist/clients/safeWallet-Y3VPODK2.js +7 -0
  63. package/dist/clients/safeheronWallet-MCFXLKO5.js +7 -0
  64. package/dist/clients/safepalWallet-7YULGM2L.js +7 -0
  65. package/dist/clients/subWallet-5WUZ4IIO.js +7 -0
  66. package/dist/clients/tahoWallet-U2VWWO76.js +7 -0
  67. package/dist/clients/talismanWallet-ZYTPIANG.js +7 -0
  68. package/dist/clients/tokenPocketWallet-FLFG3JUQ.js +7 -0
  69. package/dist/clients/tokenaryWallet-S3JS2IGK.js +7 -0
  70. package/dist/clients/trustWallet-2N5TZJGC.js +7 -0
  71. package/dist/clients/uniswapWallet-NJQBP5VM.js +7 -0
  72. package/dist/clients/walletConnectWallet-E4OQJ4DC.js +7 -0
  73. package/dist/clients/xdefiWallet-ZKBEFEOH.js +7 -0
  74. package/dist/clients/zealWallet-7VO3C4PM.js +7 -0
  75. package/dist/clients/zerionWallet-SEPREHKH.js +7 -0
  76. package/dist/components/Dropdown/AccountSelectDropdown.d.ts +45 -0
  77. package/dist/components/Dropdown/BaseDropdownItem.d.ts +3 -1
  78. package/dist/components/FreeUsdcBanner/FreeUsdcBanner.css.d.ts +15 -0
  79. package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +5 -5
  80. package/dist/components/ModalHeightAnimationLayer/ModalHeightAnimationLayer.d.ts +8 -0
  81. package/dist/consts/customers.d.ts +13 -0
  82. package/dist/consts/funkit.d.ts +2 -0
  83. package/dist/consts/polymarket.d.ts +9 -0
  84. package/dist/domains/aave.d.ts +28 -0
  85. package/dist/domains/dynamicRouting.d.ts +13 -1
  86. package/dist/domains/paymentMethods.d.ts +8 -0
  87. package/dist/domains/quote.d.ts +2 -2
  88. package/dist/hooks/statsig/useDynamicConfig.d.ts +2 -5
  89. package/dist/hooks/statsig/useExperiment.d.ts +1 -33
  90. package/dist/hooks/statsig/useFeatureGate.d.ts +1 -4
  91. package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
  92. package/dist/hooks/useCheckoutTransferInit.d.ts +2 -17
  93. package/dist/hooks/useExchangeOptions.d.ts +11 -2
  94. package/dist/hooks/useTokenAndChainDropdown.d.ts +1 -1
  95. package/dist/hooks/useTokenTransfer.d.ts +3 -8
  96. package/dist/hooks/useUDAParams.d.ts +2 -10
  97. package/dist/index.css +1331 -94
  98. package/dist/index.js +4965 -5413
  99. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
  100. package/dist/modals/CheckoutModal/InputAmount/QuickOptions.d.ts +1 -0
  101. package/dist/modals/CheckoutModal/InputAmount/aaveClient.d.ts +3 -7
  102. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +25 -1
  103. package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +2 -19
  104. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +17 -0
  105. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
  106. package/dist/modals/CheckoutModal/SourceChange/useSourceChangeLayout.d.ts +10 -0
  107. package/dist/modals/CheckoutModal/stepTransition.d.ts +27 -1
  108. package/dist/modals/PolymarketPerpsTransfer/DirectionSwapButton.d.ts +17 -0
  109. package/dist/modals/PolymarketPerpsTransfer/PerpsTransferBottomBar.d.ts +11 -0
  110. package/dist/modals/PolymarketPerpsTransfer/PerpsTransferRows.d.ts +10 -0
  111. package/dist/modals/PolymarketPerpsTransfer/PerpsTransferStep.d.ts +11 -0
  112. package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +52 -0
  113. package/dist/modals/PolymarketPerpsTransfer/TransferActionButton.d.ts +34 -0
  114. package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.css.d.ts +13 -0
  115. package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.d.ts +27 -0
  116. package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +66 -0
  117. package/dist/providers/FunkitCheckoutContext/index.d.ts +10 -1
  118. package/dist/providers/FunkitCheckoutContext/types.d.ts +63 -3
  119. package/dist/providers/FunkitConfigContext.d.ts +13 -2
  120. package/dist/providers/FunkitQuoteContext.d.ts +16 -0
  121. package/dist/providers/SwappedProvider.d.ts +1 -1
  122. package/dist/transports/iframeSwappedTransport.d.ts +1 -1
  123. package/dist/utils/consts.d.ts +1 -2
  124. package/dist/utils/datadogBrowserLogsTransport.d.ts +1 -1
  125. package/dist/utils/freeUsdcBanner.d.ts +3 -0
  126. package/dist/utils/funLogger.d.ts +1 -51
  127. package/dist/utils/statsig/checkFeatureGate.d.ts +1 -1
  128. package/dist/utils/swapped.d.ts +2 -2
  129. package/dist/utils/tokenMath.d.ts +6 -0
  130. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  131. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  132. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  133. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  134. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  135. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  136. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  137. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  138. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  139. package/dist/wallets/walletConnectors/index.js +48 -48
  140. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  141. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  142. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  143. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  144. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  145. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  146. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  147. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  148. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  149. package/package.json +8 -7
  150. package/dist/__generated__/default_configs.d.ts +0 -901
  151. package/dist/__generated__/default_feature_gates.d.ts +0 -20
  152. package/dist/clients/chunk-3QHYYLVM.js +0 -240
  153. package/dist/interfaces/logTransport.d.ts +0 -51
  154. package/dist/interfaces/swapped-transport.d.ts +0 -78
  155. package/dist/utils/flags/resolver.d.ts +0 -34
  156. package/dist/wallets/walletConnectors/{chunk-RB3HR4R2.js → chunk-4NV5BYRP.js} +3 -3
  157. package/dist/wallets/walletConnectors/{chunk-YEZM4CK4.js → chunk-AVDUNQUW.js} +3 -3
  158. package/dist/wallets/walletConnectors/{chunk-MIQTHJ6X.js → chunk-GUQM4QSL.js} +3 -3
  159. package/dist/wallets/walletConnectors/{chunk-4T6ZSRJF.js → chunk-IULPZP2Q.js} +3 -3
  160. package/dist/wallets/walletConnectors/{chunk-HNRB7KJU.js → chunk-JPN6TWIT.js} +3 -3
  161. package/dist/wallets/walletConnectors/{chunk-ZNX4EMPB.js → chunk-KCRO2AGO.js} +3 -3
  162. package/dist/wallets/walletConnectors/{chunk-STVVP43G.js → chunk-KI5Y2BBF.js} +3 -3
  163. package/dist/wallets/walletConnectors/{chunk-X6CGV36L.js → chunk-NR2OGDHQ.js} +3 -3
  164. package/dist/wallets/walletConnectors/{chunk-UK7C2JXW.js → chunk-OEEGYENV.js} +3 -3
  165. package/dist/wallets/walletConnectors/{chunk-F5XEEVG6.js → chunk-OX37G4YT.js} +3 -3
  166. package/dist/wallets/walletConnectors/{chunk-RVOY537T.js → chunk-SWFF3TWJ.js} +3 -3
  167. package/dist/wallets/walletConnectors/{chunk-CPI4TD43.js → chunk-TKB2OY6G.js} +3 -3
  168. package/dist/wallets/walletConnectors/{chunk-2VP2F6EK.js → chunk-W2LCLDPX.js} +3 -3
  169. package/dist/wallets/walletConnectors/{chunk-6BW3HLBG.js → chunk-WAHGI5L7.js} +3 -3
  170. package/dist/wallets/walletConnectors/{chunk-HTHAK6XB.js → chunk-WKNQMP4A.js} +3 -3
  171. package/dist/wallets/walletConnectors/{chunk-VTM6EECM.js → chunk-XCNHV3HS.js} +3 -3
  172. package/dist/wallets/walletConnectors/{chunk-CCQV2ZET.js → chunk-YO2K4MBH.js} +3 -3
  173. package/dist/wallets/walletConnectors/{chunk-VAPGUPHO.js → chunk-YQFGVZGR.js} +3 -3
@@ -21,4 +21,17 @@ export declare function isAaveCustomer(apiKey: string): apiKey is "EWzSv8tWnQ7Uc
21
21
  */
22
22
  export declare function isCustomerNativeFastPathEnabled(apiKey: string): apiKey is "EWzSv8tWnQ7UcZ2IsDqFw1dYo3Df56FX6KBJ5ztS";
23
23
  export declare function isLighterEthSpot(apiKey: string, checkoutConfig: FunkitCheckoutConfig | undefined): boolean | undefined;
24
+ /**
25
+ * Whether a Lighter checkout targets a spot asset (as opposed to a perps
26
+ * deposit). Lighter's spot routes encode "SPOT" in their `dynamicRoutingId`
27
+ * (`LIGHTER_ETH_SPOT`, `LIGHTER_USDC_SPOT_NEW_USER`, …) while perps routes
28
+ * encode "PERPS" (`LIGHTER_USDC_PERPS`, …). The active `dynamicRoutingId`
29
+ * tracks the selected target candidate, so this distinguishes spot from perps
30
+ * even when they share the same target token (the mainnet USDC new-user routes).
31
+ *
32
+ * Used to scope the token-entry-by-default treatment to spot deposits only —
33
+ * perps deposits always open in fiat. A route without a recognisable spot id
34
+ * is treated as non-spot (the safe, fiat default).
35
+ */
36
+ export declare function isLighterSpot(apiKey: string, checkoutConfig: Pick<FunkitCheckoutConfig, 'dynamicRoutingId'> | undefined): boolean;
24
37
  export declare function isLighterSlowDeposit(apiKey: string, checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain'> | undefined): boolean;
@@ -4,6 +4,8 @@ import type { Address } from 'viem';
4
4
  * e.g. on Base it is ETH, but on Polygon it is MATIC/POL. It is not one specific real token address.
5
5
  **/
6
6
  export declare const NATIVE_TOKEN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
7
+ /** WETH on Ethereum mainnet (checksummed). */
8
+ export declare const WETH_MAINNET_ADDRESS: Address;
7
9
  export declare const FUN_ORG_NAME = "Fun.xyz";
8
10
  export declare const FUN_TERMS_URL = "https://fun.xyz/terms";
9
11
  export interface FunkitUserInfoBase {
@@ -1,3 +1,4 @@
1
+ import { type Address } from 'viem';
1
2
  /** Action type signalling a Polymarket Perps deposit (USDC.e → pUSD → Perps). */
2
3
  export declare const POLYMARKET_PERPS_DEPOSIT_ACTION_TYPE = "POLYMARKET_PERPS_DEPOSIT";
3
4
  /**
@@ -5,3 +6,11 @@ export declare const POLYMARKET_PERPS_DEPOSIT_ACTION_TYPE = "POLYMARKET_PERPS_DE
5
6
  * QR/UDA transfers for the deposit action target this address.
6
7
  */
7
8
  export declare const POLYMARKET_PUSD_ADDRESS: `0x${string}`;
9
+ /**
10
+ * Customer-scoped destination-token override for the token-transfer param
11
+ * builder. Polymarket Perps deposits must target pUSD on-chain regardless of
12
+ * the configured target asset. Lives here (not in the now-core
13
+ * `getCheckoutTokenTransferParams`) so the shared param builder stays
14
+ * customer-agnostic — web resolves the override and injects it.
15
+ */
16
+ export declare function getPolymarketPerpsTargetAssetOverride(qrcodeActionType: string | undefined): Address | undefined;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Aave native-supply domain logic: pure constants and predicates shared by
3
+ * the InputAmount fast-path hook and `FunkitQuoteContext` (toggle gating).
4
+ * The `@aave/client` SDK singleton stays in
5
+ * `~/modals/CheckoutModal/InputAmount/aaveClient.ts` — importing it here
6
+ * would run SDK init for every consumer of this module.
7
+ */
8
+ import type { Address } from 'viem';
9
+ import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
10
+ export declare const AAVE_MARKET_ADDRESS_BY_CHAIN: Record<string, Address>;
11
+ interface AaveNativeSupplyContextArgs {
12
+ apiKey: string;
13
+ sourceAsset: {
14
+ chainId: string | number;
15
+ address: string;
16
+ };
17
+ checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain' | 'targetAsset'>;
18
+ }
19
+ /**
20
+ * True when the customer has the Aave native fast-path enabled, the
21
+ * checkout's target chain has an Aave market configured (membership in
22
+ * AAVE_MARKET_ADDRESS_BY_CHAIN is the single source of truth for "Aave
23
+ * supported here"), and the source asset matches the target asset
24
+ * (same chain, same token address). Decoupled from the hook so callers
25
+ * can branch their UI before mounting the hook.
26
+ */
27
+ export declare function isAaveNativeSupplyContext({ apiKey, sourceAsset, checkoutConfig, }: AaveNativeSupplyContextArgs): boolean;
28
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { DynamicRoutePath } from '@funkit/fun-relay';
2
- import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
2
+ import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
3
3
  /**
4
4
  * The path shape accepted by {@link mergeDynamicRoutingIntoConfig} /
5
5
  * `applyDynamicRouting`. It is a {@link DynamicRoutePath} with the
@@ -22,3 +22,15 @@ export type ApplyDynamicRoutingPath = Omit<DynamicRoutePath, 'getCustomRecipient
22
22
  * route when the target asset/chain is rebound.
23
23
  */
24
24
  export declare function mergeDynamicRoutingIntoConfig(config: FunkitCheckoutConfig, path: ApplyDynamicRoutingPath): FunkitCheckoutConfig;
25
+ /**
26
+ * Merge a selected {@link DynamicTargetAssetCandidate} into a checkout config —
27
+ * the pure core of `applyDynamicTargetAssetCandidate`. Rebinds the target token
28
+ * fields and, in lockstep, the `dynamicRoutingId`; when the candidate carries a
29
+ * `customRecipient` (account-style candidates such as Polymarket
30
+ * Predictions/Perps) it also repoints the recipient, otherwise the existing
31
+ * recipient and routing id are preserved.
32
+ *
33
+ * Shared by the SourceChange target-asset dropdown and customer account pickers
34
+ * so destination selection has a single, tested code path.
35
+ */
36
+ export declare function mergeDynamicTargetAssetCandidateIntoConfig(config: FunkitCheckoutConfig, candidate: DynamicTargetAssetCandidate): FunkitCheckoutConfig;
@@ -35,6 +35,14 @@ export interface PaymentMethodVirtualBankInfo extends PaymentMethodVirtualBankIn
35
35
  }
36
36
  export type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo | PaymentMethodVirtualBankInfo;
37
37
  export declare function isConnectablePaymentMethodInfo(value: unknown): value is ConnectablePaymentMethodInfo;
38
+ /**
39
+ * Balance-less rails: checkout methods with no on-chain source holding (Card,
40
+ * Bitcoin Lightning, etc) where "available balance" is not a meaningful concept,
41
+ * so balance/min/max validation is skipped. Only ACCOUNT_BALANCE and BROKERAGE
42
+ * carry a measurable holding. Typed to PaymentMethodInfo's methods, not the full
43
+ * PaymentMethod enum (which also carries Swapped's iframe-only rails).
44
+ */
45
+ export declare function isBalanceLessPaymentMethod(paymentMethod: PaymentMethodInfo['paymentMethod']): boolean;
38
46
  export type PaymentMethodInfo = PaymentMethodCardInfo | PaymentMethodBrokerageInfo | PaymentMethodAccountInfo | PaymentMethodTokenTransferInfo | PaymentMethodBitcoinLightningInfo | PaymentMethodVirtualBankIncompleteInfo;
39
47
  interface CardPaymentMethodParams {
40
48
  paymentMethod: PaymentMethod.CARD;
@@ -18,8 +18,8 @@ export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutI
18
18
  * User-driven preference for the source-side authorization step. Forwarded
19
19
  * to the direct-execution branch (`getDirectExecutionQuote` →
20
20
  * `getCheckoutQuoteV2`) where Relay's `usePermit` flag actually flows. The
21
- * legacy `getApiCheckoutQuote` branch ignores this; the permit toggle is
22
- * scoped to Wallet (Relay direct-execution) only.
21
+ * legacy `getApiCheckoutQuote` branch ignores this. On the Aave native
22
+ * fast path it drives `shouldUsePermitForSupply` instead of flowing here.
23
23
  */
24
24
  usePermit?: boolean): Promise<CheckoutQuoteResponse>;
25
25
  /**
@@ -1,8 +1,5 @@
1
- import fallbackDynamicConfigs from '../../__generated__/default_configs';
2
- type FallbackDynamicConfigs = typeof fallbackDynamicConfigs;
3
- type DynamicConfigName = keyof FallbackDynamicConfigs;
4
- export type DynamicConfigValue<Name extends DynamicConfigName> = FallbackDynamicConfigs[Name]['value'];
1
+ import { type DynamicConfigName, type DynamicConfigValue } from '@funkit/connect-core';
2
+ export type { DynamicConfigName, DynamicConfigValue };
5
3
  export declare const useDynamicConfig: <Name extends DynamicConfigName>(name: Name, options?: {
6
4
  bypassCountryCode?: boolean;
7
5
  }) => DynamicConfigValue<Name>;
8
- export {};
@@ -1,33 +1 @@
1
- /**
2
- * Hook for accessing Statsig experiments with type-safe fallback values.
3
- *
4
- * Unlike feature gates and dynamic configs, experiments don't have a base configuration
5
- * with overrides. Instead, they have multiple horizontal variations. Because of this,
6
- * you must provide a fallback value and can optionally specify the return type.
7
- *
8
- * @example
9
- * // Basic usage (returns string by default)
10
- * const buttonColor = useExperiment('button-color-test', 'value', 'blue')
11
- *
12
- * @example
13
- * // With explicit type parameter
14
- * interface ButtonConfig {
15
- * color: string
16
- * size: 'small' | 'medium' | 'large'
17
- * }
18
- * const config = useExperiment<ButtonConfig>(
19
- * 'button-experiment',
20
- * 'config',
21
- * { color: 'blue', size: 'medium' }
22
- * )
23
- *
24
- * @example
25
- * // Getting a specific parameter
26
- * const variant = useExperiment('checkout-flow-test', 'variant', 'control')
27
- *
28
- * @param experimentName - The name of the experiment in Statsig
29
- * @param parameterName - The name of the parameter to get from the experiment
30
- * @param fallback - The fallback value to use when the experiment/parameter is not available
31
- * @returns The experiment parameter value with the specified type
32
- */
33
- export declare function useExperiment<T = string>(experimentName: string, parameterName: string, fallback: T): T;
1
+ export { useExperiment } from '@funkit/connect-core';
@@ -1,4 +1 @@
1
- import type fallbackFeatureGates from '../../__generated__/default_feature_gates';
2
- type FeatureGateName = keyof typeof fallbackFeatureGates;
3
- export declare const useFeatureGate: (name: FeatureGateName) => boolean;
4
- export {};
1
+ export { useFeatureGate } from '@funkit/connect-core';
@@ -25,6 +25,7 @@ export declare enum CheckoutModalEvent {
25
25
  NAVIGATE_BROKERAGE_TWO_FA = "fc::navigate::brokerage_two_fa",
26
26
  NAVIGATE_BROKERAGE_SUCCESS = "fc::navigate::brokerage_success",
27
27
  NAVIGATE_SWAPPED_IFRAME = "fc::navigate::swapped_iframe",
28
+ NAVIGATE_PERPS_TRANSFER = "fc::navigate::perps_transfer",
28
29
  READY_CONFIRMATION = "fc::ready::confirmation",
29
30
  READY_INPUT_AMOUNT = "fc::ready::input_amount",
30
31
  READY_SELECT_ASSET = "fc::ready::select_asset",
@@ -1,6 +1,6 @@
1
1
  import { type CheckoutInitTokenTransferAddressParams, type CheckoutInitTokenTransferResponse, type FunAddress } from '@funkit/api-base';
2
- import { type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
3
- import { type UDAConfig } from './useUDAParams';
2
+ import { getCheckoutTokenTransferParams } from '@funkit/connect-core';
3
+ export { getCheckoutTokenTransferParams };
4
4
  interface UseCheckoutTransferInitResponse {
5
5
  transferInit: CheckoutInitTokenTransferResponse | undefined;
6
6
  recipientAddr: FunAddress;
@@ -9,20 +9,6 @@ interface UseCheckoutTransferInitResponse {
9
9
  }
10
10
  type CheckoutTokenTransferParams = Omit<CheckoutInitTokenTransferAddressParams, 'logger' | 'clientMetadata'>;
11
11
  export declare function checkoutTransferFetch(params: CheckoutTokenTransferParams): Promise<CheckoutInitTokenTransferResponse>;
12
- export declare function getCheckoutTokenTransferParams({ checkoutConfig, userId, recipientAddr, apiKey, udaParams, }: {
13
- checkoutConfig: FunkitCheckoutConfig | undefined;
14
- userId: string;
15
- recipientAddr: FunAddress;
16
- apiKey: string;
17
- udaParams?: UDAConfig | undefined;
18
- }): {
19
- toChainId: string;
20
- toTokenAddress: `0x${string}`;
21
- actionType: string | undefined;
22
- userId: string;
23
- apiKey: string;
24
- recipientAddr: FunAddress;
25
- } | undefined;
26
12
  export declare function useIsQRCodeTransferEnabled(): {
27
13
  enabled: boolean;
28
14
  comingSoon: boolean;
@@ -32,4 +18,3 @@ export declare function useIsQRCodeTransferEnabled(): {
32
18
  * creates QR code transfer EOA
33
19
  */
34
20
  export declare const useCheckoutTransferInit: (enabled?: boolean) => UseCheckoutTransferInitResponse;
35
- export {};
@@ -5,6 +5,15 @@ import { type BrokerageOption } from '../consts/bluvo';
5
5
  * payment-method preview row. Live entries come first; ComingSoon (and
6
6
  * FOPs that came back without an embeddedFlowUrl) follow.
7
7
  */
8
- export declare function useExchangeOptions({ iconSize, }: {
8
+ export declare function useExchangeOptions({ iconSize }: {
9
9
  iconSize: number;
10
- }): BrokerageOption[];
10
+ }): {
11
+ options: BrokerageOption[];
12
+ /**
13
+ * True while the Swapped FOPs are stale placeholder data (kept visible during
14
+ * a refetch triggered by a recipient/destination change). Callers that act on
15
+ * a selection should gate Swapped options on this, since a stale FOP's
16
+ * embedded flow URL may still target the previous recipient.
17
+ */
18
+ isPlaceholderData: boolean;
19
+ };
@@ -19,7 +19,7 @@ interface UseTokenChainResult {
19
19
  export interface UseTokenAndChainDropdownOptions {
20
20
  transferInit?: CheckoutInitTokenTransferResponse;
21
21
  defaultValues?: TransferTokenDefault;
22
- /** When true, uses legacy withdrawal flags instead of Statsig config. Defaults to false. */
22
+ /** When true, resolves the withdrawal Statsig config instead of the token-transfer one. Defaults to false. */
23
23
  isWithdrawal?: boolean;
24
24
  /** When true, starts with no chain/token pre-selected (user must pick both). Defaults to false. */
25
25
  noDefaultSelection?: boolean;
@@ -1,15 +1,12 @@
1
1
  import type { FunAddress } from '@funkit/api-base';
2
+ import { type MinTransferConfig, getMinTransferValueForChain } from '@funkit/connect-core';
2
3
  import { type QRCodeUri } from '../utils/transfer';
3
4
  export type FeeValue = {
4
5
  label: string;
5
6
  value: number;
6
7
  };
7
- export interface MinTransferConfig {
8
- default: number;
9
- chains: {
10
- [chainId: string]: number;
11
- };
12
- }
8
+ export type { MinTransferConfig };
9
+ export { getMinTransferValueForChain };
13
10
  interface UseTokenTransferResult {
14
11
  /** where money goes to first */
15
12
  depositAddress: FunAddress | undefined;
@@ -27,7 +24,5 @@ interface UseTokenTransferResult {
27
24
  blockchain: 'ethereum' | 'solana' | 'bitcoin' | 'tron';
28
25
  }
29
26
  export declare const useTokenTransfer: (selectedChainId: number | undefined, selectedToken: string | undefined, chainIds?: number[]) => UseTokenTransferResult;
30
- export declare function getMinTransferValueForChain(chainId: number, limits: MinTransferConfig): number;
31
27
  export declare const useMinTransferValueUsd: (selectedChainId: number | undefined) => number;
32
28
  export declare const useMinTransferValueEur: (selectedChainId: number | undefined) => number;
33
- export {};
@@ -1,11 +1,3 @@
1
- import type { Address } from 'viem';
2
- export interface UDAConfig {
3
- targetChain: string;
4
- targetAsset: Address;
5
- targetAssetTicker: string;
6
- iconSrc: string;
7
- qrcodeActionType?: string;
8
- defaultTokenSymbol?: string;
9
- defaultChainId?: string;
10
- }
1
+ import type { UDAConfig } from '@funkit/connect-core';
2
+ export type { UDAConfig };
11
3
  export declare const useUDAParams: (_dynamicRoutingId?: string) => UDAConfig | undefined;