@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.
- package/CHANGELOG.md +60 -0
- package/dist/clients/{chunk-N46CL4ZT.js → chunk-4NWQR25X.js} +1 -1
- package/dist/clients/{chunk-AELXD5XA.js → chunk-6XJV626L.js} +1 -1
- package/dist/clients/chunk-B67ESBGC.js +108 -0
- package/dist/clients/{chunk-KH2HLTHP.js → chunk-DAMICUCH.js} +5 -5
- package/dist/clients/{chunk-FOXMRDKD.js → chunk-FIJU6HZM.js} +1 -1
- package/dist/clients/{chunk-L6JL2XJY.js → chunk-MTKOZB6U.js} +1 -1
- package/dist/clients/{chunk-R25GIAD5.js → chunk-PZSKO3BJ.js} +1 -0
- package/dist/clients/{chunk-5NYKSTGH.js → chunk-S4SMCBQ4.js} +1 -1
- package/dist/clients/{chunk-Y7ONHWCW.js → chunk-T4Q43DNC.js} +2 -2
- package/dist/clients/{chunk-YSAAJSWT.js → chunk-YSQX5Z3F.js} +49 -25
- package/dist/clients/fanatics.d.ts +5 -7
- package/dist/clients/fanatics.js +4 -4
- package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +5 -5
- package/dist/clients/internal/nado/withdrawalStatus.js +4 -4
- package/dist/clients/lighter.css +8 -1
- package/dist/clients/lighter.js +6 -6
- package/dist/clients/lighterRh.d.ts +44 -0
- package/dist/clients/lighterRh.js +51 -0
- package/dist/clients/mallard.js +3 -3
- package/dist/clients/nado.js +6 -6
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/clients/polymarket/polymarket.d.ts +22 -22
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/components/Avatar/emojiAvatarForAddress.d.ts +35 -35
- package/dist/components/Box/Box.d.ts +63 -63
- package/dist/components/ConnectButton/ConnectButton.d.ts +16 -15
- package/dist/components/Dialog/Dialog.d.ts +12 -4
- package/dist/components/Dialog/hooks.d.ts +3 -3
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +2 -2
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +3 -1
- package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
- package/dist/components/FunInput/FunInput.d.ts +1 -1
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -1
- package/dist/components/HighPriceImpactAlert/HighPriceImpactAlert.d.ts +7 -0
- package/dist/components/Icons/GreenRoundCheckmark.d.ts +2 -1
- package/dist/components/Icons/StatusIcons.css.d.ts +2 -2
- package/dist/components/Icons/StatusIcons.d.ts +2 -2
- package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +3 -1
- package/dist/components/ModalSelection/ModalSelection.d.ts +4 -4
- package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +1 -1
- package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +17 -4
- package/dist/components/TokenSwapWidget/TokenSwapPercentOptions/TokenSwapPercentOptions.d.ts +9 -0
- package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +6 -2
- package/dist/components/TokenSwapWidget/TokenSwapWidgetSkeleton/TokenSwapWidgetSkeleton.d.ts +3 -0
- package/dist/consts/checkout.d.ts +8 -8
- package/dist/consts/customers.d.ts +5 -1
- package/dist/consts/polymarket.d.ts +2 -2
- package/dist/consts/quote.d.ts +25 -15
- package/dist/css/cssObjectFromTheme.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +78 -78
- package/dist/domains/bridge.d.ts +1 -1
- package/dist/domains/convert/assets.d.ts +38 -0
- package/dist/domains/convert/inputAmount.d.ts +24 -21
- package/dist/domains/convert/reducer.d.ts +11 -6
- package/dist/domains/convert/screen.d.ts +10 -1
- package/dist/domains/convert/view.d.ts +4 -0
- package/dist/domains/priceImpact.d.ts +14 -0
- package/dist/hooks/queries/useMeldLimits.d.ts +45 -45
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +62 -62
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useCheckoutQuoteNotification.d.ts +3 -3
- package/dist/hooks/useConvertBalances.d.ts +1 -1
- package/dist/hooks/useConvertQuote.d.ts +1 -1
- package/dist/hooks/useDynamicRoutes.d.ts +1 -1
- package/dist/hooks/useFrogAccount.d.ts +77 -77
- package/dist/hooks/useIsomorphicEffect.d.ts +2 -2
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/hooks/usePolymarketAccountBalances.d.ts +1 -1
- package/dist/index.css +8 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2149 -1697
- package/dist/modals/CheckoutModal/Convert/ConvertAssetList.d.ts +1 -1
- package/dist/modals/CheckoutModal/Convert/ConvertAssetRow.d.ts +1 -19
- package/dist/modals/CheckoutModal/Convert/ConvertChainRail.d.ts +13 -0
- package/dist/modals/CheckoutModal/Convert/ConvertSelectDestinationStep.d.ts +7 -5
- package/dist/modals/CheckoutModal/Convert/ConvertSelectSourceStep.d.ts +0 -12
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +13 -2
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +6 -1
- package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +6 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +1 -1
- package/dist/modals/WithdrawalModal/useMultiSourceWithdrawal.d.ts +1 -1
- package/dist/providers/ConvertProvider.d.ts +2 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +3 -0
- package/dist/providers/FunkitStatsigProvider.d.ts +1 -1
- package/dist/providers/GeneralWalletProvider.d.ts +21 -21
- package/dist/providers/ModalSizeContext.d.ts +4 -4
- package/dist/shadow-css.js +1 -1
- package/dist/themes/baseTheme.d.ts +1 -1
- package/dist/themes/darkTheme.d.ts +6 -4
- package/dist/themes/lightTheme.d.ts +6 -4
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/customer.d.ts +96 -96
- package/dist/utils/datadogBrowserLogsTransport.d.ts +11 -5
- package/dist/utils/datadogPageExit.d.ts +5 -0
- package/dist/utils/funError.d.ts +26 -0
- package/dist/utils/funLogger.d.ts +2 -1
- package/dist/utils/shakeElement.d.ts +7 -0
- package/dist/wallets/computeWalletConnectMetaData.d.ts +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +51 -51
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +9 -9
- package/dist/clients/chunk-GTPMJGCF.js +0 -52
- package/dist/modals/CheckoutModal/Convert/ConvertChainPills.d.ts +0 -14
- package/dist/wallets/walletConnectors/{chunk-OVDCDVFX.js → chunk-34B7OJNT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-JJBLW4IU.js → chunk-4FHNLTR3.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TM7UBV3Q.js → chunk-ALGPGI6V.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-MWB6LFSG.js → chunk-BBB2J3US.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IWPW26AL.js → chunk-BBDNB5TQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-53MYTA42.js → chunk-CU5J53XR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-USLZMUJ3.js → chunk-HOCKAU5H.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RJF2YEZ5.js → chunk-IA5432IR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ASTCNVJC.js → chunk-IWOMSW64.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KE4CWI3A.js → chunk-NXWG6FG2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RQYEGJKL.js → chunk-RFCZYLNR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ANODOMIN.js → chunk-RXRYHMRI.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-PPQ6L4K2.js → chunk-SR5CZR3L.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TIHTQ3OB.js → chunk-TRZDAXCQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-F45CUFRR.js → chunk-U52QO5HF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-A5POD5SV.js → chunk-XODA5ESL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-FYPQ3HP4.js → chunk-YRMBR6NA.js} +3 -3
- 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-
|
|
8
|
+
import "../../chunk-PZSKO3BJ.js";
|
|
9
9
|
import {
|
|
10
10
|
useFunkitConfig
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-FIJU6HZM.js";
|
|
12
12
|
import {
|
|
13
13
|
useFunkitTranslation
|
|
14
|
-
} from "../../chunk-
|
|
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-
|
|
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-
|
|
5
|
-
import "../../chunk-
|
|
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-
|
|
12
|
-
import "../../chunk-YSAAJSWT.js";
|
|
12
|
+
} from "../../chunk-B67ESBGC.js";
|
|
13
13
|
|
|
14
14
|
// src/clients/internal/nado/withdrawalStatus.ts
|
|
15
15
|
import {
|
package/dist/clients/lighter.css
CHANGED
|
@@ -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=#
|
|
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;
|
package/dist/clients/lighter.js
CHANGED
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
LIGHTER_API_KEY_BY_CHAIN_ID,
|
|
4
4
|
useLighterAccountQuery,
|
|
5
5
|
useLighterAccountsQuery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PZSKO3BJ.js";
|
|
7
7
|
import {
|
|
8
8
|
useFunkitConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FIJU6HZM.js";
|
|
10
10
|
import {
|
|
11
11
|
AsyncImage,
|
|
12
12
|
Box,
|
|
13
13
|
sanitizeUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4NWQR25X.js";
|
|
15
15
|
import {
|
|
16
16
|
useFunkitTranslation
|
|
17
|
-
} from "./chunk-
|
|
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-
|
|
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
|
+
};
|
package/dist/clients/mallard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useFunkitTranslation
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
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";
|
package/dist/clients/nado.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DAMICUCH.js";
|
|
5
5
|
import "./chunk-TKEBGMVW.js";
|
|
6
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
5
|
+
} from "../chunk-T4Q43DNC.js";
|
|
6
6
|
import {
|
|
7
7
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
8
8
|
POLYMARKET_PREDICTIONS_ROUTING_ID
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-S4SMCBQ4.js";
|
|
10
10
|
import "../chunk-TKEBGMVW.js";
|
|
11
|
-
import "../chunk-
|
|
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-
|
|
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-
|
|
18
|
+
} from "../chunk-S4SMCBQ4.js";
|
|
19
19
|
import "../chunk-TKEBGMVW.js";
|
|
20
|
-
import "../chunk-
|
|
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:
|
|
130
|
-
readonly type:
|
|
129
|
+
readonly name: 'wrap';
|
|
130
|
+
readonly type: 'function';
|
|
131
131
|
readonly inputs: readonly [{
|
|
132
|
-
readonly name:
|
|
133
|
-
readonly type:
|
|
132
|
+
readonly name: '_asset';
|
|
133
|
+
readonly type: 'address';
|
|
134
134
|
}, {
|
|
135
|
-
readonly name:
|
|
136
|
-
readonly type:
|
|
135
|
+
readonly name: '_to';
|
|
136
|
+
readonly type: 'address';
|
|
137
137
|
}, {
|
|
138
|
-
readonly name:
|
|
139
|
-
readonly type:
|
|
138
|
+
readonly name: '_amount';
|
|
139
|
+
readonly type: 'uint256';
|
|
140
140
|
}];
|
|
141
141
|
readonly outputs: readonly [];
|
|
142
|
-
readonly stateMutability:
|
|
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:
|
|
153
|
-
readonly type:
|
|
154
|
-
readonly stateMutability:
|
|
152
|
+
readonly name: 'deposit';
|
|
153
|
+
readonly type: 'function';
|
|
154
|
+
readonly stateMutability: 'nonpayable';
|
|
155
155
|
readonly inputs: readonly [{
|
|
156
|
-
readonly name:
|
|
157
|
-
readonly type:
|
|
156
|
+
readonly name: 'token';
|
|
157
|
+
readonly type: 'address';
|
|
158
158
|
}, {
|
|
159
|
-
readonly name:
|
|
160
|
-
readonly type:
|
|
159
|
+
readonly name: 'vault';
|
|
160
|
+
readonly type: 'address';
|
|
161
161
|
}, {
|
|
162
|
-
readonly name:
|
|
163
|
-
readonly type:
|
|
162
|
+
readonly name: 'callData';
|
|
163
|
+
readonly type: 'bytes';
|
|
164
164
|
}, {
|
|
165
|
-
readonly name:
|
|
166
|
-
readonly type:
|
|
165
|
+
readonly name: 'minAmountOut';
|
|
166
|
+
readonly type: 'uint256';
|
|
167
167
|
}];
|
|
168
168
|
readonly outputs: readonly [{
|
|
169
|
-
readonly name:
|
|
170
|
-
readonly type:
|
|
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-
|
|
12
|
+
} from "../chunk-S4SMCBQ4.js";
|
|
13
13
|
import "../chunk-TKEBGMVW.js";
|
|
14
|
-
import "../chunk-
|
|
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;
|