@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
@@ -27,7 +27,7 @@ interface BaseThemeOptions {
27
27
  /** Custom z-index for the modal overlay */
28
28
  modalZIndex?: number;
29
29
  }
30
- export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customOpacities, customSpacings, customTextTransforms, overlayBlur, modalZIndex, }: BaseThemeOptions) => Pick<ThemeVars, "radii" | "dimensions" | "fonts" | "fontWeight" | "fontSize" | "blurs" | "spacing" | "borderWidths" | "textTransforms" | "modalZIndex" | "opacities">;
30
+ export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customOpacities, customSpacings, customTextTransforms, overlayBlur, modalZIndex, }: BaseThemeOptions) => Pick<ThemeVars, 'radii' | 'dimensions' | 'fonts' | 'fontWeight' | 'fontSize' | 'blurs' | 'spacing' | 'borderWidths' | 'textTransforms' | 'modalZIndex' | 'opacities'>;
31
31
  export interface AccentColor {
32
32
  accentColor: string;
33
33
  accentColorForeground: string;
@@ -1,6 +1,8 @@
1
1
  import type { ThemeVars } from '../css/sprinkles.css';
2
2
  import { type AccentColor, type AccentColorPreset, type ThemeOptions } from './baseTheme';
3
- export declare const darkTheme: {
4
- ({ accentColor, accentColorForeground, customColors, customShadows, ...baseThemeOptions }?: ThemeOptions): ThemeVars;
5
- accentColors: Record<AccentColorPreset, AccentColor>;
6
- };
3
+ declare const accentColors: Record<AccentColorPreset, AccentColor>;
4
+ export declare function darkTheme({ accentColor, accentColorForeground, customColors, customShadows, ...baseThemeOptions }?: ThemeOptions): ThemeVars;
5
+ export declare namespace darkTheme {
6
+ export { accentColors };
7
+ }
8
+ export {};
@@ -1,6 +1,8 @@
1
1
  import type { ThemeVars } from '../css/sprinkles.css';
2
2
  import { type AccentColor, type AccentColorPreset, type ThemeOptions } from './baseTheme';
3
- export declare const lightTheme: {
4
- ({ accentColor, accentColorForeground, customColors, customShadows, ...baseThemeOptions }?: ThemeOptions): ThemeVars;
5
- accentColors: Record<AccentColorPreset, AccentColor>;
6
- };
3
+ declare const accentColors: Record<AccentColorPreset, AccentColor>;
4
+ export declare function lightTheme({ accentColor, accentColorForeground, customColors, customShadows, ...baseThemeOptions }?: ThemeOptions): ThemeVars;
5
+ export declare namespace lightTheme {
6
+ export { accentColors };
7
+ }
8
+ export {};
@@ -11,7 +11,7 @@ export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
11
11
  export declare const BROKERAGE_TIME_ESTIMATE_MS = 0;
12
12
  export declare const BANK_TIME_ESTIMATE_MS = 0;
13
13
  export declare const DUMMY_TRANSFER_PARAMS: {
14
- toAddress: "0x000000000000000000000000000000000000dEaD";
14
+ toAddress: '0x000000000000000000000000000000000000dEaD';
15
15
  tokenAmount: number;
16
16
  };
17
17
  type ValidateCheckoutConfigReturn = Promise<{
@@ -41,44 +41,6 @@ export declare function adaptLighterTargetAssetsForUnifiedAccount(candidates: Dy
41
41
  export declare function useLighterAccount(lookup: LighterAccountSelector | null, options?: {
42
42
  activeOnly?: boolean;
43
43
  }): {
44
- account: import("@funkit/connect-core").LighterAccount | undefined;
45
- data: import("@funkit/connect-core").LighterAccountResponse;
46
- error: Error;
47
- isError: true;
48
- isPending: false;
49
- isLoading: false;
50
- isLoadingError: false;
51
- isRefetchError: true;
52
- isSuccess: false;
53
- isPlaceholderData: false;
54
- status: "error";
55
- dataUpdatedAt: number;
56
- errorUpdatedAt: number;
57
- failureCount: number;
58
- failureReason: Error | null;
59
- errorUpdateCount: number;
60
- isFetched: boolean;
61
- isFetchedAfterMount: boolean;
62
- isFetching: boolean;
63
- isInitialLoading: boolean;
64
- isPaused: boolean;
65
- isRefetching: boolean;
66
- isStale: boolean;
67
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
68
- fetchStatus: import("@tanstack/react-query").FetchStatus;
69
- promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
70
- } | {
71
- account: import("@funkit/connect-core").LighterAccount | undefined;
72
- data: import("@funkit/connect-core").LighterAccountResponse;
73
- error: null;
74
- isError: false;
75
- isPending: false;
76
- isLoading: false;
77
- isLoadingError: false;
78
- isRefetchError: false;
79
- isSuccess: true;
80
- isPlaceholderData: false;
81
- status: "success";
82
44
  dataUpdatedAt: number;
83
45
  errorUpdatedAt: number;
84
46
  failureCount: number;
@@ -94,8 +56,6 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
94
56
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
95
57
  fetchStatus: import("@tanstack/react-query").FetchStatus;
96
58
  promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
97
- } | {
98
- account: import("@funkit/connect-core").LighterAccount | undefined;
99
59
  data: undefined;
100
60
  error: Error;
101
61
  isError: true;
@@ -105,7 +65,9 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
105
65
  isRefetchError: false;
106
66
  isSuccess: false;
107
67
  isPlaceholderData: false;
108
- status: "error";
68
+ status: 'error';
69
+ account: import("@funkit/connect-core").LighterAccount | undefined;
70
+ } | {
109
71
  dataUpdatedAt: number;
110
72
  errorUpdatedAt: number;
111
73
  failureCount: number;
@@ -121,8 +83,6 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
121
83
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
122
84
  fetchStatus: import("@tanstack/react-query").FetchStatus;
123
85
  promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
124
- } | {
125
- account: import("@funkit/connect-core").LighterAccount | undefined;
126
86
  data: undefined;
127
87
  error: null;
128
88
  isError: false;
@@ -132,7 +92,9 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
132
92
  isRefetchError: false;
133
93
  isSuccess: false;
134
94
  isPlaceholderData: false;
135
- status: "pending";
95
+ status: 'pending';
96
+ account: import("@funkit/connect-core").LighterAccount | undefined;
97
+ } | {
136
98
  dataUpdatedAt: number;
137
99
  errorUpdatedAt: number;
138
100
  failureCount: number;
@@ -141,6 +103,7 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
141
103
  isFetched: boolean;
142
104
  isFetchedAfterMount: boolean;
143
105
  isFetching: boolean;
106
+ isLoading: boolean;
144
107
  isInitialLoading: boolean;
145
108
  isPaused: boolean;
146
109
  isRefetching: boolean;
@@ -148,8 +111,6 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
148
111
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
149
112
  fetchStatus: import("@tanstack/react-query").FetchStatus;
150
113
  promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
151
- } | {
152
- account: import("@funkit/connect-core").LighterAccount | undefined;
153
114
  data: undefined;
154
115
  error: null;
155
116
  isError: false;
@@ -158,7 +119,9 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
158
119
  isRefetchError: false;
159
120
  isSuccess: false;
160
121
  isPlaceholderData: false;
161
- status: "pending";
122
+ status: 'pending';
123
+ account: import("@funkit/connect-core").LighterAccount | undefined;
124
+ } | {
162
125
  dataUpdatedAt: number;
163
126
  errorUpdatedAt: number;
164
127
  failureCount: number;
@@ -167,7 +130,6 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
167
130
  isFetched: boolean;
168
131
  isFetchedAfterMount: boolean;
169
132
  isFetching: boolean;
170
- isLoading: boolean;
171
133
  isInitialLoading: boolean;
172
134
  isPaused: boolean;
173
135
  isRefetching: boolean;
@@ -175,8 +137,6 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
175
137
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
176
138
  fetchStatus: import("@tanstack/react-query").FetchStatus;
177
139
  promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
178
- } | {
179
- account: import("@funkit/connect-core").LighterAccount | undefined;
180
140
  data: import("@funkit/connect-core").LighterAccountResponse;
181
141
  isError: false;
182
142
  error: null;
@@ -186,7 +146,9 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
186
146
  isRefetchError: false;
187
147
  isSuccess: true;
188
148
  isPlaceholderData: true;
189
- status: "success";
149
+ status: 'success';
150
+ account: import("@funkit/connect-core").LighterAccount | undefined;
151
+ } | {
190
152
  dataUpdatedAt: number;
191
153
  errorUpdatedAt: number;
192
154
  failureCount: number;
@@ -202,21 +164,7 @@ export declare function useLighterAccount(lookup: LighterAccountSelector | null,
202
164
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
203
165
  fetchStatus: import("@tanstack/react-query").FetchStatus;
204
166
  promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
205
- };
206
- /**
207
- * `chainId` names the Lighter instance the caller is about to use; undefined
208
- * skips the lookup. Only the key's own instance is looked up: a mismatch skips
209
- * the lookup rather than redirecting it, so no caller can pair one instance's
210
- * account index with the other's route.
211
- */
212
- export declare function useLighterAccounts({ address, chainId, }: {
213
- address: Address | '' | undefined;
214
- chainId: LighterChainId | undefined;
215
- }): {
216
- mainAccountIndex: string | undefined;
217
- isUnifiedTradingMode: boolean;
218
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
219
- data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
167
+ data: import("@funkit/connect-core").LighterAccountResponse;
220
168
  error: Error;
221
169
  isError: true;
222
170
  isPending: false;
@@ -225,7 +173,9 @@ export declare function useLighterAccounts({ address, chainId, }: {
225
173
  isRefetchError: true;
226
174
  isSuccess: false;
227
175
  isPlaceholderData: false;
228
- status: "error";
176
+ status: 'error';
177
+ account: import("@funkit/connect-core").LighterAccount | undefined;
178
+ } | {
229
179
  dataUpdatedAt: number;
230
180
  errorUpdatedAt: number;
231
181
  failureCount: number;
@@ -238,14 +188,10 @@ export declare function useLighterAccounts({ address, chainId, }: {
238
188
  isPaused: boolean;
239
189
  isRefetching: boolean;
240
190
  isStale: boolean;
241
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
191
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
242
192
  fetchStatus: import("@tanstack/react-query").FetchStatus;
243
- promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
244
- } | {
245
- mainAccountIndex: string | undefined;
246
- isUnifiedTradingMode: boolean;
247
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
248
- data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
193
+ promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
194
+ data: import("@funkit/connect-core").LighterAccountResponse;
249
195
  error: null;
250
196
  isError: false;
251
197
  isPending: false;
@@ -254,7 +200,19 @@ export declare function useLighterAccounts({ address, chainId, }: {
254
200
  isRefetchError: false;
255
201
  isSuccess: true;
256
202
  isPlaceholderData: false;
257
- status: "success";
203
+ status: 'success';
204
+ account: import("@funkit/connect-core").LighterAccount | undefined;
205
+ };
206
+ /**
207
+ * `chainId` names the Lighter instance the caller is about to use; undefined
208
+ * skips the lookup. Only the key's own instance is looked up: a mismatch skips
209
+ * the lookup rather than redirecting it, so no caller can pair one instance's
210
+ * account index with the other's route.
211
+ */
212
+ export declare function useLighterAccounts({ address, chainId, }: {
213
+ address: Address | '' | undefined;
214
+ chainId: LighterChainId | undefined;
215
+ }): {
258
216
  dataUpdatedAt: number;
259
217
  errorUpdatedAt: number;
260
218
  failureCount: number;
@@ -270,10 +228,6 @@ export declare function useLighterAccounts({ address, chainId, }: {
270
228
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
271
229
  fetchStatus: import("@tanstack/react-query").FetchStatus;
272
230
  promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
273
- } | {
274
- mainAccountIndex: string | undefined;
275
- isUnifiedTradingMode: boolean;
276
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
277
231
  data: undefined;
278
232
  error: Error;
279
233
  isError: true;
@@ -283,7 +237,11 @@ export declare function useLighterAccounts({ address, chainId, }: {
283
237
  isRefetchError: false;
284
238
  isSuccess: false;
285
239
  isPlaceholderData: false;
286
- status: "error";
240
+ status: 'error';
241
+ mainAccountIndex: string | undefined;
242
+ isUnifiedTradingMode: boolean;
243
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
244
+ } | {
287
245
  dataUpdatedAt: number;
288
246
  errorUpdatedAt: number;
289
247
  failureCount: number;
@@ -299,10 +257,6 @@ export declare function useLighterAccounts({ address, chainId, }: {
299
257
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
300
258
  fetchStatus: import("@tanstack/react-query").FetchStatus;
301
259
  promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
302
- } | {
303
- mainAccountIndex: string | undefined;
304
- isUnifiedTradingMode: boolean;
305
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
306
260
  data: undefined;
307
261
  error: null;
308
262
  isError: false;
@@ -312,7 +266,11 @@ export declare function useLighterAccounts({ address, chainId, }: {
312
266
  isRefetchError: false;
313
267
  isSuccess: false;
314
268
  isPlaceholderData: false;
315
- status: "pending";
269
+ status: 'pending';
270
+ mainAccountIndex: string | undefined;
271
+ isUnifiedTradingMode: boolean;
272
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
273
+ } | {
316
274
  dataUpdatedAt: number;
317
275
  errorUpdatedAt: number;
318
276
  failureCount: number;
@@ -321,6 +279,7 @@ export declare function useLighterAccounts({ address, chainId, }: {
321
279
  isFetched: boolean;
322
280
  isFetchedAfterMount: boolean;
323
281
  isFetching: boolean;
282
+ isLoading: boolean;
324
283
  isInitialLoading: boolean;
325
284
  isPaused: boolean;
326
285
  isRefetching: boolean;
@@ -328,10 +287,6 @@ export declare function useLighterAccounts({ address, chainId, }: {
328
287
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
329
288
  fetchStatus: import("@tanstack/react-query").FetchStatus;
330
289
  promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
331
- } | {
332
- mainAccountIndex: string | undefined;
333
- isUnifiedTradingMode: boolean;
334
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
335
290
  data: undefined;
336
291
  error: null;
337
292
  isError: false;
@@ -340,7 +295,11 @@ export declare function useLighterAccounts({ address, chainId, }: {
340
295
  isRefetchError: false;
341
296
  isSuccess: false;
342
297
  isPlaceholderData: false;
343
- status: "pending";
298
+ status: 'pending';
299
+ mainAccountIndex: string | undefined;
300
+ isUnifiedTradingMode: boolean;
301
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
302
+ } | {
344
303
  dataUpdatedAt: number;
345
304
  errorUpdatedAt: number;
346
305
  failureCount: number;
@@ -349,7 +308,6 @@ export declare function useLighterAccounts({ address, chainId, }: {
349
308
  isFetched: boolean;
350
309
  isFetchedAfterMount: boolean;
351
310
  isFetching: boolean;
352
- isLoading: boolean;
353
311
  isInitialLoading: boolean;
354
312
  isPaused: boolean;
355
313
  isRefetching: boolean;
@@ -357,10 +315,6 @@ export declare function useLighterAccounts({ address, chainId, }: {
357
315
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
358
316
  fetchStatus: import("@tanstack/react-query").FetchStatus;
359
317
  promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
360
- } | {
361
- mainAccountIndex: string | undefined;
362
- isUnifiedTradingMode: boolean;
363
- subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
364
318
  data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
365
319
  isError: false;
366
320
  error: null;
@@ -370,7 +324,40 @@ export declare function useLighterAccounts({ address, chainId, }: {
370
324
  isRefetchError: false;
371
325
  isSuccess: true;
372
326
  isPlaceholderData: true;
373
- status: "success";
327
+ status: 'success';
328
+ mainAccountIndex: string | undefined;
329
+ isUnifiedTradingMode: boolean;
330
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
331
+ } | {
332
+ dataUpdatedAt: number;
333
+ errorUpdatedAt: number;
334
+ failureCount: number;
335
+ failureReason: Error | null;
336
+ errorUpdateCount: number;
337
+ isFetched: boolean;
338
+ isFetchedAfterMount: boolean;
339
+ isFetching: boolean;
340
+ isInitialLoading: boolean;
341
+ isPaused: boolean;
342
+ isRefetching: boolean;
343
+ isStale: boolean;
344
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
345
+ fetchStatus: import("@tanstack/react-query").FetchStatus;
346
+ promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
347
+ data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
348
+ error: Error;
349
+ isError: true;
350
+ isPending: false;
351
+ isLoading: false;
352
+ isLoadingError: false;
353
+ isRefetchError: true;
354
+ isSuccess: false;
355
+ isPlaceholderData: false;
356
+ status: 'error';
357
+ mainAccountIndex: string | undefined;
358
+ isUnifiedTradingMode: boolean;
359
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
360
+ } | {
374
361
  dataUpdatedAt: number;
375
362
  errorUpdatedAt: number;
376
363
  failureCount: number;
@@ -386,4 +373,17 @@ export declare function useLighterAccounts({ address, chainId, }: {
386
373
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
387
374
  fetchStatus: import("@tanstack/react-query").FetchStatus;
388
375
  promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
376
+ data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
377
+ error: null;
378
+ isError: false;
379
+ isPending: false;
380
+ isLoading: false;
381
+ isLoadingError: false;
382
+ isRefetchError: false;
383
+ isSuccess: true;
384
+ isPlaceholderData: false;
385
+ status: 'success';
386
+ mainAccountIndex: string | undefined;
387
+ isUnifiedTradingMode: boolean;
388
+ subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
389
389
  };
@@ -1,16 +1,22 @@
1
- import type { LogRecord, LogTransport, TrackingConsent } from '@funkit/connect-core';
1
+ import { type DatadogRouteDecision, type LogRecord, type LogTransport, type TrackingConsent } from '@funkit/connect-core';
2
2
  /**
3
3
  * Web `LogTransport` backed by `@datadog/browser-logs`. Owns Datadog
4
4
  * initialization, global-context/consent wiring, and the browser-only emit.
5
5
  *
6
6
  * This is the platform half of the logger that stays in `@funkit/connect` when
7
7
  * `FunLogger` moves to `@funkit/connect-core`; React Native ships a Datadog
8
- * React Native transport (`@datadog/mobile-react-native`) instead. Constructing
9
- * it runs `datadogLogs.init` once (the global singleton does this on import,
10
- * matching prior behavior).
8
+ * React Native transport (`@datadog/mobile-react-native`) instead.
9
+ *
10
+ * `datadogLogs.init` runs only from `setRoute`, once a route is set. Until
11
+ * then the Datadog SDK queues every log in memory and sends nothing.
11
12
  */
12
13
  export declare class DatadogBrowserLogsTransport implements LogTransport {
13
- constructor();
14
+ private decision;
15
+ /**
16
+ * Starts Datadog on the first call. A later call switches the route for
17
+ * every request after it: Datadog asks for the request URL each time.
18
+ */
19
+ setRoute(decision: DatadogRouteDecision): void;
14
20
  setEnv(environment: string): void;
15
21
  setTrackingConsent(consent: TrackingConsent): void;
16
22
  log({ level, title, context, error }: LogRecord): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Calls `onExit` when the page is closing or being hidden, the last moments a
3
+ * browser reliably runs JavaScript. Returns an unsubscribe function.
4
+ */
5
+ export declare function subscribeToPageExit(onExit: () => void): () => void;
@@ -0,0 +1,26 @@
1
+ type ErrorConstructorArgs = ConstructorParameters<ErrorConstructor>;
2
+ /**
3
+ * The options `Error` itself accepts, resolved against the integrator's
4
+ * TypeScript lib: `ErrorOptions` (with `cause`) from ES2022, `never` before it.
5
+ */
6
+ export type FunErrorOptions = 2 extends ErrorConstructorArgs['length'] ? NonNullable<ErrorConstructorArgs[1]> : never;
7
+ /**
8
+ * An error whose `message` is safe to show to the user. Throw it from an
9
+ * integrator callback (for example a Polymarket account's `transfer`) to show
10
+ * `message` in place of the SDK's generic error copy. The integrator owns the
11
+ * wording and localization. Pass the underlying error as `cause` so it reaches
12
+ * the logs.
13
+ *
14
+ * @example
15
+ * throw new FunError(t('walletDisconnected'), { cause: error })
16
+ */
17
+ export declare class FunError extends Error {
18
+ constructor(message: string, options?: FunErrorOptions);
19
+ }
20
+ export declare function isFunError(error: unknown): error is FunError;
21
+ /**
22
+ * The user-facing message of a {@link FunError}, or `null` for any other
23
+ * error or an empty message (the caller then shows its generic copy).
24
+ */
25
+ export declare function getFunErrorDisplayMessage(error: unknown): string | null;
26
+ export {};
@@ -1,3 +1,4 @@
1
1
  import { FunLogger } from '@funkit/connect-core';
2
2
  declare const logger: FunLogger;
3
- export { logger, FunLogger };
3
+ declare const datadogRouter: import("@funkit/connect-core").DatadogRouter;
4
+ export { logger, FunLogger, datadogRouter };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shakes `element` side to side, e.g. to turn down a press. Does nothing
3
+ * under reduced motion, during a shake, or without the Web Animations API.
4
+ * - Not a CSS class on a timer: a timer started at the commit can remove the
5
+ * class before a slow device paints the first frame.
6
+ */
7
+ export declare function shakeElement(element: HTMLElement): void;
@@ -5,5 +5,5 @@ interface ComputeMetaDataParameters {
5
5
  appUrl?: string;
6
6
  appIcon?: string;
7
7
  }
8
- export declare const computeWalletConnectMetaData: ({ appName, appDescription, appUrl, appIcon, }: ComputeMetaDataParameters) => FunkitConnectWalletConnectParameters["metadata"];
8
+ export declare const computeWalletConnectMetaData: ({ appName, appDescription, appUrl, appIcon, }: ComputeMetaDataParameters) => FunkitConnectWalletConnectParameters['metadata'];
9
9
  export {};
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-TM7UBV3Q.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-ALGPGI6V.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bifrostWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-USLZMUJ3.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-HOCKAU5H.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bitgetWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-IWPW26AL.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-BBDNB5TQ.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bybitWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  clvWallet
4
- } from "../chunk-JJBLW4IU.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-4FHNLTR3.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  clvWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coin98Wallet
4
- } from "../chunk-RQYEGJKL.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-RFCZYLNR.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  coin98Wallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coreWallet
4
- } from "../chunk-TIHTQ3OB.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-TRZDAXCQ.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  coreWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  foxWallet
4
- } from "../chunk-F45CUFRR.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-U52QO5HF.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  foxWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  frontierWallet
4
- } from "../chunk-ASTCNVJC.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-IWOMSW64.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  frontierWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  gateWallet
4
- } from "../chunk-FYPQ3HP4.js";
5
- import "../chunk-EYWGX5LT.js";
4
+ } from "../chunk-YRMBR6NA.js";
6
5
  import "../chunk-AALSJCUR.js";
6
+ import "../chunk-EYWGX5LT.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  gateWallet