@funkit/connect 11.1.0 → 11.3.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 +118 -0
- package/dist/clients/{chunk-YZSO4EMO.js → chunk-2576N7PQ.js} +1 -1
- package/dist/clients/{chunk-II5CZTBC.js → chunk-3P2C436B.js} +3 -1
- package/dist/clients/{chunk-YMGRBJAS.js → chunk-46L2KJJ4.js} +14 -16
- package/dist/clients/chunk-6EU6CXNH.js +20 -0
- package/dist/clients/{chunk-2QYQNTOI.js → chunk-C45VNQXY.js} +24 -16
- package/dist/clients/{chunk-SO756ELD.js → chunk-DGBIV3ZS.js} +1 -0
- package/dist/clients/{chunk-SYFHMTUO.js → chunk-FM7SFGAV.js} +2 -2
- package/dist/clients/{chunk-EJKHMZW3.js → chunk-IYCZWLAF.js} +2 -1
- package/dist/clients/{chunk-OJZNF6EM.js → chunk-JFDRLSYM.js} +1 -1
- package/dist/clients/{chunk-QIMCURVA.js → chunk-L2XMI4EX.js} +9 -9
- package/dist/clients/{chunk-A6OXZWCN.js → chunk-QQEGNLGD.js} +1 -1
- package/dist/clients/{chunk-A44M6EAG.js → chunk-TZGKB6WY.js} +1 -1
- package/dist/clients/{chunk-C53FRCUM.js → chunk-UK64SY6N.js} +1 -1
- package/dist/clients/{chunk-WVM4ZJD2.js → chunk-VIAEAD75.js} +1 -1
- package/dist/clients/{chunk-SH3MHRHX.js → chunk-Y7WLUPTX.js} +1 -1
- package/dist/clients/{chunk-FAYBQQNB.js → chunk-YUZ3B2Q3.js} +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/consts.d.ts +6 -0
- package/dist/clients/internal/nado/consts.js +5 -3
- package/dist/clients/internal/nado/gateway.js +2 -2
- package/dist/clients/internal/nado/hooks.js +4 -4
- package/dist/clients/internal/nado/indexer.js +2 -2
- package/dist/clients/internal/nado/typedData.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +7 -7
- package/dist/clients/internal/nado/withdrawalConfig.d.ts +4 -4
- package/dist/clients/internal/nado/withdrawalConfig.js +2 -2
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.css +43 -35
- package/dist/clients/internal/nado/withdrawalForm.d.ts +3 -0
- package/dist/clients/internal/nado/withdrawalForm.js +15 -11
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.css +43 -35
- package/dist/clients/lighter.d.ts +4 -30
- package/dist/clients/lighter.js +74 -260
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +9 -9
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +43 -35
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +8 -8
- package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +6 -0
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
- package/dist/clients/polymarket/index.css +43 -35
- package/dist/clients/polymarket/index.js +11 -11
- package/dist/clients/polymarket/polymarket.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +3 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +6 -0
- package/dist/components/FunCheckbox/FunCheckbox.d.ts +3 -1
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +3 -1
- package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +3 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -1
- package/dist/domains/checkout.d.ts +2 -1
- package/dist/domains/nado.d.ts +11 -2
- package/dist/domains/quoteMode/types.d.ts +16 -0
- package/dist/domains/relay.d.ts +0 -3
- package/dist/hooks/track/analytics/claimAnalyticsEvent.d.ts +5 -0
- package/dist/hooks/track/analytics/events.d.ts +203 -7
- package/dist/hooks/track/analytics/mappers.d.ts +17 -0
- package/dist/hooks/track/analytics/quote.d.ts +12 -0
- package/dist/hooks/track/analytics/resolveExecutionProgressContext.d.ts +40 -0
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +87 -2
- package/dist/hooks/track/analytics/useTrackExecutionProgressEvents.d.ts +48 -0
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +18 -0
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useFunkitTranslation.d.ts +5 -0
- package/dist/hooks/useIsBlacklistedWithdrawalAddress.d.ts +4 -1
- package/dist/hooks/useTokenAndChainDropdown.d.ts +4 -1
- package/dist/index.css +43 -35
- package/dist/index.js +5301 -3619
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +2 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +5 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useTrackDepositQuoteEvents.d.ts +20 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +5 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +13 -0
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +4 -3
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +9 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +3 -1
- package/dist/modals/CheckoutModal/MeldQuotes/useMeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +4 -1
- package/dist/modals/CheckoutModal/SourceChange/useBottomBarCloseLabel.d.ts +7 -0
- package/dist/modals/CheckoutModal/SourceChange/useTrackSourceChangeEvents.d.ts +10 -0
- package/dist/modals/CheckoutModal/TransferToken/useTrackDepositNotificationEvents.d.ts +6 -0
- package/dist/modals/CheckoutModal/TransferToken/useTransferTokenTracking.d.ts +9 -3
- package/dist/modals/PolymarketPerpsTransfer/recordPerpsTransfer.d.ts +40 -0
- package/dist/modals/PolymarketPerpsTransfer/useRecordPerpsTransfer.d.ts +24 -0
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +14 -92
- package/dist/modals/WithdrawalModal/LockedReceiveDisplay.d.ts +22 -0
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
- package/dist/modals/WithdrawalModal/useTrackWithdrawalEvents.d.ts +1 -0
- package/dist/modals/WithdrawalModal/withdrawalFormHelpers.d.ts +18 -1
- package/dist/modals/WithdrawalModal/withdrawalHooks.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +10 -2
- package/dist/providers/FunkitCheckoutContext/types.d.ts +21 -4
- package/dist/providers/FunkitStatsigProvider.d.ts +7 -0
- package/dist/utils/customer.d.ts +45 -504
- package/dist/utils/lighter.d.ts +1 -83
- package/dist/utils/signature.d.ts +1 -2
- package/dist/utils/withdrawal.d.ts +11 -1
- package/dist/wallets/walletConnectors/index.js +49 -49
- package/package.json +4 -5
- package/dist/clients/chunk-NAVU6W7V.js +0 -89
package/dist/utils/customer.d.ts
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
1
|
+
import type { DynamicTargetAssetCandidate, LighterAccountLookup } from '@funkit/connect-core';
|
|
3
2
|
import type { Address } from 'viem';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* and perps USDC balances), `1` = Unified Trading account (one USDC balance —
|
|
7
|
-
* no spot/perps split). Unified accounts hide the spot USDC option and label
|
|
8
|
-
* perps USDC as plain `USDC` in both deposit and withdrawal flows.
|
|
9
|
-
*/
|
|
10
|
-
export declare const LIGHTER_TRADING_MODE: {
|
|
11
|
-
readonly SIMPLE: 0;
|
|
12
|
-
readonly UNIFIED: 1;
|
|
13
|
-
};
|
|
3
|
+
export { LIGHTER_TRADING_MODE, getLighterAccount, getLighterAccountsByL1Address, useInvalidateLighterAccount, useLighterAccountQuery, useLighterAccountsQuery, } from '@funkit/connect-core';
|
|
4
|
+
export type { LighterAccount, LighterAccountLookup, LighterAccountResponse, LighterAccountsByL1AddressResponse, LighterAsset, LighterPoolInfo, LighterShare, LighterSubAccount, } from '@funkit/connect-core';
|
|
14
5
|
/**
|
|
15
6
|
* Strips the ` (Perps)` variant suffix off a Lighter ticker (e.g.
|
|
16
7
|
* `USDC (Perps)` → `USDC`). Non-perps tickers pass through unchanged.
|
|
@@ -24,277 +15,11 @@ export declare function stripLighterPerpsSuffix(symbol: string | undefined): str
|
|
|
24
15
|
* routes (`LIGHTER_USDC_PERPS*`), only the presentation differs.
|
|
25
16
|
*/
|
|
26
17
|
export declare function adaptLighterTargetAssetsForUnifiedAccount(candidates: DynamicTargetAssetCandidate[]): DynamicTargetAssetCandidate[];
|
|
27
|
-
export type LighterSubAccount = {
|
|
28
|
-
code: number;
|
|
29
|
-
account_type: number;
|
|
30
|
-
index: number;
|
|
31
|
-
l1_address: Address;
|
|
32
|
-
cancel_all_time: number;
|
|
33
|
-
total_order_count: number;
|
|
34
|
-
total_isolated_order_count: number;
|
|
35
|
-
pending_order_count: number;
|
|
36
|
-
available_balance: string;
|
|
37
|
-
status: number;
|
|
38
|
-
collateral: string;
|
|
39
|
-
transaction_time: number;
|
|
40
|
-
account_trading_mode: number;
|
|
41
|
-
};
|
|
42
|
-
export type LighterAccountsByL1AddressResponse = {
|
|
43
|
-
code: number;
|
|
44
|
-
l1_address: Address;
|
|
45
|
-
sub_accounts: LighterSubAccount[];
|
|
46
|
-
};
|
|
47
|
-
export declare function getLighterAccountsByL1Address(address: Address): Promise<LighterAccountsByL1AddressResponse>;
|
|
48
|
-
export type LighterAsset = {
|
|
49
|
-
symbol: string;
|
|
50
|
-
asset_id: number;
|
|
51
|
-
balance: string;
|
|
52
|
-
locked_balance: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* A user's stake in a Lighter public pool, identified by matching
|
|
56
|
-
* `public_pool_index` against the known pool index.
|
|
57
|
-
*
|
|
58
|
-
* Carries only *entry* state — there is no current-value field:
|
|
59
|
-
* - `principal_amount` — deposited at entry, in the pool's own asset (Lighter's
|
|
60
|
-
* UI shows this as "Your Deposits"). Never grows with accrued yield.
|
|
61
|
-
* - `shares_amount` — pool shares held. Current value ("Your Stake") is this
|
|
62
|
-
* times the pool's share price, so it needs the pool account too.
|
|
63
|
-
*/
|
|
64
|
-
export type LighterShare = {
|
|
65
|
-
public_pool_index: number;
|
|
66
|
-
shares_amount: number;
|
|
67
|
-
entry_usdc: string;
|
|
68
|
-
principal_amount: string;
|
|
69
|
-
entry_timestamp: number;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Public-pool accounting, present only on pool accounts (`account_type: 4`).
|
|
73
|
-
* Share price is `<pool asset balance> / total_shares`.
|
|
74
|
-
*/
|
|
75
|
-
export type LighterPoolInfo = {
|
|
76
|
-
total_shares: number;
|
|
77
|
-
operator_shares: number;
|
|
78
|
-
};
|
|
79
|
-
export type LighterAccount = {
|
|
80
|
-
code: number;
|
|
81
|
-
account_type: number;
|
|
82
|
-
index: number;
|
|
83
|
-
l1_address: Address;
|
|
84
|
-
cancel_all_time: number;
|
|
85
|
-
total_order_count: number;
|
|
86
|
-
total_isolated_order_count: number;
|
|
87
|
-
pending_order_count: number;
|
|
88
|
-
available_balance: string;
|
|
89
|
-
status: number;
|
|
90
|
-
collateral: string;
|
|
91
|
-
transaction_time: number;
|
|
92
|
-
account_trading_mode: number;
|
|
93
|
-
account_index: number;
|
|
94
|
-
name: string;
|
|
95
|
-
description: string;
|
|
96
|
-
can_invite: boolean;
|
|
97
|
-
referral_points_percentage: string;
|
|
98
|
-
can_rfq: boolean;
|
|
99
|
-
created_at: number;
|
|
100
|
-
positions: unknown[];
|
|
101
|
-
assets: LighterAsset[];
|
|
102
|
-
total_asset_value: string;
|
|
103
|
-
cross_asset_value: string;
|
|
104
|
-
shares: LighterShare[];
|
|
105
|
-
pending_unlocks: unknown[];
|
|
106
|
-
/** Pool accounts only — absent on user accounts. */
|
|
107
|
-
pool_info?: LighterPoolInfo;
|
|
108
|
-
};
|
|
109
|
-
export type LighterAccountResponse = {
|
|
110
|
-
code: number;
|
|
111
|
-
total: number;
|
|
112
|
-
accounts: LighterAccount[];
|
|
113
|
-
};
|
|
114
|
-
export type LighterAccountLookup = {
|
|
115
|
-
by: 'index';
|
|
116
|
-
value: LighterAccountIndex;
|
|
117
|
-
} | {
|
|
118
|
-
by: 'l1_address';
|
|
119
|
-
value: Address;
|
|
120
|
-
};
|
|
121
|
-
export declare function getLighterAccount(lookup: LighterAccountLookup, activeOnly?: boolean): Promise<LighterAccountResponse>;
|
|
122
18
|
export declare function useLighterAccount(lookup: LighterAccountLookup | null, options?: {
|
|
123
19
|
activeOnly?: boolean;
|
|
124
20
|
}): {
|
|
125
|
-
account: LighterAccount | undefined;
|
|
126
|
-
data: LighterAccountResponse;
|
|
127
|
-
error: Error;
|
|
128
|
-
isError: true;
|
|
129
|
-
isPending: false;
|
|
130
|
-
isLoading: false;
|
|
131
|
-
isLoadingError: false;
|
|
132
|
-
isRefetchError: true;
|
|
133
|
-
isSuccess: false;
|
|
134
|
-
isPlaceholderData: false;
|
|
135
|
-
status: "error";
|
|
136
|
-
dataUpdatedAt: number;
|
|
137
|
-
errorUpdatedAt: number;
|
|
138
|
-
failureCount: number;
|
|
139
|
-
failureReason: Error | null;
|
|
140
|
-
errorUpdateCount: number;
|
|
141
|
-
isFetched: boolean;
|
|
142
|
-
isFetchedAfterMount: boolean;
|
|
143
|
-
isFetching: boolean;
|
|
144
|
-
isInitialLoading: boolean;
|
|
145
|
-
isPaused: boolean;
|
|
146
|
-
isRefetching: boolean;
|
|
147
|
-
isStale: boolean;
|
|
148
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
149
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
150
|
-
promise: Promise<LighterAccountResponse>;
|
|
151
|
-
} | {
|
|
152
|
-
account: LighterAccount | undefined;
|
|
153
|
-
data: LighterAccountResponse;
|
|
154
|
-
error: null;
|
|
155
|
-
isError: false;
|
|
156
|
-
isPending: false;
|
|
157
|
-
isLoading: false;
|
|
158
|
-
isLoadingError: false;
|
|
159
|
-
isRefetchError: false;
|
|
160
|
-
isSuccess: true;
|
|
161
|
-
isPlaceholderData: false;
|
|
162
|
-
status: "success";
|
|
163
|
-
dataUpdatedAt: number;
|
|
164
|
-
errorUpdatedAt: number;
|
|
165
|
-
failureCount: number;
|
|
166
|
-
failureReason: Error | null;
|
|
167
|
-
errorUpdateCount: number;
|
|
168
|
-
isFetched: boolean;
|
|
169
|
-
isFetchedAfterMount: boolean;
|
|
170
|
-
isFetching: boolean;
|
|
171
|
-
isInitialLoading: boolean;
|
|
172
|
-
isPaused: boolean;
|
|
173
|
-
isRefetching: boolean;
|
|
174
|
-
isStale: boolean;
|
|
175
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
176
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
177
|
-
promise: Promise<LighterAccountResponse>;
|
|
178
|
-
} | {
|
|
179
|
-
account: LighterAccount | undefined;
|
|
180
|
-
data: undefined;
|
|
181
|
-
error: Error;
|
|
182
|
-
isError: true;
|
|
183
|
-
isPending: false;
|
|
184
|
-
isLoading: false;
|
|
185
|
-
isLoadingError: true;
|
|
186
|
-
isRefetchError: false;
|
|
187
|
-
isSuccess: false;
|
|
188
|
-
isPlaceholderData: false;
|
|
189
|
-
status: "error";
|
|
190
|
-
dataUpdatedAt: number;
|
|
191
|
-
errorUpdatedAt: number;
|
|
192
|
-
failureCount: number;
|
|
193
|
-
failureReason: Error | null;
|
|
194
|
-
errorUpdateCount: number;
|
|
195
|
-
isFetched: boolean;
|
|
196
|
-
isFetchedAfterMount: boolean;
|
|
197
|
-
isFetching: boolean;
|
|
198
|
-
isInitialLoading: boolean;
|
|
199
|
-
isPaused: boolean;
|
|
200
|
-
isRefetching: boolean;
|
|
201
|
-
isStale: boolean;
|
|
202
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
203
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
204
|
-
promise: Promise<LighterAccountResponse>;
|
|
205
|
-
} | {
|
|
206
|
-
account: LighterAccount | undefined;
|
|
207
|
-
data: undefined;
|
|
208
|
-
error: null;
|
|
209
|
-
isError: false;
|
|
210
|
-
isPending: true;
|
|
211
|
-
isLoading: true;
|
|
212
|
-
isLoadingError: false;
|
|
213
|
-
isRefetchError: false;
|
|
214
|
-
isSuccess: false;
|
|
215
|
-
isPlaceholderData: false;
|
|
216
|
-
status: "pending";
|
|
217
|
-
dataUpdatedAt: number;
|
|
218
|
-
errorUpdatedAt: number;
|
|
219
|
-
failureCount: number;
|
|
220
|
-
failureReason: Error | null;
|
|
221
|
-
errorUpdateCount: number;
|
|
222
|
-
isFetched: boolean;
|
|
223
|
-
isFetchedAfterMount: boolean;
|
|
224
|
-
isFetching: boolean;
|
|
225
|
-
isInitialLoading: boolean;
|
|
226
|
-
isPaused: boolean;
|
|
227
|
-
isRefetching: boolean;
|
|
228
|
-
isStale: boolean;
|
|
229
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
230
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
231
|
-
promise: Promise<LighterAccountResponse>;
|
|
232
|
-
} | {
|
|
233
|
-
account: LighterAccount | undefined;
|
|
234
|
-
data: undefined;
|
|
235
|
-
error: null;
|
|
236
|
-
isError: false;
|
|
237
|
-
isPending: true;
|
|
238
|
-
isLoadingError: false;
|
|
239
|
-
isRefetchError: false;
|
|
240
|
-
isSuccess: false;
|
|
241
|
-
isPlaceholderData: false;
|
|
242
|
-
status: "pending";
|
|
243
|
-
dataUpdatedAt: number;
|
|
244
|
-
errorUpdatedAt: number;
|
|
245
|
-
failureCount: number;
|
|
246
|
-
failureReason: Error | null;
|
|
247
|
-
errorUpdateCount: number;
|
|
248
|
-
isFetched: boolean;
|
|
249
|
-
isFetchedAfterMount: boolean;
|
|
250
|
-
isFetching: boolean;
|
|
251
|
-
isLoading: boolean;
|
|
252
|
-
isInitialLoading: boolean;
|
|
253
|
-
isPaused: boolean;
|
|
254
|
-
isRefetching: boolean;
|
|
255
|
-
isStale: boolean;
|
|
256
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
257
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
258
|
-
promise: Promise<LighterAccountResponse>;
|
|
259
|
-
} | {
|
|
260
|
-
account: LighterAccount | undefined;
|
|
261
|
-
data: LighterAccountResponse;
|
|
262
|
-
isError: false;
|
|
263
|
-
error: null;
|
|
264
|
-
isPending: false;
|
|
265
|
-
isLoading: false;
|
|
266
|
-
isLoadingError: false;
|
|
267
|
-
isRefetchError: false;
|
|
268
|
-
isSuccess: true;
|
|
269
|
-
isPlaceholderData: true;
|
|
270
|
-
status: "success";
|
|
271
|
-
dataUpdatedAt: number;
|
|
272
|
-
errorUpdatedAt: number;
|
|
273
|
-
failureCount: number;
|
|
274
|
-
failureReason: Error | null;
|
|
275
|
-
errorUpdateCount: number;
|
|
276
|
-
isFetched: boolean;
|
|
277
|
-
isFetchedAfterMount: boolean;
|
|
278
|
-
isFetching: boolean;
|
|
279
|
-
isInitialLoading: boolean;
|
|
280
|
-
isPaused: boolean;
|
|
281
|
-
isRefetching: boolean;
|
|
282
|
-
isStale: boolean;
|
|
283
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
284
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
285
|
-
promise: Promise<LighterAccountResponse>;
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* Ungated {@link useLighterAccount}. For callers whose module is Lighter-specific
|
|
289
|
-
* by construction — `clients/lighter` is a separate bundle entry with its own copy
|
|
290
|
-
* of the config context, so `useFunkitConfig()` there yields no api key and a
|
|
291
|
-
* customer check would disable the query forever.
|
|
292
|
-
*/
|
|
293
|
-
export declare function useLighterAccountQuery(lookup: LighterAccountLookup | null, options?: {
|
|
294
|
-
activeOnly?: boolean;
|
|
295
|
-
}): {
|
|
296
|
-
account: LighterAccount | undefined;
|
|
297
|
-
data: LighterAccountResponse;
|
|
21
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
22
|
+
data: import("@funkit/connect-core").LighterAccountResponse;
|
|
298
23
|
error: Error;
|
|
299
24
|
isError: true;
|
|
300
25
|
isPending: false;
|
|
@@ -316,12 +41,12 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
316
41
|
isPaused: boolean;
|
|
317
42
|
isRefetching: boolean;
|
|
318
43
|
isStale: boolean;
|
|
319
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
44
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
320
45
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
321
|
-
promise: Promise<LighterAccountResponse>;
|
|
46
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
322
47
|
} | {
|
|
323
|
-
account: LighterAccount | undefined;
|
|
324
|
-
data: LighterAccountResponse;
|
|
48
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
49
|
+
data: import("@funkit/connect-core").LighterAccountResponse;
|
|
325
50
|
error: null;
|
|
326
51
|
isError: false;
|
|
327
52
|
isPending: false;
|
|
@@ -343,11 +68,11 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
343
68
|
isPaused: boolean;
|
|
344
69
|
isRefetching: boolean;
|
|
345
70
|
isStale: boolean;
|
|
346
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
71
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
347
72
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
348
|
-
promise: Promise<LighterAccountResponse>;
|
|
73
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
349
74
|
} | {
|
|
350
|
-
account: LighterAccount | undefined;
|
|
75
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
351
76
|
data: undefined;
|
|
352
77
|
error: Error;
|
|
353
78
|
isError: true;
|
|
@@ -370,11 +95,11 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
370
95
|
isPaused: boolean;
|
|
371
96
|
isRefetching: boolean;
|
|
372
97
|
isStale: boolean;
|
|
373
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
98
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
374
99
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
375
|
-
promise: Promise<LighterAccountResponse>;
|
|
100
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
376
101
|
} | {
|
|
377
|
-
account: LighterAccount | undefined;
|
|
102
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
378
103
|
data: undefined;
|
|
379
104
|
error: null;
|
|
380
105
|
isError: false;
|
|
@@ -397,11 +122,11 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
397
122
|
isPaused: boolean;
|
|
398
123
|
isRefetching: boolean;
|
|
399
124
|
isStale: boolean;
|
|
400
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
125
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
401
126
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
402
|
-
promise: Promise<LighterAccountResponse>;
|
|
127
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
403
128
|
} | {
|
|
404
|
-
account: LighterAccount | undefined;
|
|
129
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
405
130
|
data: undefined;
|
|
406
131
|
error: null;
|
|
407
132
|
isError: false;
|
|
@@ -424,12 +149,12 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
424
149
|
isPaused: boolean;
|
|
425
150
|
isRefetching: boolean;
|
|
426
151
|
isStale: boolean;
|
|
427
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
152
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
428
153
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
429
|
-
promise: Promise<LighterAccountResponse>;
|
|
154
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
430
155
|
} | {
|
|
431
|
-
account: LighterAccount | undefined;
|
|
432
|
-
data: LighterAccountResponse;
|
|
156
|
+
account: import("@funkit/connect-core").LighterAccount | undefined;
|
|
157
|
+
data: import("@funkit/connect-core").LighterAccountResponse;
|
|
433
158
|
isError: false;
|
|
434
159
|
error: null;
|
|
435
160
|
isPending: false;
|
|
@@ -451,17 +176,17 @@ export declare function useLighterAccountQuery(lookup: LighterAccountLookup | nu
|
|
|
451
176
|
isPaused: boolean;
|
|
452
177
|
isRefetching: boolean;
|
|
453
178
|
isStale: boolean;
|
|
454
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
|
|
179
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountResponse, Error>>;
|
|
455
180
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
456
|
-
promise: Promise<LighterAccountResponse>;
|
|
181
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountResponse>;
|
|
457
182
|
};
|
|
458
183
|
export declare function useLighterAccounts({ address, }: {
|
|
459
184
|
address: Address | '' | undefined;
|
|
460
185
|
}): {
|
|
461
186
|
mainAccountIndex: string | undefined;
|
|
462
187
|
isUnifiedTradingMode: boolean;
|
|
463
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
464
|
-
data: LighterAccountsByL1AddressResponse;
|
|
188
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
189
|
+
data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
|
|
465
190
|
error: Error;
|
|
466
191
|
isError: true;
|
|
467
192
|
isPending: false;
|
|
@@ -483,14 +208,14 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
483
208
|
isPaused: boolean;
|
|
484
209
|
isRefetching: boolean;
|
|
485
210
|
isStale: boolean;
|
|
486
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
211
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
487
212
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
488
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
213
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
489
214
|
} | {
|
|
490
215
|
mainAccountIndex: string | undefined;
|
|
491
216
|
isUnifiedTradingMode: boolean;
|
|
492
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
493
|
-
data: LighterAccountsByL1AddressResponse;
|
|
217
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
218
|
+
data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
|
|
494
219
|
error: null;
|
|
495
220
|
isError: false;
|
|
496
221
|
isPending: false;
|
|
@@ -512,13 +237,13 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
512
237
|
isPaused: boolean;
|
|
513
238
|
isRefetching: boolean;
|
|
514
239
|
isStale: boolean;
|
|
515
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
240
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
516
241
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
517
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
242
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
518
243
|
} | {
|
|
519
244
|
mainAccountIndex: string | undefined;
|
|
520
245
|
isUnifiedTradingMode: boolean;
|
|
521
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
246
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
522
247
|
data: undefined;
|
|
523
248
|
error: Error;
|
|
524
249
|
isError: true;
|
|
@@ -541,13 +266,13 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
541
266
|
isPaused: boolean;
|
|
542
267
|
isRefetching: boolean;
|
|
543
268
|
isStale: boolean;
|
|
544
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
269
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
545
270
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
546
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
271
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
547
272
|
} | {
|
|
548
273
|
mainAccountIndex: string | undefined;
|
|
549
274
|
isUnifiedTradingMode: boolean;
|
|
550
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
275
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
551
276
|
data: undefined;
|
|
552
277
|
error: null;
|
|
553
278
|
isError: false;
|
|
@@ -570,13 +295,13 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
570
295
|
isPaused: boolean;
|
|
571
296
|
isRefetching: boolean;
|
|
572
297
|
isStale: boolean;
|
|
573
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
298
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
574
299
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
575
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
300
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
576
301
|
} | {
|
|
577
302
|
mainAccountIndex: string | undefined;
|
|
578
303
|
isUnifiedTradingMode: boolean;
|
|
579
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
304
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
580
305
|
data: undefined;
|
|
581
306
|
error: null;
|
|
582
307
|
isError: false;
|
|
@@ -599,14 +324,14 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
599
324
|
isPaused: boolean;
|
|
600
325
|
isRefetching: boolean;
|
|
601
326
|
isStale: boolean;
|
|
602
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
327
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
603
328
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
604
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
329
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
605
330
|
} | {
|
|
606
331
|
mainAccountIndex: string | undefined;
|
|
607
332
|
isUnifiedTradingMode: boolean;
|
|
608
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
609
|
-
data: LighterAccountsByL1AddressResponse;
|
|
333
|
+
subAccounts: import("@funkit/connect-core").LighterSubAccount[] | undefined;
|
|
334
|
+
data: import("@funkit/connect-core").LighterAccountsByL1AddressResponse;
|
|
610
335
|
isError: false;
|
|
611
336
|
error: null;
|
|
612
337
|
isPending: false;
|
|
@@ -628,191 +353,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
628
353
|
isPaused: boolean;
|
|
629
354
|
isRefetching: boolean;
|
|
630
355
|
isStale: boolean;
|
|
631
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
356
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@funkit/connect-core").LighterAccountsByL1AddressResponse, Error>>;
|
|
632
357
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
633
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
358
|
+
promise: Promise<import("@funkit/connect-core").LighterAccountsByL1AddressResponse>;
|
|
634
359
|
};
|
|
635
|
-
/** Ungated {@link useLighterAccounts}. See {@link useLighterAccountQuery}. */
|
|
636
|
-
export declare function useLighterAccountsQuery({ address, }: {
|
|
637
|
-
address: Address | '' | undefined;
|
|
638
|
-
}): {
|
|
639
|
-
mainAccountIndex: string | undefined;
|
|
640
|
-
isUnifiedTradingMode: boolean;
|
|
641
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
642
|
-
data: LighterAccountsByL1AddressResponse;
|
|
643
|
-
error: Error;
|
|
644
|
-
isError: true;
|
|
645
|
-
isPending: false;
|
|
646
|
-
isLoading: false;
|
|
647
|
-
isLoadingError: false;
|
|
648
|
-
isRefetchError: true;
|
|
649
|
-
isSuccess: false;
|
|
650
|
-
isPlaceholderData: false;
|
|
651
|
-
status: "error";
|
|
652
|
-
dataUpdatedAt: number;
|
|
653
|
-
errorUpdatedAt: number;
|
|
654
|
-
failureCount: number;
|
|
655
|
-
failureReason: Error | null;
|
|
656
|
-
errorUpdateCount: number;
|
|
657
|
-
isFetched: boolean;
|
|
658
|
-
isFetchedAfterMount: boolean;
|
|
659
|
-
isFetching: boolean;
|
|
660
|
-
isInitialLoading: boolean;
|
|
661
|
-
isPaused: boolean;
|
|
662
|
-
isRefetching: boolean;
|
|
663
|
-
isStale: boolean;
|
|
664
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
665
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
666
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
667
|
-
} | {
|
|
668
|
-
mainAccountIndex: string | undefined;
|
|
669
|
-
isUnifiedTradingMode: boolean;
|
|
670
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
671
|
-
data: LighterAccountsByL1AddressResponse;
|
|
672
|
-
error: null;
|
|
673
|
-
isError: false;
|
|
674
|
-
isPending: false;
|
|
675
|
-
isLoading: false;
|
|
676
|
-
isLoadingError: false;
|
|
677
|
-
isRefetchError: false;
|
|
678
|
-
isSuccess: true;
|
|
679
|
-
isPlaceholderData: false;
|
|
680
|
-
status: "success";
|
|
681
|
-
dataUpdatedAt: number;
|
|
682
|
-
errorUpdatedAt: number;
|
|
683
|
-
failureCount: number;
|
|
684
|
-
failureReason: Error | null;
|
|
685
|
-
errorUpdateCount: number;
|
|
686
|
-
isFetched: boolean;
|
|
687
|
-
isFetchedAfterMount: boolean;
|
|
688
|
-
isFetching: boolean;
|
|
689
|
-
isInitialLoading: boolean;
|
|
690
|
-
isPaused: boolean;
|
|
691
|
-
isRefetching: boolean;
|
|
692
|
-
isStale: boolean;
|
|
693
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
694
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
695
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
696
|
-
} | {
|
|
697
|
-
mainAccountIndex: string | undefined;
|
|
698
|
-
isUnifiedTradingMode: boolean;
|
|
699
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
700
|
-
data: undefined;
|
|
701
|
-
error: Error;
|
|
702
|
-
isError: true;
|
|
703
|
-
isPending: false;
|
|
704
|
-
isLoading: false;
|
|
705
|
-
isLoadingError: true;
|
|
706
|
-
isRefetchError: false;
|
|
707
|
-
isSuccess: false;
|
|
708
|
-
isPlaceholderData: false;
|
|
709
|
-
status: "error";
|
|
710
|
-
dataUpdatedAt: number;
|
|
711
|
-
errorUpdatedAt: number;
|
|
712
|
-
failureCount: number;
|
|
713
|
-
failureReason: Error | null;
|
|
714
|
-
errorUpdateCount: number;
|
|
715
|
-
isFetched: boolean;
|
|
716
|
-
isFetchedAfterMount: boolean;
|
|
717
|
-
isFetching: boolean;
|
|
718
|
-
isInitialLoading: boolean;
|
|
719
|
-
isPaused: boolean;
|
|
720
|
-
isRefetching: boolean;
|
|
721
|
-
isStale: boolean;
|
|
722
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
723
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
724
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
725
|
-
} | {
|
|
726
|
-
mainAccountIndex: string | undefined;
|
|
727
|
-
isUnifiedTradingMode: boolean;
|
|
728
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
729
|
-
data: undefined;
|
|
730
|
-
error: null;
|
|
731
|
-
isError: false;
|
|
732
|
-
isPending: true;
|
|
733
|
-
isLoading: true;
|
|
734
|
-
isLoadingError: false;
|
|
735
|
-
isRefetchError: false;
|
|
736
|
-
isSuccess: false;
|
|
737
|
-
isPlaceholderData: false;
|
|
738
|
-
status: "pending";
|
|
739
|
-
dataUpdatedAt: number;
|
|
740
|
-
errorUpdatedAt: number;
|
|
741
|
-
failureCount: number;
|
|
742
|
-
failureReason: Error | null;
|
|
743
|
-
errorUpdateCount: number;
|
|
744
|
-
isFetched: boolean;
|
|
745
|
-
isFetchedAfterMount: boolean;
|
|
746
|
-
isFetching: boolean;
|
|
747
|
-
isInitialLoading: boolean;
|
|
748
|
-
isPaused: boolean;
|
|
749
|
-
isRefetching: boolean;
|
|
750
|
-
isStale: boolean;
|
|
751
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
752
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
753
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
754
|
-
} | {
|
|
755
|
-
mainAccountIndex: string | undefined;
|
|
756
|
-
isUnifiedTradingMode: boolean;
|
|
757
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
758
|
-
data: undefined;
|
|
759
|
-
error: null;
|
|
760
|
-
isError: false;
|
|
761
|
-
isPending: true;
|
|
762
|
-
isLoadingError: false;
|
|
763
|
-
isRefetchError: false;
|
|
764
|
-
isSuccess: false;
|
|
765
|
-
isPlaceholderData: false;
|
|
766
|
-
status: "pending";
|
|
767
|
-
dataUpdatedAt: number;
|
|
768
|
-
errorUpdatedAt: number;
|
|
769
|
-
failureCount: number;
|
|
770
|
-
failureReason: Error | null;
|
|
771
|
-
errorUpdateCount: number;
|
|
772
|
-
isFetched: boolean;
|
|
773
|
-
isFetchedAfterMount: boolean;
|
|
774
|
-
isFetching: boolean;
|
|
775
|
-
isLoading: boolean;
|
|
776
|
-
isInitialLoading: boolean;
|
|
777
|
-
isPaused: boolean;
|
|
778
|
-
isRefetching: boolean;
|
|
779
|
-
isStale: boolean;
|
|
780
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
781
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
782
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
783
|
-
} | {
|
|
784
|
-
mainAccountIndex: string | undefined;
|
|
785
|
-
isUnifiedTradingMode: boolean;
|
|
786
|
-
subAccounts: LighterSubAccount[] | undefined;
|
|
787
|
-
data: LighterAccountsByL1AddressResponse;
|
|
788
|
-
isError: false;
|
|
789
|
-
error: null;
|
|
790
|
-
isPending: false;
|
|
791
|
-
isLoading: false;
|
|
792
|
-
isLoadingError: false;
|
|
793
|
-
isRefetchError: false;
|
|
794
|
-
isSuccess: true;
|
|
795
|
-
isPlaceholderData: true;
|
|
796
|
-
status: "success";
|
|
797
|
-
dataUpdatedAt: number;
|
|
798
|
-
errorUpdatedAt: number;
|
|
799
|
-
failureCount: number;
|
|
800
|
-
failureReason: Error | null;
|
|
801
|
-
errorUpdateCount: number;
|
|
802
|
-
isFetched: boolean;
|
|
803
|
-
isFetchedAfterMount: boolean;
|
|
804
|
-
isFetching: boolean;
|
|
805
|
-
isInitialLoading: boolean;
|
|
806
|
-
isPaused: boolean;
|
|
807
|
-
isRefetching: boolean;
|
|
808
|
-
isStale: boolean;
|
|
809
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
|
|
810
|
-
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
811
|
-
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
812
|
-
};
|
|
813
|
-
/**
|
|
814
|
-
* Returns a callback that invalidates the cached Lighter account queries so the
|
|
815
|
-
* balance refetches eagerly (e.g. right after a withdrawal). No-op for
|
|
816
|
-
* non-Lighter customers.
|
|
817
|
-
*/
|
|
818
|
-
export declare function useInvalidateLighterAccount(): () => void;
|