@funkit/connect 12.16.0 → 12.17.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 +57 -0
- package/dist/clients/axiom.d.ts +1 -1
- package/dist/clients/{chunk-7JYLS7IF.js → chunk-2L6IKKNH.js} +48 -32
- package/dist/clients/{chunk-6IH7AWFA.js → chunk-HANOVGPH.js} +1 -1
- package/dist/clients/{chunk-OB5GKTP2.js → chunk-LVR6RQMO.js} +1 -1
- package/dist/clients/chunk-R25GIAD5.js +59 -0
- package/dist/clients/{chunk-UZ3NA7HN.js → chunk-TWP5LFPX.js} +5 -5
- package/dist/clients/{chunk-BKK2BFIP.js → chunk-V4RIF2NR.js} +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +4 -4
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.d.ts +29 -16
- package/dist/clients/lighter.js +149 -68
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/consts/customers.d.ts +12 -1
- package/dist/domains/convert/assets.d.ts +22 -0
- package/dist/domains/convert/balances.d.ts +21 -24
- package/dist/domains/convert/errors.d.ts +38 -0
- package/dist/domains/convert/execution.d.ts +39 -0
- package/dist/domains/convert/inputAmount.d.ts +24 -0
- package/dist/domains/convert/quote.d.ts +24 -0
- package/dist/domains/convert/settlement.d.ts +47 -0
- package/dist/domains/convert/submit.d.ts +46 -0
- package/dist/domains/convert/types.d.ts +39 -23
- package/dist/domains/nativeFeeReserve.d.ts +29 -0
- package/dist/domains/quote.d.ts +14 -1
- package/dist/hooks/queries/useWithdrawFops.d.ts +6 -0
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +4 -1
- package/dist/hooks/track/WithdrawModalEvent.d.ts +1 -0
- package/dist/hooks/track/analytics/events.d.ts +59 -1
- package/dist/hooks/track/analytics/mappers.d.ts +5 -4
- package/dist/hooks/track/analytics/resolveIframeStepNavigation.d.ts +18 -0
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +2 -2
- package/dist/hooks/track/analytics/useTrackSwappedIframeEvents.d.ts +5 -0
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +2 -2
- package/dist/hooks/track/useQuoteAttemptCounter.d.ts +2 -0
- package/dist/hooks/useConvertAssets.d.ts +9 -0
- package/dist/hooks/useConvertBalances.d.ts +44 -0
- package/dist/hooks/useConvertExecute.d.ts +77 -0
- package/dist/hooks/useConvertInputAmount.d.ts +26 -0
- package/dist/hooks/useConvertMaxAmount.d.ts +11 -0
- package/dist/hooks/useConvertQuote.d.ts +33 -0
- package/dist/hooks/useConvertTransactionStatus.d.ts +23 -0
- package/dist/hooks/useMaxSpendableAmount.d.ts +19 -0
- package/dist/hooks/usePrepareConvertSubmit.d.ts +22 -0
- package/dist/hooks/useStepQueryReadiness.d.ts +45 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2396 -1598
- package/dist/modals/CheckoutModal/SwappedIframe/swappedIframeReady.track.d.ts +8 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -2
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +48 -15
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +4 -1
- package/dist/modals/WithdrawalModal/useMaxWithdrawableAmount.d.ts +10 -0
- package/dist/modals/WithdrawalModal/withdrawalFormHelpers.d.ts +28 -8
- package/dist/providers/FunkitQuoteContext.track.d.ts +23 -3
- package/dist/providers/SwappedProvider.d.ts +7 -0
- package/dist/utils/customer.d.ts +34 -4
- package/dist/wallets/walletConnectors/index.js +44 -44
- package/package.json +6 -6
- package/dist/clients/chunk-6EU6CXNH.js +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 411309d: Resolve assets and poll balances for the Convert widget; the balance getter is now one call for every listed asset and leaves out what it can't read instead of throwing
|
|
8
|
+
- 72658f7: Add conversion execution and settlement tracking for the Convert widget. Updated convert error stages.
|
|
9
|
+
- 719b75e: Lighter withdrawals take an optional `chainId` on `LighterWithdrawalConfig` (mainnet by default); under the Lighter Robinhood API key, `useLighterWithdrawalConfig` offers Fast withdrawals of USDG (Perps) from Lighter on Robinhood.
|
|
10
|
+
- 017c993: Lighter on Robinhood withdrawals offer Secure (USDG to Robinhood Chain) alongside Fast under the Lighter Robinhood API key, and the Secure withdrawal callback receives the Lighter instance to sign on.
|
|
11
|
+
- 0fbc19f: Track Swapped iframe step navigation via a new `fc_iframe_step_viewed` analytics event (deposit and withdrawal).
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- bd81739: Add Max for the Convert widget, keeping room for network fees on native-token sources
|
|
16
|
+
- 31e87b4: Re-check the balance and quote before a Convert is signed
|
|
17
|
+
- 5faac1f: Add live quotes for the Convert widget, refreshed while shown
|
|
18
|
+
- 5ef2971: Lighter RH wallet deposits take their recipient from the user's RH Lighter account and wait while that lookup is in flight.
|
|
19
|
+
- 81d1231: Lighter Robinhood checkouts deposit to the user's Robinhood Lighter account and show Robinhood Lighter as the receive chain.
|
|
20
|
+
- 81d1231: Recognize the Lighter Robinhood API key as its own Lighter customer: each Lighter key only looks up, stores and withdraws from its own Lighter instance.
|
|
21
|
+
- 7e45a8b: Keep deposit method-selection analytics consistent across Connect SDKs, including saved methods and direct crypto entry on mobile.
|
|
22
|
+
- 5cda130: Maintain mainnet Lighter withdrawals with the instance-aware core APIs.
|
|
23
|
+
- 78576f2: Lighter account lookups stay on the mainnet Lighter instance (no behavior change).
|
|
24
|
+
- 4e96bf5: Max on native-token withdrawals (SOL, ETH, BNB, POL) now leaves enough of the token to cover network fees.
|
|
25
|
+
- 94db347: No consumer-facing changes.
|
|
26
|
+
- 017c993: Support Lighter on Robinhood Secure withdrawals for supported spot assets and separate USDG spot balances while keeping Fast withdrawals perps-only.
|
|
27
|
+
- fab5649: Track Swapped iframe ready timing for checkout perf analysis.
|
|
28
|
+
- e12934d: Include quote attempt numbers in checkout and withdrawal performance analytics.
|
|
29
|
+
- b6e25e6: Track checkout quote timing for checkout perf analysis.
|
|
30
|
+
- 71a5174: Track per-step query load timing for checkout perf analysis.
|
|
31
|
+
- b1bfc18: Track fc_perf_step_ready timing for the withdrawal FOPS call, both in the withdrawal modal and the checkout modal's cashier withdraw-cash flow.
|
|
32
|
+
- be39ed3: Withdrawal USD limit callbacks now receive the selected source token, and withdrawals from non-stablecoin sources wait for a live price before they can be submitted.
|
|
33
|
+
- Updated dependencies [f6273ef]
|
|
34
|
+
- Updated dependencies [81d1231]
|
|
35
|
+
- Updated dependencies [1849e07]
|
|
36
|
+
- Updated dependencies [e005b0d]
|
|
37
|
+
- Updated dependencies [719b75e]
|
|
38
|
+
- Updated dependencies [78576f2]
|
|
39
|
+
- Updated dependencies [5cda130]
|
|
40
|
+
- Updated dependencies [d41c7b0]
|
|
41
|
+
- Updated dependencies [27f5a31]
|
|
42
|
+
- Updated dependencies [5ef2971]
|
|
43
|
+
- Updated dependencies [017c993]
|
|
44
|
+
- Updated dependencies [31e87b4]
|
|
45
|
+
- Updated dependencies [5faac1f]
|
|
46
|
+
- Updated dependencies [72658f7]
|
|
47
|
+
- Updated dependencies [27f5a31]
|
|
48
|
+
- Updated dependencies [5ef2971]
|
|
49
|
+
- Updated dependencies [4cf331b]
|
|
50
|
+
- Updated dependencies [ec98e8e]
|
|
51
|
+
- Updated dependencies [63aad8d]
|
|
52
|
+
- Updated dependencies [017c993]
|
|
53
|
+
- Updated dependencies [be39ed3]
|
|
54
|
+
- @funkit/api-base@9.1.0
|
|
55
|
+
- @funkit/utils@5.1.0
|
|
56
|
+
- @funkit/chains@2.6.0
|
|
57
|
+
- @funkit/connect-core@10.0.0
|
|
58
|
+
- @funkit/fun-relay@3.2.0
|
|
59
|
+
|
|
3
60
|
## 12.16.0
|
|
4
61
|
|
|
5
62
|
### Minor Changes
|
package/dist/clients/axiom.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConvertConfig } from '../domains/convert/types';
|
|
2
2
|
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext/types';
|
|
3
|
-
export type { ConvertAsset, ConvertConfig, ConvertErrorResult, ConvertErrorStage, ConvertRecipientAddresses, ConvertResolvedAsset,
|
|
3
|
+
export type { ConvertAsset, ConvertConfig, ConvertErrorResult, ConvertErrorStage, ConvertRecipientAddresses, ConvertResolvedAsset, ConvertAssetBalance, ConvertSourceWallet, ConvertSuccessResult, ConvertTransaction, ConvertVm, GetConvertBalances, GetConvertSourceWallet, } from '../domains/convert/types';
|
|
4
4
|
export interface CreateAxiomDepositConfigParams {
|
|
5
5
|
/** The checkout config the Deposit tab runs. */
|
|
6
6
|
checkoutConfig: FunkitCheckoutConfig;
|
|
@@ -410,15 +410,17 @@ var en_default = {
|
|
|
410
410
|
sectionCrypto: "Crypto",
|
|
411
411
|
methodFast: "Fast",
|
|
412
412
|
methodSecure: "Native Bridge",
|
|
413
|
-
fastDisclaimer: "
|
|
414
|
-
fastDisclaimerUnified: "
|
|
413
|
+
fastDisclaimer: "{{symbol}} Perps only \xB7 Multiple chains \xB7 Instant",
|
|
414
|
+
fastDisclaimerUnified: "{{symbol}} only \xB7 Multiple chains \xB7 Instant",
|
|
415
415
|
secureDisclaimer: "All tokens \xB7 Ethereum chain only \xB7 {{delay}}",
|
|
416
|
+
secureDisclaimerRobinhood: "All tokens \xB7 Robinhood Chain only \xB7 {{delay}}",
|
|
417
|
+
secureDisclaimerRobinhoodNoDelay: "All tokens \xB7 Robinhood Chain only",
|
|
416
418
|
secureFallbackDelay: "60+ minutes",
|
|
417
419
|
lighterSecureAddressTooltip: "You can only withdraw to your connected wallet",
|
|
418
420
|
lighterSecureTokenTooltip: "You can only receive the token you are choosing to withdraw",
|
|
419
|
-
lighterSecureChainTooltip: "Secure withdrawals are only available on
|
|
421
|
+
lighterSecureChainTooltip: "Secure withdrawals are only available on {{chainName}}",
|
|
420
422
|
lockedReceiveTooltip: "{{tokenSymbol}} can only be withdrawn on {{chainName}}",
|
|
421
|
-
lighterFastTokenTooltip: "Fast withdrawals are only available for your
|
|
423
|
+
lighterFastTokenTooltip: "Fast withdrawals are only available for your {{symbol}} (Perps) balance",
|
|
422
424
|
lighterWithdrawOnChain: "Withdraw on-chain",
|
|
423
425
|
lighterL1FallbackNotice: "You've reached Lighter's secure withdrawal rate limit. You can withdraw directly on-chain instead.",
|
|
424
426
|
enableBorrowing: "Enable borrowing",
|
|
@@ -1028,15 +1030,17 @@ var es_default = {
|
|
|
1028
1030
|
sectionCrypto: "Cripto",
|
|
1029
1031
|
methodFast: "R\xE1pido",
|
|
1030
1032
|
methodSecure: "Puente Nativo",
|
|
1031
|
-
fastDisclaimer: "Solo
|
|
1032
|
-
fastDisclaimerUnified: "Solo
|
|
1033
|
+
fastDisclaimer: "Solo {{symbol}} Perps \xB7 M\xFAltiples cadenas \xB7 Instant\xE1neo",
|
|
1034
|
+
fastDisclaimerUnified: "Solo {{symbol}} \xB7 M\xFAltiples cadenas \xB7 Instant\xE1neo",
|
|
1033
1035
|
secureDisclaimer: "Todos los tokens \xB7 Solo cadena Ethereum \xB7 {{delay}}",
|
|
1036
|
+
secureDisclaimerRobinhood: "Todos los tokens \xB7 Solo Robinhood Chain \xB7 {{delay}}",
|
|
1037
|
+
secureDisclaimerRobinhoodNoDelay: "Todos los tokens \xB7 Solo Robinhood Chain",
|
|
1034
1038
|
secureFallbackDelay: "60+ minutos",
|
|
1035
1039
|
lighterSecureAddressTooltip: "Solo puedes retirar a tu billetera conectada",
|
|
1036
1040
|
lighterSecureTokenTooltip: "Solo puedes recibir el token que eliges retirar",
|
|
1037
|
-
lighterSecureChainTooltip: "Los retiros seguros solo est\xE1n disponibles en
|
|
1041
|
+
lighterSecureChainTooltip: "Los retiros seguros solo est\xE1n disponibles en {{chainName}}",
|
|
1038
1042
|
lockedReceiveTooltip: "{{tokenSymbol}} solo se puede retirar en {{chainName}}",
|
|
1039
|
-
lighterFastTokenTooltip: "Los retiros r\xE1pidos solo est\xE1n disponibles para tu saldo de
|
|
1043
|
+
lighterFastTokenTooltip: "Los retiros r\xE1pidos solo est\xE1n disponibles para tu saldo de {{symbol}} (Perps)",
|
|
1040
1044
|
lighterWithdrawOnChain: "Retirar on-chain",
|
|
1041
1045
|
lighterL1FallbackNotice: "Has alcanzado el l\xEDmite de retiros seguros de Lighter. Puedes retirar directamente on-chain.",
|
|
1042
1046
|
enableBorrowing: "Habilitar pr\xE9stamo",
|
|
@@ -1646,15 +1650,17 @@ var fr_default = {
|
|
|
1646
1650
|
sectionCrypto: "Crypto",
|
|
1647
1651
|
methodFast: "Rapide",
|
|
1648
1652
|
methodSecure: "Pont natif",
|
|
1649
|
-
fastDisclaimer: "
|
|
1650
|
-
fastDisclaimerUnified: "
|
|
1653
|
+
fastDisclaimer: "{{symbol}} Perps uniquement \xB7 Plusieurs cha\xEEnes \xB7 Instantan\xE9",
|
|
1654
|
+
fastDisclaimerUnified: "{{symbol}} uniquement \xB7 Plusieurs cha\xEEnes \xB7 Instantan\xE9",
|
|
1651
1655
|
secureDisclaimer: "Tous les tokens \xB7 Cha\xEEne Ethereum uniquement \xB7 {{delay}}",
|
|
1656
|
+
secureDisclaimerRobinhood: "Tous les tokens \xB7 Robinhood Chain uniquement \xB7 {{delay}}",
|
|
1657
|
+
secureDisclaimerRobinhoodNoDelay: "Tous les tokens \xB7 Robinhood Chain uniquement",
|
|
1652
1658
|
secureFallbackDelay: "60+ minutes",
|
|
1653
1659
|
lighterSecureAddressTooltip: "Vous ne pouvez retirer que vers votre portefeuille connect\xE9",
|
|
1654
1660
|
lighterSecureTokenTooltip: "Vous ne pouvez recevoir que le jeton que vous choisissez de retirer",
|
|
1655
|
-
lighterSecureChainTooltip: "Les retraits s\xE9curis\xE9s ne sont disponibles que sur
|
|
1661
|
+
lighterSecureChainTooltip: "Les retraits s\xE9curis\xE9s ne sont disponibles que sur {{chainName}}",
|
|
1656
1662
|
lockedReceiveTooltip: "{{tokenSymbol}} ne peut \xEAtre retir\xE9 que sur {{chainName}}",
|
|
1657
|
-
lighterFastTokenTooltip: "Les retraits rapides ne sont disponibles que pour votre solde
|
|
1663
|
+
lighterFastTokenTooltip: "Les retraits rapides ne sont disponibles que pour votre solde {{symbol}} (Perps)",
|
|
1658
1664
|
lighterWithdrawOnChain: "Retirer on-chain",
|
|
1659
1665
|
lighterL1FallbackNotice: "Vous avez atteint la limite de retraits s\xE9curis\xE9s de Lighter. Vous pouvez retirer directement on-chain.",
|
|
1660
1666
|
enableBorrowing: "Activer l'emprunt",
|
|
@@ -2264,15 +2270,17 @@ var ja_default = {
|
|
|
2264
2270
|
sectionCrypto: "\u6697\u53F7\u8CC7\u7523",
|
|
2265
2271
|
methodFast: "\u9AD8\u901F",
|
|
2266
2272
|
methodSecure: "\u30CD\u30A4\u30C6\u30A3\u30D6\u30D6\u30EA\u30C3\u30B8",
|
|
2267
|
-
fastDisclaimer: "
|
|
2268
|
-
fastDisclaimerUnified: "
|
|
2273
|
+
fastDisclaimer: "{{symbol}}\u30D1\u30FC\u30D7\u30B9\u306E\u307F \xB7 \u8907\u6570\u30C1\u30A7\u30FC\u30F3 \xB7 \u5373\u6642",
|
|
2274
|
+
fastDisclaimerUnified: "{{symbol}}\u306E\u307F \xB7 \u8907\u6570\u30C1\u30A7\u30FC\u30F3 \xB7 \u5373\u6642",
|
|
2269
2275
|
secureDisclaimer: "\u5168\u30C8\u30FC\u30AF\u30F3 \xB7 \u30A4\u30FC\u30B5\u30EA\u30A2\u30E0\u30C1\u30A7\u30FC\u30F3\u306E\u307F \xB7 {{delay}}",
|
|
2276
|
+
secureDisclaimerRobinhood: "\u5168\u30C8\u30FC\u30AF\u30F3 \xB7 Robinhood Chain\u306E\u307F \xB7 {{delay}}",
|
|
2277
|
+
secureDisclaimerRobinhoodNoDelay: "\u5168\u30C8\u30FC\u30AF\u30F3 \xB7 Robinhood Chain\u306E\u307F",
|
|
2270
2278
|
secureFallbackDelay: "60\u5206\u4EE5\u4E0A",
|
|
2271
2279
|
lighterSecureAddressTooltip: "\u63A5\u7D9A\u4E2D\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306B\u306E\u307F\u51FA\u91D1\u3067\u304D\u307E\u3059",
|
|
2272
2280
|
lighterSecureTokenTooltip: "\u51FA\u91D1\u3059\u308B\u901A\u8CA8\u306E\u307F\u53D7\u3051\u53D6\u308C\u307E\u3059",
|
|
2273
|
-
lighterSecureChainTooltip: "\u30BB\u30AD\u30E5\u30A2\u51FA\u91D1\u306F\
|
|
2281
|
+
lighterSecureChainTooltip: "\u30BB\u30AD\u30E5\u30A2\u51FA\u91D1\u306F{{chainName}}\u3067\u306E\u307F\u5229\u7528\u3067\u304D\u307E\u3059",
|
|
2274
2282
|
lockedReceiveTooltip: "{{tokenSymbol}} \u306F {{chainName}} \u3067\u306E\u307F\u51FA\u91D1\u3067\u304D\u307E\u3059",
|
|
2275
|
-
lighterFastTokenTooltip: "\u9AD8\u901F\u51FA\u91D1\
|
|
2283
|
+
lighterFastTokenTooltip: "\u9AD8\u901F\u51FA\u91D1\u306F{{symbol}} (Perps)\u6B8B\u9AD8\u3067\u306E\u307F\u5229\u7528\u3067\u304D\u307E\u3059",
|
|
2276
2284
|
lighterWithdrawOnChain: "\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u3067\u51FA\u91D1",
|
|
2277
2285
|
lighterL1FallbackNotice: "Lighter\u306E\u30BB\u30AD\u30E5\u30A2\u51FA\u91D1\u306E\u30EC\u30FC\u30C8\u5236\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002\u4EE3\u308F\u308A\u306B\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u3067\u76F4\u63A5\u51FA\u91D1\u3067\u304D\u307E\u3059\u3002",
|
|
2278
2286
|
enableBorrowing: "\u501F\u5165\u3092\u6709\u52B9\u306B\u3059\u308B",
|
|
@@ -2882,15 +2890,17 @@ var ko_default = {
|
|
|
2882
2890
|
sectionCrypto: "\uC554\uD638\uD654\uD3D0",
|
|
2883
2891
|
methodFast: "\uBE60\uB978",
|
|
2884
2892
|
methodSecure: "\uB124\uC774\uD2F0\uBE0C \uBE0C\uB9AC\uC9C0",
|
|
2885
|
-
fastDisclaimer: "
|
|
2886
|
-
fastDisclaimerUnified: "
|
|
2893
|
+
fastDisclaimer: "{{symbol}} \uD37C\uD504\uC2A4\uB9CC \xB7 \uB2E4\uC911 \uCCB4\uC778 \xB7 \uC989\uC2DC",
|
|
2894
|
+
fastDisclaimerUnified: "{{symbol}}\uB9CC \xB7 \uB2E4\uC911 \uCCB4\uC778 \xB7 \uC989\uC2DC",
|
|
2887
2895
|
secureDisclaimer: "\uBAA8\uB4E0 \uD1A0\uD070 \xB7 \uC774\uB354\uB9AC\uC6C0 \uCCB4\uC778\uB9CC \xB7 {{delay}}",
|
|
2896
|
+
secureDisclaimerRobinhood: "\uBAA8\uB4E0 \uD1A0\uD070 \xB7 Robinhood Chain\uB9CC \xB7 {{delay}}",
|
|
2897
|
+
secureDisclaimerRobinhoodNoDelay: "\uBAA8\uB4E0 \uD1A0\uD070 \xB7 Robinhood Chain\uB9CC",
|
|
2888
2898
|
secureFallbackDelay: "60\uBD84 \uC774\uC0C1",
|
|
2889
2899
|
lighterSecureAddressTooltip: "\uC5F0\uACB0\uB41C \uC9C0\uAC11\uC73C\uB85C\uB9CC \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4",
|
|
2890
2900
|
lighterSecureTokenTooltip: "\uCD9C\uAE08\uD558\uB824\uB294 \uD1A0\uD070\uB9CC \uBC1B\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4",
|
|
2891
|
-
lighterSecureChainTooltip: "\uBCF4\uC548 \uCD9C\uAE08\uC740 \
|
|
2901
|
+
lighterSecureChainTooltip: "\uBCF4\uC548 \uCD9C\uAE08\uC740 {{chainName}}\uC5D0\uC11C\uB9CC \uAC00\uB2A5\uD569\uB2C8\uB2E4",
|
|
2892
2902
|
lockedReceiveTooltip: "{{tokenSymbol}}\uC740(\uB294) {{chainName}}\uC5D0\uC11C\uB9CC \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4",
|
|
2893
|
-
lighterFastTokenTooltip: "\uBE60\uB978 \uCD9C\uAE08\uC740
|
|
2903
|
+
lighterFastTokenTooltip: "\uBE60\uB978 \uCD9C\uAE08\uC740 {{symbol}} (Perps) \uC794\uC561\uC5D0\uC11C\uB9CC \uC774\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4",
|
|
2894
2904
|
lighterWithdrawOnChain: "\uC628\uCCB4\uC778\uC73C\uB85C \uCD9C\uAE08",
|
|
2895
2905
|
lighterL1FallbackNotice: "Lighter\uC758 \uBCF4\uC548 \uCD9C\uAE08 \uD55C\uB3C4\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 \uC628\uCCB4\uC778\uC5D0\uC11C \uC9C1\uC811 \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
2896
2906
|
enableBorrowing: "\uCC28\uC785 \uC0AC\uC6A9",
|
|
@@ -3500,15 +3510,17 @@ var ru_default = {
|
|
|
3500
3510
|
sectionCrypto: "\u041A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0430",
|
|
3501
3511
|
methodFast: "\u0411\u044B\u0441\u0442\u0440\u044B\u0439",
|
|
3502
3512
|
methodSecure: "\u041D\u0430\u0442\u0438\u0432\u043D\u044B\u0439 \u043C\u043E\u0441\u0442",
|
|
3503
|
-
fastDisclaimer: "\u0422\u043E\u043B\u044C\u043A\u043E
|
|
3504
|
-
fastDisclaimerUnified: "\u0422\u043E\u043B\u044C\u043A\u043E
|
|
3513
|
+
fastDisclaimer: "\u0422\u043E\u043B\u044C\u043A\u043E {{symbol}} \u0431\u0435\u0441\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \xB7 \u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u0435\u0439 \xB7 \u041C\u0433\u043D\u043E\u0432\u0435\u043D\u043D\u043E",
|
|
3514
|
+
fastDisclaimerUnified: "\u0422\u043E\u043B\u044C\u043A\u043E {{symbol}} \xB7 \u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u0435\u0439 \xB7 \u041C\u0433\u043D\u043E\u0432\u0435\u043D\u043D\u043E",
|
|
3505
3515
|
secureDisclaimer: "\u0412\u0441\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \xB7 \u0422\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u044C Ethereum \xB7 {{delay}}",
|
|
3516
|
+
secureDisclaimerRobinhood: "\u0412\u0441\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \xB7 \u0422\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u044C Robinhood Chain \xB7 {{delay}}",
|
|
3517
|
+
secureDisclaimerRobinhoodNoDelay: "\u0412\u0441\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \xB7 \u0422\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u044C Robinhood Chain",
|
|
3506
3518
|
secureFallbackDelay: "60+ \u043C\u0438\u043D\u0443\u0442",
|
|
3507
3519
|
lighterSecureAddressTooltip: "\u0412\u044B\u0432\u043E\u0434 \u0432\u043E\u0437\u043C\u043E\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A",
|
|
3508
3520
|
lighterSecureTokenTooltip: "\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0442 \u0442\u043E\u043A\u0435\u043D, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0432\u044B\u0432\u043E\u0434\u0438\u0442\u0435",
|
|
3509
|
-
lighterSecureChainTooltip: "\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0439 \u0432\u044B\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0441\u0435\u0442\u0438
|
|
3521
|
+
lighterSecureChainTooltip: "\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0439 \u0432\u044B\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0441\u0435\u0442\u0438 {{chainName}}",
|
|
3510
3522
|
lockedReceiveTooltip: "{{tokenSymbol}} \u043C\u043E\u0436\u043D\u043E \u0432\u044B\u0432\u043E\u0434\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0441\u0435\u0442\u0438 {{chainName}}",
|
|
3511
|
-
lighterFastTokenTooltip: "\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u044B\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0431\u0430\u043B\u0430\u043D\u0441\u0430
|
|
3523
|
+
lighterFastTokenTooltip: "\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u044B\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0431\u0430\u043B\u0430\u043D\u0441\u0430 {{symbol}} (Perps)",
|
|
3512
3524
|
lighterWithdrawOnChain: "\u0412\u044B\u0432\u0435\u0441\u0442\u0438 \u0432 \u0441\u0435\u0442\u0438",
|
|
3513
3525
|
lighterL1FallbackNotice: "\u0412\u044B \u0434\u043E\u0441\u0442\u0438\u0433\u043B\u0438 \u043B\u0438\u043C\u0438\u0442\u0430 \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0445 \u0432\u044B\u0432\u043E\u0434\u043E\u0432 Lighter. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u044B\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043D\u0430\u043F\u0440\u044F\u043C\u0443\u044E \u0432 \u0441\u0435\u0442\u0438.",
|
|
3514
3526
|
enableBorrowing: "\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0437\u0430\u0451\u043C",
|
|
@@ -4118,15 +4130,17 @@ var tr_default = {
|
|
|
4118
4130
|
sectionCrypto: "Kripto",
|
|
4119
4131
|
methodFast: "H\u0131zl\u0131",
|
|
4120
4132
|
methodSecure: "Yerel K\xF6pr\xFC",
|
|
4121
|
-
fastDisclaimer: "Yaln\u0131zca
|
|
4122
|
-
fastDisclaimerUnified: "Yaln\u0131zca
|
|
4133
|
+
fastDisclaimer: "Yaln\u0131zca {{symbol}} Perps \xB7 Birden fazla zincir \xB7 An\u0131nda",
|
|
4134
|
+
fastDisclaimerUnified: "Yaln\u0131zca {{symbol}} \xB7 Birden fazla zincir \xB7 An\u0131nda",
|
|
4123
4135
|
secureDisclaimer: "T\xFCm tokenlar \xB7 Yaln\u0131zca Ethereum zinciri \xB7 {{delay}}",
|
|
4136
|
+
secureDisclaimerRobinhood: "T\xFCm tokenlar \xB7 Yaln\u0131zca Robinhood Chain \xB7 {{delay}}",
|
|
4137
|
+
secureDisclaimerRobinhoodNoDelay: "T\xFCm tokenlar \xB7 Yaln\u0131zca Robinhood Chain",
|
|
4124
4138
|
secureFallbackDelay: "60+ dakika",
|
|
4125
4139
|
lighterSecureAddressTooltip: "Yaln\u0131zca ba\u011Fl\u0131 c\xFCzdan\u0131n\u0131za para \xE7ekebilirsiniz",
|
|
4126
4140
|
lighterSecureTokenTooltip: "Yaln\u0131zca \xE7ekmeyi se\xE7ti\u011Finiz tokeni alabilirsiniz",
|
|
4127
|
-
lighterSecureChainTooltip: "G\xFCvenli \xE7ekimler yaln\u0131zca
|
|
4141
|
+
lighterSecureChainTooltip: "G\xFCvenli \xE7ekimler yaln\u0131zca {{chainName}} \xFCzerinde kullan\u0131labilir",
|
|
4128
4142
|
lockedReceiveTooltip: "{{tokenSymbol}} yaln\u0131zca {{chainName}} \xFCzerinden \xE7ekilebilir",
|
|
4129
|
-
lighterFastTokenTooltip: "H\u0131zl\u0131 \xE7ekimler yaln\u0131zca
|
|
4143
|
+
lighterFastTokenTooltip: "H\u0131zl\u0131 \xE7ekimler yaln\u0131zca {{symbol}} (Perps) bakiyeniz i\xE7in kullan\u0131labilir",
|
|
4130
4144
|
lighterWithdrawOnChain: "Zincir \xFCzerinde \xE7ek",
|
|
4131
4145
|
lighterL1FallbackNotice: "Lighter'\u0131n g\xFCvenli \xE7ekim h\u0131z s\u0131n\u0131r\u0131na ula\u015Ft\u0131n\u0131z. Bunun yerine do\u011Frudan zincir \xFCzerinden \xE7ekebilirsiniz.",
|
|
4132
4146
|
enableBorrowing: "Bor\xE7lanmay\u0131 etkinle\u015Ftir",
|
|
@@ -4736,15 +4750,17 @@ var zh_default = {
|
|
|
4736
4750
|
sectionCrypto: "\u52A0\u5BC6\u8D27\u5E01",
|
|
4737
4751
|
methodFast: "\u5FEB\u901F",
|
|
4738
4752
|
methodSecure: "\u539F\u751F\u8DE8\u94FE\u6865",
|
|
4739
|
-
fastDisclaimer: "\u4EC5\
|
|
4740
|
-
fastDisclaimerUnified: "\u4EC5\
|
|
4753
|
+
fastDisclaimer: "\u4EC5\u9650{{symbol}}\u6C38\u7EED \xB7 \u591A\u94FE \xB7 \u5373\u65F6",
|
|
4754
|
+
fastDisclaimerUnified: "\u4EC5\u9650{{symbol}} \xB7 \u591A\u94FE \xB7 \u5373\u65F6",
|
|
4741
4755
|
secureDisclaimer: "\u6240\u6709\u4EE3\u5E01 \xB7 \u4EC5\u4EE5\u592A\u574A\u94FE \xB7 {{delay}}",
|
|
4756
|
+
secureDisclaimerRobinhood: "\u6240\u6709\u4EE3\u5E01 \xB7 \u4EC5 Robinhood Chain \xB7 {{delay}}",
|
|
4757
|
+
secureDisclaimerRobinhoodNoDelay: "\u6240\u6709\u4EE3\u5E01 \xB7 \u4EC5 Robinhood Chain",
|
|
4742
4758
|
secureFallbackDelay: "60\u5206\u949F\u4EE5\u4E0A",
|
|
4743
4759
|
lighterSecureAddressTooltip: "\u60A8\u53EA\u80FD\u63D0\u73B0\u5230\u5DF2\u8FDE\u63A5\u7684\u94B1\u5305",
|
|
4744
4760
|
lighterSecureTokenTooltip: "\u60A8\u53EA\u80FD\u63A5\u6536\u6240\u9009\u62E9\u63D0\u73B0\u7684\u4EE3\u5E01",
|
|
4745
|
-
lighterSecureChainTooltip: "\u5B89\u5168\u63D0\u73B0\u4EC5\u652F\u6301
|
|
4761
|
+
lighterSecureChainTooltip: "\u5B89\u5168\u63D0\u73B0\u4EC5\u652F\u6301 {{chainName}}",
|
|
4746
4762
|
lockedReceiveTooltip: "{{tokenSymbol}} \u4EC5\u652F\u6301\u5728 {{chainName}} \u4E0A\u63D0\u73B0",
|
|
4747
|
-
lighterFastTokenTooltip: "\u5FEB\u901F\u63D0\u73B0\u4EC5\u652F\u6301\u60A8\u7684
|
|
4763
|
+
lighterFastTokenTooltip: "\u5FEB\u901F\u63D0\u73B0\u4EC5\u652F\u6301\u60A8\u7684 {{symbol}} (Perps) \u4F59\u989D",
|
|
4748
4764
|
lighterWithdrawOnChain: "\u94FE\u4E0A\u63D0\u73B0",
|
|
4749
4765
|
lighterL1FallbackNotice: "\u60A8\u5DF2\u8FBE\u5230 Lighter \u7684\u5B89\u5168\u63D0\u73B0\u9891\u7387\u9650\u5236\u3002\u60A8\u53EF\u4EE5\u6539\u4E3A\u76F4\u63A5\u5728\u94FE\u4E0A\u63D0\u73B0\u3002",
|
|
4750
4766
|
enableBorrowing: "\u542F\u7528\u501F\u5E01",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/consts/customers.ts
|
|
4
|
+
import {
|
|
5
|
+
AAVE_API_KEY,
|
|
6
|
+
AVANTIS_API_KEY,
|
|
7
|
+
BASED_API_KEY,
|
|
8
|
+
BETMOAR_API_KEY,
|
|
9
|
+
BSX_API_KEY,
|
|
10
|
+
FANATICS_API_KEY,
|
|
11
|
+
HYPERDASH_API_KEY,
|
|
12
|
+
LIGHTERXYZ_API_KEY,
|
|
13
|
+
LIGHTER_RH_API_KEY,
|
|
14
|
+
MALLARD_API_KEY,
|
|
15
|
+
MONAD_API_KEY,
|
|
16
|
+
MONKEY_TILT_API_KEY,
|
|
17
|
+
NADO_API_KEY,
|
|
18
|
+
OSTIUM_API_KEY,
|
|
19
|
+
PERPL_API_KEY,
|
|
20
|
+
POLYMARKET_API_KEY,
|
|
21
|
+
POLYMTRADE_API_KEY
|
|
22
|
+
} from "@funkit/api-base";
|
|
23
|
+
import {
|
|
24
|
+
LIGHTER_CHAIN_ID,
|
|
25
|
+
LIGHTER_CHAIN_IDS,
|
|
26
|
+
LIGHTER_RH_CHAIN_ID,
|
|
27
|
+
ROBINHOOD_MAINNET_CHAIN_ID
|
|
28
|
+
} from "@funkit/chains";
|
|
29
|
+
import { isTokenEquivalent } from "@funkit/utils";
|
|
30
|
+
import { mainnet } from "viem/chains";
|
|
31
|
+
var LIGHTER_API_KEY_BY_CHAIN_ID = {
|
|
32
|
+
[LIGHTER_CHAIN_ID]: LIGHTERXYZ_API_KEY,
|
|
33
|
+
[LIGHTER_RH_CHAIN_ID]: LIGHTER_RH_API_KEY
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/utils/customer.ts
|
|
37
|
+
import {
|
|
38
|
+
useLighterAccountQuery,
|
|
39
|
+
useLighterAccountsQuery
|
|
40
|
+
} from "@funkit/connect-core";
|
|
41
|
+
import {
|
|
42
|
+
LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID2,
|
|
43
|
+
LIGHTER_RH_CHAIN_ID as LIGHTER_RH_CHAIN_ID2,
|
|
44
|
+
toLighterChainId
|
|
45
|
+
} from "@funkit/chains";
|
|
46
|
+
import {
|
|
47
|
+
LIGHTER_TRADING_MODE,
|
|
48
|
+
getLighterAccount,
|
|
49
|
+
getLighterAccountsByL1Address,
|
|
50
|
+
useInvalidateLighterAccount,
|
|
51
|
+
useLighterAccountQuery as useLighterAccountQuery2,
|
|
52
|
+
useLighterAccountsQuery as useLighterAccountsQuery2
|
|
53
|
+
} from "@funkit/connect-core";
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
LIGHTER_API_KEY_BY_CHAIN_ID,
|
|
57
|
+
useLighterAccountQuery2 as useLighterAccountQuery,
|
|
58
|
+
useLighterAccountsQuery2 as useLighterAccountsQuery
|
|
59
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
isExpectedNadoWithdrawalFailure,
|
|
4
|
-
toNadoWithdrawalErrorMessage
|
|
5
|
-
} from "./chunk-BKK2BFIP.js";
|
|
6
2
|
import {
|
|
7
3
|
toWithdrawalAmountBaseUnit
|
|
8
4
|
} from "./chunk-4DBUYTEE.js";
|
|
5
|
+
import {
|
|
6
|
+
isExpectedNadoWithdrawalFailure,
|
|
7
|
+
toNadoWithdrawalErrorMessage
|
|
8
|
+
} from "./chunk-V4RIF2NR.js";
|
|
9
9
|
import {
|
|
10
10
|
getAccount,
|
|
11
11
|
signTypedData,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-OODIKHYE.js";
|
|
14
14
|
import {
|
|
15
15
|
i18n_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2L6IKKNH.js";
|
|
17
17
|
import {
|
|
18
18
|
generateClientMetadataForTokenTransfer
|
|
19
19
|
} from "./chunk-TKEBGMVW.js";
|
package/dist/clients/fanatics.js
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
} from "./chunk-RQALGV5U.js";
|
|
11
11
|
import {
|
|
12
12
|
useFunkitTranslation
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-LVR6RQMO.js";
|
|
14
|
+
import "./chunk-2L6IKKNH.js";
|
|
15
15
|
import "./chunk-AHYOV7AV.js";
|
|
16
16
|
|
|
17
17
|
// src/clients/fanatics.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-BKK2BFIP.js";
|
|
4
|
+
} from "../../chunk-TWP5LFPX.js";
|
|
6
5
|
import "../../chunk-4DBUYTEE.js";
|
|
6
|
+
import "../../chunk-V4RIF2NR.js";
|
|
7
7
|
import "../../chunk-OODIKHYE.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-2L6IKKNH.js";
|
|
9
9
|
import "../../chunk-TKEBGMVW.js";
|
|
10
10
|
import "../../chunk-AHYOV7AV.js";
|
|
11
11
|
export {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isExpectedNadoWithdrawalFailure,
|
|
4
4
|
toNadoWithdrawalErrorMessage
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-V4RIF2NR.js";
|
|
6
|
+
import "../../chunk-2L6IKKNH.js";
|
|
7
7
|
export {
|
|
8
8
|
isExpectedNadoWithdrawalFailure,
|
|
9
9
|
toNadoWithdrawalErrorMessage
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
PLACEHOLDER_FUNKIT_USER_INFO
|
|
7
7
|
} from "../../chunk-CE42WHAA.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-R25GIAD5.js";
|
|
9
9
|
import {
|
|
10
10
|
useFunkitConfig
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-HANOVGPH.js";
|
|
12
12
|
import {
|
|
13
13
|
useFunkitTranslation
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-LVR6RQMO.js";
|
|
15
15
|
import "../../chunk-4DBUYTEE.js";
|
|
16
16
|
import "../../chunk-2W2P3OS6.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-2L6IKKNH.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "../../chunk-AHYOV7AV.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useFunkitConfig
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-HANOVGPH.js";
|
|
5
|
+
import "../../chunk-LVR6RQMO.js";
|
|
6
6
|
import {
|
|
7
7
|
useAccount
|
|
8
8
|
} from "../../chunk-2W2P3OS6.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-2L6IKKNH.js";
|
|
10
10
|
import {
|
|
11
11
|
logger
|
|
12
12
|
} from "../../chunk-AHYOV7AV.js";
|
|
@@ -4,22 +4,26 @@
|
|
|
4
4
|
* Lighter supports two withdrawal types — the SDK exposes them as a
|
|
5
5
|
* multi-method config so the user is shown a selection screen first:
|
|
6
6
|
*
|
|
7
|
-
* 1. **Fast** — routed through Fun + Relay.
|
|
8
|
-
* destination chains/tokens supported.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* 1. **Fast** — routed through Fun + Relay. Perps collateral only (USDC;
|
|
8
|
+
* USDG on Robinhood). Multiple destination chains/tokens supported.
|
|
9
|
+
* Completes in seconds.
|
|
10
|
+
* 2. **Secure** — Lighter's native bridge to its L1 (Ethereum; Robinhood
|
|
11
|
+
* Chain for Lighter on Robinhood). Destination chain is locked to the L1
|
|
12
|
+
* and the destination token matches the source.
|
|
12
13
|
*
|
|
13
14
|
* Both callbacks conform to CustomWithdrawalConfig.withdrawCallback; the
|
|
14
15
|
* caller provides the actual on-chain implementation.
|
|
15
16
|
*/
|
|
17
|
+
import { type LighterChainId } from '@funkit/chains';
|
|
16
18
|
import { type Address } from 'viem';
|
|
17
19
|
import { type LighterSigner } from '@funkit/connect-core/clients/lighter';
|
|
18
20
|
import type { CustomWithdrawalConfig, LighterRouteType, MultiMethodWithdrawalConfig, SourceTokenOption, WithdrawalSourceTokenBalanceParams } from '../providers/FunkitCheckoutContext/types';
|
|
19
21
|
export { LIGHTER_ROUTE_TYPE } from '@funkit/connect-core/clients/lighter';
|
|
20
22
|
export type { LighterRouteType } from '../providers/FunkitCheckoutContext/types';
|
|
21
23
|
export type { LighterSigner, LighterTransaction, LighterTransferParams, } from '@funkit/connect-core/clients/lighter';
|
|
22
|
-
export { LIGHTER_WITHDRAW_ABI, buildLighterL1WithdrawTransaction, isLighterWithdrawalRateLimitError,
|
|
24
|
+
export { LIGHTER_WITHDRAW_ABI, buildLighterL1WithdrawTransaction, isLighterWithdrawalRateLimitError, } from '@funkit/connect-core/clients/lighter';
|
|
25
|
+
/** Lighter base units, defaulting to mainnet for existing connect integrators. */
|
|
26
|
+
export declare function lighterWithdrawBaseUnits(assetIndex: number, amountTokenUnits: string, chainId?: LighterChainId): bigint;
|
|
23
27
|
export interface LighterWithdrawalConfig {
|
|
24
28
|
/**
|
|
25
29
|
* The connected user's L1 address. The hook resolves the Lighter account
|
|
@@ -27,6 +31,8 @@ export interface LighterWithdrawalConfig {
|
|
|
27
31
|
* own wallet hook) in the caller and pass it through.
|
|
28
32
|
*/
|
|
29
33
|
l1Address: Address;
|
|
34
|
+
/** Instance both the signer and Secure callback sign on; defaults to mainnet. */
|
|
35
|
+
chainId?: LighterChainId;
|
|
30
36
|
/** Title shown on the selection screen. Defaults to "Withdraw". */
|
|
31
37
|
modalTitle?: string;
|
|
32
38
|
disableConnectedWallet?: boolean;
|
|
@@ -77,10 +83,17 @@ export interface LighterSecureWithdrawalCallbackParams {
|
|
|
77
83
|
* selects Perps vs Spot.
|
|
78
84
|
*/
|
|
79
85
|
routeType: LighterRouteType;
|
|
86
|
+
/**
|
|
87
|
+
* Lighter instance to withdraw from. Sign on this instance: the same asset
|
|
88
|
+
* index and account index mean different things on mainnet and RH.
|
|
89
|
+
*/
|
|
90
|
+
chainId: LighterChainId;
|
|
80
91
|
}
|
|
81
92
|
type LighterSecureWithdrawalExec = (params: LighterSecureWithdrawalCallbackParams) => Promise<string>;
|
|
82
93
|
export interface LighterSecureWithdrawalConfig {
|
|
83
94
|
accountIndex: string;
|
|
95
|
+
/** Lighter instance the callback signs on. Defaults to mainnet Lighter. */
|
|
96
|
+
chainId?: LighterChainId;
|
|
84
97
|
modalTitle?: string;
|
|
85
98
|
disableConnectedWallet?: boolean;
|
|
86
99
|
iconSrc?: string;
|
|
@@ -88,8 +101,8 @@ export interface LighterSecureWithdrawalConfig {
|
|
|
88
101
|
sourceTokens?: SourceTokenOption[];
|
|
89
102
|
withdrawalSourceTokenBalance?: (params: WithdrawalSourceTokenBalanceParams) => string | number;
|
|
90
103
|
/**
|
|
91
|
-
* Submit the Secure withdrawal on Lighter's L2. Funds bridge directly to
|
|
92
|
-
*
|
|
104
|
+
* Submit the Secure withdrawal on Lighter's L2. Funds bridge directly to the
|
|
105
|
+
* instance's L1. No relay/swap — the token withdrawn is the token received.
|
|
93
106
|
*/
|
|
94
107
|
sendLighterSecureWithdrawal: LighterSecureWithdrawalExec;
|
|
95
108
|
/**
|
|
@@ -106,26 +119,26 @@ export interface LighterSecureWithdrawalConfig {
|
|
|
106
119
|
*/
|
|
107
120
|
onBeforeSign?: () => Promise<void> | void;
|
|
108
121
|
}
|
|
109
|
-
/** Single-method config for
|
|
122
|
+
/** Single-method config for Secure withdrawal to the instance's L1. */
|
|
110
123
|
export declare function createLighterSecureWithdrawalConfig(config: LighterSecureWithdrawalConfig): CustomWithdrawalConfig;
|
|
111
124
|
/**
|
|
112
125
|
* Builds the source-token options list for the Lighter compound input dropdown.
|
|
113
126
|
*
|
|
114
|
-
* - Fast path: only
|
|
115
|
-
* - Secure path:
|
|
116
|
-
* account carries a spot USDC asset + every non-USDC asset on the account.
|
|
127
|
+
* - Fast path: only the instance's perps collateral.
|
|
128
|
+
* - Secure path: perps collateral + supported spot assets on the account.
|
|
117
129
|
*
|
|
118
|
-
* Unified Trading accounts
|
|
119
|
-
*
|
|
120
|
-
* `USDC (Spot)` entry is hidden on both paths.
|
|
130
|
+
* Unified Trading accounts have a single collateral balance: label it with
|
|
131
|
+
* the base symbol and suppress the separate collateral spot entry.
|
|
121
132
|
*/
|
|
122
|
-
export declare function buildLighterSourceTokenOptions({ isSecure, lighterAssets, isUnifiedTradingMode, }: {
|
|
133
|
+
export declare function buildLighterSourceTokenOptions({ isSecure, lighterAssets, isUnifiedTradingMode, chainId, }: {
|
|
123
134
|
/** Secure lists every spot asset alongside perps; Fast is perps-only. */
|
|
124
135
|
isSecure: boolean;
|
|
125
136
|
lighterAssets: {
|
|
126
137
|
symbol: string;
|
|
127
138
|
}[];
|
|
128
139
|
isUnifiedTradingMode?: boolean;
|
|
140
|
+
/** Lighter instance the options are for. Defaults to mainnet Lighter. */
|
|
141
|
+
chainId?: LighterChainId;
|
|
129
142
|
}): SourceTokenOption[];
|
|
130
143
|
/**
|
|
131
144
|
* The single React entry point for Lighter withdrawals. Returns a
|