@funkit/connect 12.19.0 → 12.21.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 (146) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/clients/{chunk-N46CL4ZT.js → chunk-4NWQR25X.js} +1 -1
  3. package/dist/clients/{chunk-AELXD5XA.js → chunk-6XJV626L.js} +1 -1
  4. package/dist/clients/chunk-B67ESBGC.js +108 -0
  5. package/dist/clients/{chunk-KH2HLTHP.js → chunk-DAMICUCH.js} +5 -5
  6. package/dist/clients/{chunk-FOXMRDKD.js → chunk-FIJU6HZM.js} +1 -1
  7. package/dist/clients/{chunk-L6JL2XJY.js → chunk-MTKOZB6U.js} +1 -1
  8. package/dist/clients/{chunk-R25GIAD5.js → chunk-PZSKO3BJ.js} +1 -0
  9. package/dist/clients/{chunk-5NYKSTGH.js → chunk-S4SMCBQ4.js} +1 -1
  10. package/dist/clients/{chunk-Y7ONHWCW.js → chunk-T4Q43DNC.js} +2 -2
  11. package/dist/clients/{chunk-YSAAJSWT.js → chunk-YSQX5Z3F.js} +49 -25
  12. package/dist/clients/fanatics.d.ts +5 -7
  13. package/dist/clients/fanatics.js +4 -4
  14. package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
  15. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  16. package/dist/clients/internal/nado/withdrawalForm.js +5 -5
  17. package/dist/clients/internal/nado/withdrawalStatus.js +4 -4
  18. package/dist/clients/lighter.css +8 -1
  19. package/dist/clients/lighter.js +6 -6
  20. package/dist/clients/lighterRh.d.ts +44 -0
  21. package/dist/clients/lighterRh.js +51 -0
  22. package/dist/clients/mallard.js +3 -3
  23. package/dist/clients/nado.js +6 -6
  24. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  25. package/dist/clients/polymarket/index.js +3 -3
  26. package/dist/clients/polymarket/polymarket.d.ts +22 -22
  27. package/dist/clients/polymarket/polymarket.js +2 -2
  28. package/dist/components/Avatar/emojiAvatarForAddress.d.ts +35 -35
  29. package/dist/components/Box/Box.d.ts +63 -63
  30. package/dist/components/ConnectButton/ConnectButton.d.ts +16 -15
  31. package/dist/components/Dialog/Dialog.d.ts +12 -4
  32. package/dist/components/Dialog/hooks.d.ts +3 -3
  33. package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +2 -2
  34. package/dist/components/FunBottomBar/FunBottomBar.d.ts +3 -1
  35. package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
  36. package/dist/components/FunInput/FunInput.d.ts +1 -1
  37. package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
  38. package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
  39. package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -1
  40. package/dist/components/HighPriceImpactAlert/HighPriceImpactAlert.d.ts +7 -0
  41. package/dist/components/Icons/GreenRoundCheckmark.d.ts +2 -1
  42. package/dist/components/Icons/StatusIcons.css.d.ts +2 -2
  43. package/dist/components/Icons/StatusIcons.d.ts +2 -2
  44. package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +3 -1
  45. package/dist/components/ModalSelection/ModalSelection.d.ts +4 -4
  46. package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +1 -1
  47. package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +17 -4
  48. package/dist/components/TokenSwapWidget/TokenSwapPercentOptions/TokenSwapPercentOptions.d.ts +9 -0
  49. package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +6 -2
  50. package/dist/components/TokenSwapWidget/TokenSwapWidgetSkeleton/TokenSwapWidgetSkeleton.d.ts +3 -0
  51. package/dist/consts/checkout.d.ts +8 -8
  52. package/dist/consts/customers.d.ts +5 -1
  53. package/dist/consts/polymarket.d.ts +2 -2
  54. package/dist/consts/quote.d.ts +25 -15
  55. package/dist/css/cssObjectFromTheme.d.ts +1 -1
  56. package/dist/css/sprinkles.css.d.ts +78 -78
  57. package/dist/domains/bridge.d.ts +1 -1
  58. package/dist/domains/convert/assets.d.ts +38 -0
  59. package/dist/domains/convert/inputAmount.d.ts +24 -21
  60. package/dist/domains/convert/reducer.d.ts +11 -6
  61. package/dist/domains/convert/screen.d.ts +10 -1
  62. package/dist/domains/convert/view.d.ts +4 -0
  63. package/dist/domains/priceImpact.d.ts +14 -0
  64. package/dist/hooks/queries/useMeldLimits.d.ts +45 -45
  65. package/dist/hooks/queries/useWithdrawalQuote.d.ts +62 -62
  66. package/dist/hooks/track/useTrack.d.ts +1 -1
  67. package/dist/hooks/useCheckoutQuoteNotification.d.ts +3 -3
  68. package/dist/hooks/useConvertBalances.d.ts +1 -1
  69. package/dist/hooks/useConvertQuote.d.ts +1 -1
  70. package/dist/hooks/useDynamicRoutes.d.ts +1 -1
  71. package/dist/hooks/useFrogAccount.d.ts +77 -77
  72. package/dist/hooks/useIsomorphicEffect.d.ts +2 -2
  73. package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
  74. package/dist/hooks/usePaymentSources.d.ts +1 -1
  75. package/dist/hooks/usePolymarketAccountBalances.d.ts +1 -1
  76. package/dist/index.css +8 -1
  77. package/dist/index.d.ts +2 -0
  78. package/dist/index.js +2149 -1697
  79. package/dist/modals/CheckoutModal/Convert/ConvertAssetList.d.ts +1 -1
  80. package/dist/modals/CheckoutModal/Convert/ConvertAssetRow.d.ts +1 -19
  81. package/dist/modals/CheckoutModal/Convert/ConvertChainRail.d.ts +13 -0
  82. package/dist/modals/CheckoutModal/Convert/ConvertSelectDestinationStep.d.ts +7 -5
  83. package/dist/modals/CheckoutModal/Convert/ConvertSelectSourceStep.d.ts +0 -12
  84. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +13 -2
  85. package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +6 -1
  86. package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +6 -1
  87. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
  88. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +1 -1
  89. package/dist/modals/WithdrawalModal/useMultiSourceWithdrawal.d.ts +1 -1
  90. package/dist/providers/ConvertProvider.d.ts +2 -0
  91. package/dist/providers/FunkitCheckoutContext/types.d.ts +3 -0
  92. package/dist/providers/FunkitStatsigProvider.d.ts +1 -1
  93. package/dist/providers/GeneralWalletProvider.d.ts +21 -21
  94. package/dist/providers/ModalSizeContext.d.ts +4 -4
  95. package/dist/shadow-css.js +1 -1
  96. package/dist/themes/baseTheme.d.ts +1 -1
  97. package/dist/themes/darkTheme.d.ts +6 -4
  98. package/dist/themes/lightTheme.d.ts +6 -4
  99. package/dist/utils/checkout.d.ts +1 -1
  100. package/dist/utils/customer.d.ts +96 -96
  101. package/dist/utils/datadogBrowserLogsTransport.d.ts +11 -5
  102. package/dist/utils/datadogPageExit.d.ts +5 -0
  103. package/dist/utils/funError.d.ts +26 -0
  104. package/dist/utils/funLogger.d.ts +2 -1
  105. package/dist/utils/shakeElement.d.ts +7 -0
  106. package/dist/wallets/computeWalletConnectMetaData.d.ts +1 -1
  107. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  108. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  109. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  110. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  111. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  112. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  113. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  114. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  115. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  116. package/dist/wallets/walletConnectors/index.js +51 -51
  117. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  118. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  119. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  120. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  121. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  122. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  123. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  124. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  125. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  126. package/package.json +9 -9
  127. package/dist/clients/chunk-GTPMJGCF.js +0 -52
  128. package/dist/modals/CheckoutModal/Convert/ConvertChainPills.d.ts +0 -14
  129. package/dist/wallets/walletConnectors/{chunk-OVDCDVFX.js → chunk-34B7OJNT.js} +3 -3
  130. package/dist/wallets/walletConnectors/{chunk-JJBLW4IU.js → chunk-4FHNLTR3.js} +3 -3
  131. package/dist/wallets/walletConnectors/{chunk-TM7UBV3Q.js → chunk-ALGPGI6V.js} +3 -3
  132. package/dist/wallets/walletConnectors/{chunk-MWB6LFSG.js → chunk-BBB2J3US.js} +3 -3
  133. package/dist/wallets/walletConnectors/{chunk-IWPW26AL.js → chunk-BBDNB5TQ.js} +3 -3
  134. package/dist/wallets/walletConnectors/{chunk-53MYTA42.js → chunk-CU5J53XR.js} +3 -3
  135. package/dist/wallets/walletConnectors/{chunk-USLZMUJ3.js → chunk-HOCKAU5H.js} +3 -3
  136. package/dist/wallets/walletConnectors/{chunk-RJF2YEZ5.js → chunk-IA5432IR.js} +3 -3
  137. package/dist/wallets/walletConnectors/{chunk-ASTCNVJC.js → chunk-IWOMSW64.js} +3 -3
  138. package/dist/wallets/walletConnectors/{chunk-KE4CWI3A.js → chunk-NXWG6FG2.js} +3 -3
  139. package/dist/wallets/walletConnectors/{chunk-RQYEGJKL.js → chunk-RFCZYLNR.js} +3 -3
  140. package/dist/wallets/walletConnectors/{chunk-ANODOMIN.js → chunk-RXRYHMRI.js} +3 -3
  141. package/dist/wallets/walletConnectors/{chunk-PPQ6L4K2.js → chunk-SR5CZR3L.js} +3 -3
  142. package/dist/wallets/walletConnectors/{chunk-TIHTQ3OB.js → chunk-TRZDAXCQ.js} +3 -3
  143. package/dist/wallets/walletConnectors/{chunk-F45CUFRR.js → chunk-U52QO5HF.js} +3 -3
  144. package/dist/wallets/walletConnectors/{chunk-A5POD5SV.js → chunk-XODA5ESL.js} +3 -3
  145. package/dist/wallets/walletConnectors/{chunk-FYPQ3HP4.js → chunk-YRMBR6NA.js} +3 -3
  146. package/dist/wallets/walletConnectors/{chunk-65ULY6OC.js → chunk-ZSSSLFQF.js} +3 -3
@@ -5,19 +5,19 @@ import {
5
5
  import {
6
6
  PLACEHOLDER_FUNKIT_USER_INFO
7
7
  } from "../../chunk-CE42WHAA.js";
8
- import "../../chunk-R25GIAD5.js";
8
+ import "../../chunk-PZSKO3BJ.js";
9
9
  import {
10
10
  useFunkitConfig
11
- } from "../../chunk-FOXMRDKD.js";
11
+ } from "../../chunk-FIJU6HZM.js";
12
12
  import {
13
13
  useFunkitTranslation
14
- } from "../../chunk-L6JL2XJY.js";
14
+ } from "../../chunk-MTKOZB6U.js";
15
15
  import "../../chunk-LICTGZXW.js";
16
16
  import "../../chunk-2W2P3OS6.js";
17
+ import "../../chunk-YSQX5Z3F.js";
17
18
  import {
18
19
  logger
19
- } from "../../chunk-GTPMJGCF.js";
20
- import "../../chunk-YSAAJSWT.js";
20
+ } from "../../chunk-B67ESBGC.js";
21
21
 
22
22
  // src/clients/internal/nado/withdrawalForm.ts
23
23
  import {
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  useFunkitConfig
4
- } from "../../chunk-FOXMRDKD.js";
5
- import "../../chunk-L6JL2XJY.js";
4
+ } from "../../chunk-FIJU6HZM.js";
5
+ import "../../chunk-MTKOZB6U.js";
6
6
  import {
7
7
  useAccount
8
8
  } from "../../chunk-2W2P3OS6.js";
9
+ import "../../chunk-YSQX5Z3F.js";
9
10
  import {
10
11
  logger
11
- } from "../../chunk-GTPMJGCF.js";
12
- import "../../chunk-YSAAJSWT.js";
12
+ } from "../../chunk-B67ESBGC.js";
13
13
 
14
14
  // src/clients/internal/nado/withdrawalStatus.ts
15
15
  import {
@@ -16200,7 +16200,7 @@
16200
16200
  flex: 0 0 auto;
16201
16201
  }
16202
16202
 
16203
- /* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAA7VYy27sNgzd369QcTcZoAo8D-dOHaAouu-u-4KWOLY6smTI8jxa5N8LP2NZnsS6bTcJTPGQR9IhqeT5j235lz3s9lvy9xdCCrjRHEWW24TEu7i8vfbGq-A2T8g2ii7XxtZ_H-Ko8Xn78jzGSXKonr5WujYMKctBZUhLyHDjJTh2CXxwiaasqDWgqhOaDv0j8by0vBdgzmjpDMC0sqhsQEarz6hmGdejZbOuhMqoUBctWPCGTwIs5WhByFAo0-okTAFWaBWOLUqJNpjuVdicG7iCpP9BiJPU17ANK2SW4q0T1_clLTRv2YcKpbpCWSKn4mSgWFKl60ClBi5U5meIvQy7zkeoodj2x6grQPd7AtmHQw7hkLiFlMCbnVDT8Y9eJzaJp840Qb20qFQbjmbIFZEfRFFqY0FZx_k4ZyWUsALkhBcDyZ7a_kMo2UflbfM6v7SouuRu2FX95Pj9_SRqErq2n-IHLNb1mJCIq_tOSNAVvWhVOPj8Ssdp4upo1wtyprjBvHDlo86sLtsg1AAXdZWQC5gnSs25NYiu7H_TqZC4mcHaLIG4VFurCzdj5K-7oRcchvJoVvQFTdMSE5ILzlG99qc4bNmtMggYt155QJAwH6DXi_BBgDWCewBdM_weYz-eXI9wAcNvRYgHw--DDX82_DxoGt7xeQsZlEhvUy2O1ntCoLa6sVXMaClTMDSrrUWTkMpCKtFd69PVqkK3-_MkoVdMz8LS0btlwEVVSriPmJHyS7eBFNg5M7pWnDIttZnUbftddYX76-i2-TQvtXldpNPZ9VFL2KxjYdFYAeb-O97sGgoG2Lmj8O82iJ9s8P-KnuSNSlbmqJBpxRdP5-Sq4CSxvfbmN-XCIGsKPyFMy7poxTlUQTNZ3CrIQkP5mh5F6ElaaYXz2nivmN6pK5YJpdx5V41vqKWnljNXZ2UaHuBnwsWl_7nYPx4904B8ZTmys64t5QKkzoa30RITJ4pParbsn_fQXZY6zmwidheZkC3Z-uc8Zd29-_uxO7SZ0BMULaodmKKTjS6BCXsn0fOuIggVUqGort3T-9ODgZQkeo5nEPdCdnHfrf2HwST22bvIHuWnO_Tp-lxLYX8pkAtorgRREVCcPE3mx7eXY3nrJs_7Xz_t5_z_AoS8TZ12vdPSLJpPoxl070MPuzl0tDjQwwI09qCLhNMFqEf48E747R9KAONWTxEAAA */
16203
+ /* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAA7VYy47rNgzd369QcTcToBo4r7m5HqAouu-u-4KWGFuNLBmynEeL-ffCz7EsZ2JNezcJTPOQlHTIo-T5z3Xxt91ttmvyzxdCcrjSDEWa2ZjsN_vi-toZL4LbLCbrKDpfalv3vNtHtc_bl-chTpxB-fS11JVhSFkGKkVaQIorL8GhTeCDCzRFSa0BVR7RtOifieel5S0Hc0JLJwCmlUVlAzJafUI1ybgcLev3SqiUCnXWggUv-CjAUo4WhAyFMq2OwuRghVafwJ7R2HBYXki0wau8CJtxAxeQ9H8IcZT6ErZWhcxSvLac_FzSXPOm-lB-lRcoCuRUHA3kc2R2HajUwIVK_Qx7L8Om9RGq79HtIWr71n0eQbbhkF04ZN9ACuD1Sqhp649eRzaJx9Y0Qr00qEQbjqbPFZGfRF5oY0FZx_kwrUooYQXIUV0MJHtqxhahZBsV19Xr9NCi8py5YReNocPnx1BUJ3Rt3_d3qlg2mkIiLh5XIUEXjLCQcA9G06JQ8Jgdg565lNx03J6QtzfPsGegrNVFE4Qa4KIqY3IG80SpOTUG0U6Q33UiJK4msCZLIC7R1urczRj5793QMw59p9Vv9BlNPV1jkgnOUb12u9gv2W1YCBB8r9MgiON30Mv5fCfAEu7egS6R3_vYj0XwHi5ARxeEuKOjHyz4kY560CRcPHgD6ZlIr2MuDtZbTKCyuraVzGgpEzA0raxFE5PSQiLRfdelq1SJrpDwOKYXTE7C0sG7qYCLspBwGzBDyS_tAhJgp9ToSnHKtNRm1LfNc9k27m-D2-phXmqzKk_GMvjRSFgtq8KisQLM7Q-82iUlGGCntoT_tkB8sMAfFT3OapYszFEi04rP7s7RZcFRYnPs9TflwiCrGz8mTMsqb8jZd0GtLG4XpKGhfE4PJPQorbTCaW-8d0zn1DbLqKTMuaIN17G5W5ujq5M2DQ_wC-Hi3H3Ozo97Nz4gX1mG7KQrS7kAqdP-mjVXiRPFL2ry2t_vfrrMTZyJIrYHGZM1Wfv7PK66_QnRyW4_ZkJ3UDSoRjBFSxtdABP2RqLnTUkQSqRCUV25u_eXBwMpSfS8n0DcA9nsu2ntXwxGsU_eQXYoP92uS9flmgv7a45cQH0kiIqA4uRppB_fXg7FtVWe9x9SzeP0nwlC3sZOm85pToumajSBbn3objOFDhYHupuB7j3obMHJDNQrePde8Nu_p8xgx9ERAAA */
16204
16204
  [data-rk] ._1pzt4231 {
16205
16205
  max-height: 525px;
16206
16206
  max-width: 100vw;
@@ -16225,6 +16225,9 @@
16225
16225
  [data-rk] ._1pzt4231:has(#confirmation-page) {
16226
16226
  max-height: 825px;
16227
16227
  }
16228
+ [data-rk] ._1pzt4231:has(#convert-page) {
16229
+ max-height: 825px;
16230
+ }
16228
16231
  [data-rk] ._1pzt4231:has(#complete-page) {
16229
16232
  max-height: 825px;
16230
16233
  }
@@ -16285,6 +16288,10 @@
16285
16288
  max-height: 80vh;
16286
16289
  max-height: 95svh;
16287
16290
  }
16291
+ [data-rk] ._1pzt4238:has(#convert-page) {
16292
+ max-height: 80vh;
16293
+ max-height: 95svh;
16294
+ }
16288
16295
  [data-rk] ._1pzt423a {
16289
16296
  min-width: initial;
16290
16297
  width: 100vw;
@@ -3,24 +3,24 @@ import {
3
3
  LIGHTER_API_KEY_BY_CHAIN_ID,
4
4
  useLighterAccountQuery,
5
5
  useLighterAccountsQuery
6
- } from "./chunk-R25GIAD5.js";
6
+ } from "./chunk-PZSKO3BJ.js";
7
7
  import {
8
8
  useFunkitConfig
9
- } from "./chunk-FOXMRDKD.js";
9
+ } from "./chunk-FIJU6HZM.js";
10
10
  import {
11
11
  AsyncImage,
12
12
  Box,
13
13
  sanitizeUrl
14
- } from "./chunk-N46CL4ZT.js";
14
+ } from "./chunk-4NWQR25X.js";
15
15
  import {
16
16
  useFunkitTranslation
17
- } from "./chunk-L6JL2XJY.js";
17
+ } from "./chunk-MTKOZB6U.js";
18
18
  import "./chunk-OODIKHYE.js";
19
19
  import "./chunk-2W2P3OS6.js";
20
+ import "./chunk-YSQX5Z3F.js";
20
21
  import {
21
22
  logger
22
- } from "./chunk-GTPMJGCF.js";
23
- import "./chunk-YSAAJSWT.js";
23
+ } from "./chunk-B67ESBGC.js";
24
24
 
25
25
  // src/clients/lighter.tsx
26
26
  import {
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Lighter RH (Lighter's Robinhood instance) deposits for Robinhood Chain tokens via VaultDepositooor.
3
+ *
4
+ * Mirrors the Mallard helper: a host attaches these calls to a destination
5
+ * candidate's `generateActionsParams`, Relay delivers the token on Robinhood
6
+ * Chain (4663), and the calls credit the Lighter RH account owned by the recipient:
7
+ * 1. approve(token, VAULT_DEPOSITOR, MAX)
8
+ * 2. VAULT_DEPOSITOR.depositWithTick(token, RH_ZKLIGHTER,
9
+ * deposit(recipient, assetIndex, routeType, AMOUNT_PLACEHOLDER), 0, tick, recipient)
10
+ */
11
+ import { LIGHTER_RH_STOCK_ASSETS, type LighterRhDepositAsset } from '@funkit/connect-core/clients/lighter';
12
+ import { type LighterRhRouteType } from '@funkit/fun-relay';
13
+ import { type Address } from 'viem';
14
+ import type { FunkitCheckoutActionParams } from '../providers/FunkitCheckoutContext/types';
15
+ export { LIGHTER_RH_STOCK_ASSETS };
16
+ export type { LighterRhDepositAsset, LighterRhRouteType };
17
+ export interface LighterRhDepositActionsConfig {
18
+ /** Owner of the Lighter RH account credited by the deposit (typically the connected wallet). */
19
+ recipientAddress: Address | undefined;
20
+ /** Robinhood Chain token deposited: USDG or one of {@link LIGHTER_RH_STOCK_ASSETS}. */
21
+ tokenAddress: Address;
22
+ /** Balance credited. Defaults to perps for USDG (collateral) and spot for stocks. */
23
+ routeType?: LighterRhRouteType;
24
+ }
25
+ /**
26
+ * Builds the `generateActionsParams` callback for a Lighter RH deposit of a
27
+ * Robinhood Chain token.
28
+ *
29
+ * Usage:
30
+ * ```ts
31
+ * generateActionsParams: createLighterRhDepositActions({
32
+ * recipientAddress: address,
33
+ * tokenAddress: AAPL_ON_ROBINHOOD_CHAIN,
34
+ * })
35
+ * ```
36
+ *
37
+ * Build these candidates once a wallet is connected, and set the candidate's
38
+ * `customRecipient` to that wallet: the owner is captured here (the callback
39
+ * rejects when it is missing), and the recipient replaces any account index a
40
+ * previous Lighter route set.
41
+ *
42
+ * @throws if `tokenAddress` is not a Lighter RH deposit asset (a host config error).
43
+ */
44
+ export declare function createLighterRhDepositActions(config: LighterRhDepositActionsConfig): () => Promise<FunkitCheckoutActionParams[]>;
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import {
3
+ logger
4
+ } from "./chunk-B67ESBGC.js";
5
+
6
+ // src/clients/lighterRh.ts
7
+ import {
8
+ LIGHTER_RH_STOCK_ASSETS,
9
+ getLighterRhDepositAsset
10
+ } from "@funkit/connect-core/clients/lighter";
11
+ import {
12
+ generateLighterRhDepositActions
13
+ } from "@funkit/fun-relay";
14
+ import { getAddress } from "viem";
15
+ function getDefaultRouteType(asset) {
16
+ return asset.symbol === "USDG" ? "perps" : "spot";
17
+ }
18
+ function createLighterRhDepositActions(config) {
19
+ const { recipientAddress, tokenAddress } = config;
20
+ const asset = getLighterRhDepositAsset(tokenAddress);
21
+ if (!asset) {
22
+ throw new Error(
23
+ `${tokenAddress} is not a Lighter Robinhood deposit asset on Robinhood Chain`
24
+ );
25
+ }
26
+ const routeType = config.routeType ?? getDefaultRouteType(asset);
27
+ return async () => {
28
+ if (!recipientAddress) {
29
+ throw new Error(
30
+ "Please connect your wallet before starting a Lighter Robinhood deposit"
31
+ );
32
+ }
33
+ logger.info("lighterRh:depositActions", {
34
+ symbol: asset.symbol,
35
+ assetIndex: asset.assetIndex,
36
+ routeType,
37
+ recipientAddress
38
+ });
39
+ return generateLighterRhDepositActions({
40
+ address: getAddress(recipientAddress),
41
+ assetIndex: asset.assetIndex,
42
+ tickSize: asset.tickSize,
43
+ token: asset.l1Address,
44
+ routeType
45
+ });
46
+ };
47
+ }
48
+ export {
49
+ LIGHTER_RH_STOCK_ASSETS,
50
+ createLighterRhDepositActions
51
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useFunkitTranslation
4
- } from "./chunk-L6JL2XJY.js";
4
+ } from "./chunk-MTKOZB6U.js";
5
5
  import {
6
6
  getAccount,
7
7
  sendTransaction,
@@ -14,10 +14,10 @@ import {
14
14
  useAccount,
15
15
  useConfig
16
16
  } from "./chunk-2W2P3OS6.js";
17
+ import "./chunk-YSQX5Z3F.js";
17
18
  import {
18
19
  logger
19
- } from "./chunk-GTPMJGCF.js";
20
- import "./chunk-YSAAJSWT.js";
20
+ } from "./chunk-B67ESBGC.js";
21
21
 
22
22
  // src/clients/mallard.tsx
23
23
  import { ROBINHOOD_MAINNET_CHAIN_ID } from "@funkit/chains";
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  createNadoWithdrawalCallback
4
- } from "./chunk-KH2HLTHP.js";
4
+ } from "./chunk-DAMICUCH.js";
5
5
  import "./chunk-TKEBGMVW.js";
6
- import "./chunk-AELXD5XA.js";
6
+ import "./chunk-6XJV626L.js";
7
7
  import "./chunk-LICTGZXW.js";
8
8
  import "./chunk-OODIKHYE.js";
9
9
  import {
10
10
  useAccount,
11
11
  useConfig
12
12
  } from "./chunk-2W2P3OS6.js";
13
- import {
14
- logger
15
- } from "./chunk-GTPMJGCF.js";
16
13
  import {
17
14
  i18n_default
18
- } from "./chunk-YSAAJSWT.js";
15
+ } from "./chunk-YSQX5Z3F.js";
16
+ import {
17
+ logger
18
+ } from "./chunk-B67ESBGC.js";
19
19
 
20
20
  // src/clients/nado.tsx
21
21
  import { useMemo } from "react";
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  createPolymarketDepositConfig,
4
4
  createPredictionsGenerateActionParams
5
- } from "../chunk-Y7ONHWCW.js";
5
+ } from "../chunk-T4Q43DNC.js";
6
6
  import {
7
7
  POLYMARKET_PERPS_ROUTING_ID,
8
8
  POLYMARKET_PREDICTIONS_ROUTING_ID
9
- } from "../chunk-5NYKSTGH.js";
9
+ } from "../chunk-S4SMCBQ4.js";
10
10
  import "../chunk-TKEBGMVW.js";
11
- import "../chunk-GTPMJGCF.js";
11
+ import "../chunk-B67ESBGC.js";
12
12
  export {
13
13
  POLYMARKET_PERPS_ROUTING_ID,
14
14
  POLYMARKET_PREDICTIONS_ROUTING_ID,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createPolymarketDepositConfig,
4
4
  createPredictionsGenerateActionParams
5
- } from "../chunk-Y7ONHWCW.js";
5
+ } from "../chunk-T4Q43DNC.js";
6
6
  import {
7
7
  AMOUNT_PLACEHOLDER,
8
8
  COLLATERAL_ONRAMP_ABI,
@@ -15,9 +15,9 @@ import {
15
15
  VAULT_DEPOSITOR_POLYGON,
16
16
  createPerpsGenerateActionParams,
17
17
  createPolymarketWithdrawalConfig
18
- } from "../chunk-5NYKSTGH.js";
18
+ } from "../chunk-S4SMCBQ4.js";
19
19
  import "../chunk-TKEBGMVW.js";
20
- import "../chunk-GTPMJGCF.js";
20
+ import "../chunk-B67ESBGC.js";
21
21
  export {
22
22
  AMOUNT_PLACEHOLDER,
23
23
  COLLATERAL_ONRAMP_ABI,
@@ -126,20 +126,20 @@ export declare function createPolymarketWithdrawalConfig(config: PolymarketWalle
126
126
  /** Polymarket CollateralOnramp on Polygon — permissionless wrap USDC.e → pUSD. */
127
127
  export declare const COLLATERAL_ONRAMP_ADDRESS: Address;
128
128
  export declare const COLLATERAL_ONRAMP_ABI: readonly [{
129
- readonly name: "wrap";
130
- readonly type: "function";
129
+ readonly name: 'wrap';
130
+ readonly type: 'function';
131
131
  readonly inputs: readonly [{
132
- readonly name: "_asset";
133
- readonly type: "address";
132
+ readonly name: '_asset';
133
+ readonly type: 'address';
134
134
  }, {
135
- readonly name: "_to";
136
- readonly type: "address";
135
+ readonly name: '_to';
136
+ readonly type: 'address';
137
137
  }, {
138
- readonly name: "_amount";
139
- readonly type: "uint256";
138
+ readonly name: '_amount';
139
+ readonly type: 'uint256';
140
140
  }];
141
141
  readonly outputs: readonly [];
142
- readonly stateMutability: "nonpayable";
142
+ readonly stateMutability: 'nonpayable';
143
143
  }];
144
144
  /** VaultDepositor on Polygon — same address used by other VaultDepositor flows. */
145
145
  export declare const VAULT_DEPOSITOR_POLYGON: `0x${string}`;
@@ -149,25 +149,25 @@ export declare const VAULT_DEPOSITOR_POLYGON: `0x${string}`;
149
149
  * callData with the actual amount, and forwards to the target vault.
150
150
  */
151
151
  export declare const VAULT_DEPOSITOR_ABI: readonly [{
152
- readonly name: "deposit";
153
- readonly type: "function";
154
- readonly stateMutability: "nonpayable";
152
+ readonly name: 'deposit';
153
+ readonly type: 'function';
154
+ readonly stateMutability: 'nonpayable';
155
155
  readonly inputs: readonly [{
156
- readonly name: "token";
157
- readonly type: "address";
156
+ readonly name: 'token';
157
+ readonly type: 'address';
158
158
  }, {
159
- readonly name: "vault";
160
- readonly type: "address";
159
+ readonly name: 'vault';
160
+ readonly type: 'address';
161
161
  }, {
162
- readonly name: "callData";
163
- readonly type: "bytes";
162
+ readonly name: 'callData';
163
+ readonly type: 'bytes';
164
164
  }, {
165
- readonly name: "minAmountOut";
166
- readonly type: "uint256";
165
+ readonly name: 'minAmountOut';
166
+ readonly type: 'uint256';
167
167
  }];
168
168
  readonly outputs: readonly [{
169
- readonly name: "returnData";
170
- readonly type: "bytes";
169
+ readonly name: 'returnData';
170
+ readonly type: 'bytes';
171
171
  }];
172
172
  }];
173
173
  /** Sentinel the VaultDepositor replaces with the actual deposit amount at exec time. */
@@ -9,9 +9,9 @@ import {
9
9
  VAULT_DEPOSITOR_POLYGON,
10
10
  createPerpsGenerateActionParams,
11
11
  createPolymarketWithdrawalConfig
12
- } from "../chunk-5NYKSTGH.js";
12
+ } from "../chunk-S4SMCBQ4.js";
13
13
  import "../chunk-TKEBGMVW.js";
14
- import "../chunk-GTPMJGCF.js";
14
+ import "../chunk-B67ESBGC.js";
15
15
  export {
16
16
  AMOUNT_PLACEHOLDER,
17
17
  COLLATERAL_ONRAMP_ABI,
@@ -1,106 +1,106 @@
1
1
  export declare function emojiAvatarForAddress(address: string): {
2
2
  readonly color: "#FC5C54";
3
- readonly emoji: "🌶";
3
+ readonly emoji: '🌶';
4
4
  } | {
5
5
  readonly color: "#FFD95A";
6
- readonly emoji: "🤑";
6
+ readonly emoji: '🤑';
7
7
  } | {
8
8
  readonly color: "#E95D72";
9
- readonly emoji: "🐙";
9
+ readonly emoji: '🐙';
10
10
  } | {
11
11
  readonly color: "#6A87C8";
12
- readonly emoji: "🫐";
12
+ readonly emoji: '🫐';
13
13
  } | {
14
14
  readonly color: "#5FD0F3";
15
- readonly emoji: "🐳";
15
+ readonly emoji: '🐳';
16
16
  } | {
17
17
  readonly color: "#FC5C54";
18
- readonly emoji: "🤶";
18
+ readonly emoji: '🤶';
19
19
  } | {
20
20
  readonly color: "#75C06B";
21
- readonly emoji: "🌲";
21
+ readonly emoji: '🌲';
22
22
  } | {
23
23
  readonly color: "#FFDD86";
24
- readonly emoji: "🌞";
24
+ readonly emoji: '🌞';
25
25
  } | {
26
26
  readonly color: "#5FC6D4";
27
- readonly emoji: "🐒";
27
+ readonly emoji: '🐒';
28
28
  } | {
29
29
  readonly color: "#FF949A";
30
- readonly emoji: "🐵";
30
+ readonly emoji: '🐵';
31
31
  } | {
32
32
  readonly color: "#FF8024";
33
- readonly emoji: "🦊";
33
+ readonly emoji: '🦊';
34
34
  } | {
35
35
  readonly color: "#9BA1A4";
36
- readonly emoji: "🐼";
36
+ readonly emoji: '🐼';
37
37
  } | {
38
38
  readonly color: "#EC66FF";
39
- readonly emoji: "🦄";
39
+ readonly emoji: '🦄';
40
40
  } | {
41
41
  readonly color: "#FF8CBC";
42
- readonly emoji: "🐷";
42
+ readonly emoji: '🐷';
43
43
  } | {
44
44
  readonly color: "#FF9A23";
45
- readonly emoji: "🐧";
45
+ readonly emoji: '🐧';
46
46
  } | {
47
47
  readonly color: "#FF949A";
48
- readonly emoji: "🦩";
48
+ readonly emoji: '🦩';
49
49
  } | {
50
50
  readonly color: "#C5DADB";
51
- readonly emoji: "👽";
51
+ readonly emoji: '👽';
52
52
  } | {
53
53
  readonly color: "#FC5C54";
54
- readonly emoji: "🎈";
54
+ readonly emoji: '🎈';
55
55
  } | {
56
56
  readonly color: "#FF949A";
57
- readonly emoji: "🍉";
57
+ readonly emoji: '🍉';
58
58
  } | {
59
59
  readonly color: "#FFD95A";
60
- readonly emoji: "🎉";
60
+ readonly emoji: '🎉';
61
61
  } | {
62
62
  readonly color: "#A8CE63";
63
- readonly emoji: "🐲";
63
+ readonly emoji: '🐲';
64
64
  } | {
65
65
  readonly color: "#71ABFF";
66
- readonly emoji: "🌎";
66
+ readonly emoji: '🌎';
67
67
  } | {
68
68
  readonly color: "#FFE279";
69
- readonly emoji: "🍊";
69
+ readonly emoji: '🍊';
70
70
  } | {
71
71
  readonly color: "#B6B1B6";
72
- readonly emoji: "🐭";
72
+ readonly emoji: '🐭';
73
73
  } | {
74
74
  readonly color: "#FF6780";
75
- readonly emoji: "🍣";
75
+ readonly emoji: '🍣';
76
76
  } | {
77
77
  readonly color: "#FFD95A";
78
- readonly emoji: "🐥";
78
+ readonly emoji: '🐥';
79
79
  } | {
80
80
  readonly color: "#A575FF";
81
- readonly emoji: "👾";
81
+ readonly emoji: '👾';
82
82
  } | {
83
83
  readonly color: "#A8CE63";
84
- readonly emoji: "🥦";
84
+ readonly emoji: '🥦';
85
85
  } | {
86
86
  readonly color: "#FC5C54";
87
- readonly emoji: "👹";
87
+ readonly emoji: '👹';
88
88
  } | {
89
89
  readonly color: "#FFE279";
90
- readonly emoji: "🙀";
90
+ readonly emoji: '🙀';
91
91
  } | {
92
92
  readonly color: "#5FD0F3";
93
- readonly emoji: "⛱";
93
+ readonly emoji: '⛱';
94
94
  } | {
95
95
  readonly color: "#4D82FF";
96
- readonly emoji: "⛵️";
96
+ readonly emoji: '⛵️';
97
97
  } | {
98
98
  readonly color: "#FFE279";
99
- readonly emoji: "🥳";
99
+ readonly emoji: '🥳';
100
100
  } | {
101
101
  readonly color: "#FF949A";
102
- readonly emoji: "🤯";
102
+ readonly emoji: '🤯';
103
103
  } | {
104
104
  readonly color: "#FFB35A";
105
- readonly emoji: "🤠";
105
+ readonly emoji: '🤠';
106
106
  } | undefined;