@liberfi.io/react 0.3.87 → 0.3.89

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/dist/index.d.ts CHANGED
@@ -1,11 +1,31 @@
1
1
  import * as react from 'react';
2
2
  import { PropsWithChildren } from 'react';
3
3
  import * as _liberfi_io_types from '@liberfi.io/types';
4
- import { IClient, ISubscribeClient, GetTokenListOptions, Chain, Token, LatestBlockParams, BlockchainLatestBlock, Pool, SearchTokensOptions, SearchTokenCursorList, SendTxParams, SendTxResult, SwapParams, SwapRoute, GetTokenCandlesOptions, TokenResolution, TokenCandle, GetTokenHoldersOptions, CursorList, TokenHolder, TokenMarketData, TokenSecurity, GetTokensByCreatorOptions, TokenStats, GetTokenTopTradersOptions, TokenTopTrader, GetTradesOptions, Trade, GetWalletLimitOrdersOptions, LimitOrder, WalletPnlResolution, WalletPnl, GetWalletPortfolioPnlsOptions, WalletPortfolioPnls, PositionState, WalletPnlSortBy, WalletPortfolios, Portfolio, PortfolioPnl, GetActivitiesOptions, Activity, TokenSubscribed, WalletPnlSubscribed, PortfolioSubscribed, PortfolioPnlSubscribed, PoolSubscribed } from '@liberfi.io/types';
4
+ import { TokenDataCapability, WalletDataCapability, ActivityDataCapability, TradeCapability, TransactionCapability, MediaCapability, TokenSubscriptionCapability, WalletSubscriptionCapability, ActivitySubscriptionCapability, IClient, ISubscribeClient, GetTokenListOptions, Chain, Token, LatestBlockParams, BlockchainLatestBlock, Pool, SearchTokensOptions, SearchTokenCursorList, SendTxParams, SendTxResult, SwapParams, SwapRoute, GetTokenCandlesOptions, TokenResolution, TokenCandle, GetTokenHoldersOptions, CursorList, TokenHolder, TokenMarketData, TokenSecurity, GetTokensByCreatorOptions, TokenStats, GetTokenTopTradersOptions, TokenTopTrader, GetTradesOptions, Trade, GetWalletLimitOrdersOptions, LimitOrder, WalletPnlResolution, WalletPnl, GetWalletPortfolioPnlsOptions, WalletPortfolioPnls, PositionState, WalletPnlSortBy, WalletPortfolios, Portfolio, PortfolioPnl, GetActivitiesOptions, Activity, TokenSubscribed, WalletPnlSubscribed, PortfolioSubscribed, PortfolioPnlSubscribed, PoolSubscribed } from '@liberfi.io/types';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { UseQueryOptions, UseQueryResult, UseInfiniteQueryOptions, InfiniteData, UseInfiniteQueryResult, QueryClient, UseMutationOptions } from '@tanstack/react-query';
7
+ import { TradeExecutionAdapter, TradeExecutionClock, TradeExecutionSnapshot, TradeIntent, TradeExecuteOptions, TradeExecutionResult, TradeExecutionRuntime } from '@liberfi.io/client';
8
+ export { IN_FLIGHT_TRADE_STATES, POST_SIGN_MIN_REMAINING_BLOCKS, POST_SIGN_STALE_MS, PRE_SIGN_MIN_REMAINING_BLOCKS, PRE_SIGN_STALE_MS, TradeExecuteOptions, TradeExecutionAdapter, TradeExecutionClock, TradeExecutionError, TradeExecutionFailureReason, TradeExecutionPhase, TradeExecutionResult, TradeExecutionRuntime, TradeExecutionRuntimeOptions, TradeExecutionSignFn, TradeExecutionSnapshot, TradeExecutionState, TradeIntent, TradeLatestBlock, TradeRouteExpiredError, createClientTradeExecutionAdapter, intentToSwapParams, systemClock } from '@liberfi.io/client';
7
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
10
 
11
+ interface DexCapabilities {
12
+ token: TokenDataCapability;
13
+ wallet: WalletDataCapability;
14
+ activity: ActivityDataCapability;
15
+ trade: TradeCapability;
16
+ transaction: TransactionCapability;
17
+ media: MediaCapability;
18
+ tokenSubscription: TokenSubscriptionCapability;
19
+ walletSubscription: WalletSubscriptionCapability;
20
+ activitySubscription: ActivitySubscriptionCapability;
21
+ }
22
+ type DexCapabilityKey = keyof DexCapabilities;
23
+ declare const CapabilityContext: react.Context<DexCapabilities | null>;
24
+ /** Return the domain capability set installed by `DexClientProvider`. */
25
+ declare function useDexCapabilities(): DexCapabilities;
26
+ /** Return one domain capability without exposing the complete bundle. */
27
+ declare function useDexCapability<TKey extends DexCapabilityKey>(key: TKey): DexCapabilities[TKey];
28
+
9
29
  /**
10
30
  * Default prefix prepended to every TanStack Query key produced by hooks in
11
31
  * this package. Can be overridden via
@@ -23,6 +43,8 @@ interface DexClientContextValue {
23
43
  subscribeClient: ISubscribeClient;
24
44
  /** Prefix used in all query keys produced by hooks. */
25
45
  queryKeyPrefix: string;
46
+ /** Domain-scoped capabilities used by new hooks. */
47
+ capabilities: DexCapabilities;
26
48
  }
27
49
  /**
28
50
  * Internal React context. Use `DexClientProvider` to supply the value and
@@ -37,17 +59,19 @@ declare const DexClientContext: react.Context<DexClientContextValue | null>;
37
59
  */
38
60
  declare function useDexClient(): DexClientContextValue;
39
61
 
40
- interface QueryHookConfig<TParams, TData> {
62
+ type QueryCapability<TKey extends DexCapabilityKey | undefined> = TKey extends DexCapabilityKey ? DexCapabilities[TKey] : IClient;
63
+ interface QueryHookConfig<TParams, TData, TKey extends DexCapabilityKey | undefined = undefined> {
41
64
  /** Key name segment (e.g. `"token"`, `"newTokens"`). */
42
65
  name: string;
43
66
  /** Builds the variable segments of the query key from `params`. */
44
67
  queryKey: (params: TParams) => string[];
45
68
  /** Fetches data using the API client. */
46
- fetch: (client: IClient, params: TParams) => Promise<TData>;
69
+ capability?: TKey;
70
+ fetch: (client: QueryCapability<TKey>, params: TParams) => Promise<TData>;
47
71
  /** Default options merged *below* caller-supplied options. */
48
72
  defaultOptions?: Partial<Omit<UseQueryOptions<TData, Error, TData, string[]>, "queryKey" | "queryFn">>;
49
73
  }
50
- interface QueryHookReturn<TParams, TData> {
74
+ interface QueryHookReturn<TParams, TData, TKey extends DexCapabilityKey | undefined = undefined> {
51
75
  /**
52
76
  * Builds the full query key including the namespace prefix.
53
77
  *
@@ -59,7 +83,7 @@ interface QueryHookReturn<TParams, TData> {
59
83
  */
60
84
  queryKey: (params: TParams, prefix?: string) => string[];
61
85
  /** Fetches data using the API client (for use outside React). */
62
- fetch: (client: IClient, params: TParams) => Promise<TData>;
86
+ fetch: (client: QueryCapability<TKey>, params: TParams) => Promise<TData>;
63
87
  /** React hook that fetches and caches data via TanStack Query. */
64
88
  useQuery: (params: TParams, options?: Omit<UseQueryOptions<TData, Error, TData, string[]>, "queryKey" | "queryFn">) => UseQueryResult<TData, Error>;
65
89
  }
@@ -67,19 +91,22 @@ interface QueryHookReturn<TParams, TData> {
67
91
  * Creates a `useQuery`-based hook, its `queryKey` builder and a standalone
68
92
  * `fetch` function from a single declarative config object.
69
93
  */
70
- declare function createQueryHook<TParams, TData>(config: QueryHookConfig<TParams, TData>): QueryHookReturn<TParams, TData>;
94
+ declare function createQueryHook<TParams, TData, TKey extends DexCapabilityKey | undefined = undefined>(config: QueryHookConfig<TParams, TData, TKey>): QueryHookReturn<TParams, TData, TKey>;
71
95
 
72
96
  interface CursorPaginatedResult {
73
97
  hasNext?: boolean;
74
98
  endCursor?: string;
75
99
  }
76
- interface InfiniteQueryHookConfig<TParams, TData extends CursorPaginatedResult> {
100
+ type InfiniteQueryCapability<TKey extends DexCapabilityKey | undefined> = TKey extends DexCapabilityKey ? DexCapabilities[TKey] : IClient;
101
+ interface InfiniteQueryHookConfig<TParams, TData extends CursorPaginatedResult, TKey extends DexCapabilityKey | undefined = undefined> {
77
102
  /** Key name segment (e.g. `"walletPortfolios"`). */
78
103
  name: string;
79
104
  /** Builds the variable segments of the query key from `params`. */
80
105
  queryKey: (params: TParams) => string[];
106
+ /** Domain capability supplied to the page fetcher. */
107
+ capability?: TKey;
81
108
  /** Fetches a single page of data. */
82
- fetch: (client: IClient, params: TParams, cursor: string | undefined) => Promise<TData>;
109
+ fetch: (client: InfiniteQueryCapability<TKey>, params: TParams, cursor: string | undefined) => Promise<TData>;
83
110
  }
84
111
  interface InfiniteQueryHookReturn<TParams, TData extends CursorPaginatedResult> {
85
112
  /**
@@ -94,7 +121,7 @@ interface InfiniteQueryHookReturn<TParams, TData extends CursorPaginatedResult>
94
121
  * Creates a `useInfiniteQuery`-based hook and its `queryKey` builder for
95
122
  * cursor-paginated endpoints.
96
123
  */
97
- declare function createInfiniteQueryHook<TParams, TData extends CursorPaginatedResult>(config: InfiniteQueryHookConfig<TParams, TData>): InfiniteQueryHookReturn<TParams, TData>;
124
+ declare function createInfiniteQueryHook<TParams, TData extends CursorPaginatedResult, TKey extends DexCapabilityKey | undefined = undefined>(config: InfiniteQueryHookConfig<TParams, TData, TKey>): InfiniteQueryHookReturn<TParams, TData>;
98
125
 
99
126
  interface SubscriptionOptions {
100
127
  /** Set to `false` to pause the subscription. Defaults to `true`. */
@@ -119,12 +146,12 @@ interface UseFinalStretchTokensQueryParams extends GetTokenListOptions {
119
146
  chain: Chain;
120
147
  }
121
148
  declare const finalStretchTokensQueryKey: (params: UseFinalStretchTokensQueryParams, prefix?: string) => string[];
122
- declare const fetchFinalStretchTokens: (client: _liberfi_io_types.IClient, params: UseFinalStretchTokensQueryParams) => Promise<Token[]>;
149
+ declare const fetchFinalStretchTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseFinalStretchTokensQueryParams) => Promise<Token[]>;
123
150
  declare const useFinalStretchTokensQuery: (params: UseFinalStretchTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
124
151
 
125
152
  type UseLatestBlockQueryParams = LatestBlockParams;
126
153
  declare const latestBlockQueryKey: (params: LatestBlockParams, prefix?: string) => string[];
127
- declare const fetchLatestBlock: (client: _liberfi_io_types.IClient, params: LatestBlockParams) => Promise<BlockchainLatestBlock>;
154
+ declare const fetchLatestBlock: (client: _liberfi_io_types.TransactionCapability, params: LatestBlockParams) => Promise<BlockchainLatestBlock>;
128
155
  declare const useLatestBlockQuery: (params: LatestBlockParams, options?: Omit<_tanstack_react_query.UseQueryOptions<BlockchainLatestBlock, Error, BlockchainLatestBlock, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<BlockchainLatestBlock, Error>;
129
156
  interface LatestBlockCacheResult {
130
157
  data?: BlockchainLatestBlock;
@@ -142,7 +169,7 @@ interface UseMigratedTokensQueryParams extends GetTokenListOptions {
142
169
  chain: Chain;
143
170
  }
144
171
  declare const migratedTokensQueryKey: (params: UseMigratedTokensQueryParams, prefix?: string) => string[];
145
- declare const fetchMigratedTokens: (client: _liberfi_io_types.IClient, params: UseMigratedTokensQueryParams) => Promise<Token[]>;
172
+ declare const fetchMigratedTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseMigratedTokensQueryParams) => Promise<Token[]>;
146
173
  declare const useMigratedTokensQuery: (params: UseMigratedTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
147
174
 
148
175
  /** Parameters for {@link useNewPoolsQuery}. */
@@ -150,7 +177,7 @@ interface UseNewPoolsQueryParams extends GetTokenListOptions {
150
177
  chain: Chain;
151
178
  }
152
179
  declare const newPoolsQueryKey: (params: UseNewPoolsQueryParams, prefix?: string) => string[];
153
- declare const fetchNewPools: (client: _liberfi_io_types.IClient, params: UseNewPoolsQueryParams) => Promise<Pool[]>;
180
+ declare const fetchNewPools: (client: _liberfi_io_types.TokenDataCapability, params: UseNewPoolsQueryParams) => Promise<Pool[]>;
154
181
  declare const useNewPoolsQuery: (params: UseNewPoolsQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Pool[], Error, Pool[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Pool[], Error>;
155
182
 
156
183
  /** Parameters for {@link useNewTokensQuery}. */
@@ -158,7 +185,7 @@ interface UseNewTokensQueryParams extends GetTokenListOptions {
158
185
  chain: Chain;
159
186
  }
160
187
  declare const newTokensQueryKey: (params: UseNewTokensQueryParams, prefix?: string) => string[];
161
- declare const fetchNewTokens: (client: _liberfi_io_types.IClient, params: UseNewTokensQueryParams) => Promise<Token[]>;
188
+ declare const fetchNewTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseNewTokensQueryParams) => Promise<Token[]>;
162
189
  declare const useNewTokensQuery: (params: UseNewTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
163
190
 
164
191
  /**
@@ -168,13 +195,13 @@ declare const useNewTokensQuery: (params: UseNewTokensQueryParams, options?: Omi
168
195
  */
169
196
  declare function presignedUploadUrlQueryKey(prefix?: string): string[];
170
197
  /** Fetches a presigned upload URL (for use outside React). */
171
- declare function fetchPresignedUploadUrl(client: IClient): Promise<string>;
198
+ declare function fetchPresignedUploadUrl(client: MediaCapability): Promise<string>;
172
199
  /** Fetches a one-time presigned upload URL. `staleTime` defaults to `0`. */
173
200
  declare function usePresignedUploadUrlQuery(options?: Omit<UseQueryOptions<string, Error, string, string[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<string, Error>;
174
201
 
175
202
  type UseSearchTokensQueryParams = SearchTokensOptions;
176
203
  declare const searchTokensQueryKey: (params: SearchTokensOptions, prefix?: string) => string[];
177
- declare const fetchSearchTokens: (client: _liberfi_io_types.IClient, params: SearchTokensOptions) => Promise<SearchTokenCursorList>;
204
+ declare const fetchSearchTokens: (client: _liberfi_io_types.TokenDataCapability, params: SearchTokensOptions) => Promise<SearchTokenCursorList>;
178
205
  declare const useSearchTokensQuery: (params: SearchTokensOptions, options?: Omit<_tanstack_react_query.UseQueryOptions<SearchTokenCursorList, Error, SearchTokenCursorList, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<SearchTokenCursorList, Error>;
179
206
 
180
207
  /** Parameters for {@link useSearchTokensInfiniteQuery}. */
@@ -184,7 +211,7 @@ declare const useSearchTokensInfiniteQuery: (params: UseSearchTokensInfiniteQuer
184
211
 
185
212
  type UseSendTxMutationParams = SendTxParams;
186
213
  /** Sends a transaction via the API client (for use outside React). */
187
- declare function sendTx(client: IClient, params: UseSendTxMutationParams): Promise<SendTxResult>;
214
+ declare function sendTx(client: TransactionCapability, params: UseSendTxMutationParams): Promise<SendTxResult>;
188
215
  /** Mutation hook that sends a transaction. */
189
216
  declare function useSendTxMutation(options?: Omit<UseMutationOptions<SendTxResult, Error, UseSendTxMutationParams>, "mutationFn">): _tanstack_react_query.UseMutationResult<SendTxResult, Error, SendTxParams, unknown>;
190
217
 
@@ -193,14 +220,38 @@ interface UseStockTokensQueryParams extends GetTokenListOptions {
193
220
  chain: Chain;
194
221
  }
195
222
  declare const stockTokensQueryKey: (params: UseStockTokensQueryParams, prefix?: string) => string[];
196
- declare const fetchStockTokens: (client: _liberfi_io_types.IClient, params: UseStockTokensQueryParams) => Promise<Token[]>;
223
+ declare const fetchStockTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseStockTokensQueryParams) => Promise<Token[]>;
197
224
  declare const useStockTokensQuery: (params: UseStockTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
198
225
 
199
226
  type UseSwapRouteQueryParams = SwapParams;
200
227
  declare const swapRouteQueryKey: (params: SwapParams, prefix?: string) => string[];
201
- declare const fetchSwapRoute: (client: _liberfi_io_types.IClient, params: SwapParams) => Promise<SwapRoute>;
228
+ declare const fetchSwapRoute: (client: _liberfi_io_types.TradeCapability, params: SwapParams) => Promise<SwapRoute>;
202
229
  declare const useSwapRouteQuery: (params: SwapParams, options?: Omit<_tanstack_react_query.UseQueryOptions<SwapRoute, Error, SwapRoute, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<SwapRoute, Error>;
203
230
 
231
+ interface UseTradeExecutionOptions {
232
+ adapter: TradeExecutionAdapter;
233
+ clock?: TradeExecutionClock;
234
+ id?: () => string;
235
+ }
236
+ interface UseTradeExecutionResult {
237
+ snapshot: TradeExecutionSnapshot;
238
+ state: TradeExecutionSnapshot["state"];
239
+ isInFlight: boolean;
240
+ execute: (intent: TradeIntent, options?: TradeExecuteOptions) => Promise<TradeExecutionResult>;
241
+ cancel: () => void;
242
+ retry: () => Promise<TradeExecutionResult>;
243
+ confirm: (options?: {
244
+ timeoutMs?: number;
245
+ }) => Promise<"confirmed" | "failed">;
246
+ runtime: TradeExecutionRuntime;
247
+ }
248
+ /**
249
+ * Thin React binding around {@link TradeExecutionRuntime}.
250
+ * The adapter (and per-execute sign function) are injected by the caller;
251
+ * this hook never stores a UI wallet object.
252
+ */
253
+ declare function useTradeExecution(options: UseTradeExecutionOptions): UseTradeExecutionResult;
254
+
204
255
  /** Parameters for {@link useTokenCandlesQuery}. */
205
256
  interface UseTokenCandlesQueryParams extends GetTokenCandlesOptions {
206
257
  chain: Chain;
@@ -208,7 +259,7 @@ interface UseTokenCandlesQueryParams extends GetTokenCandlesOptions {
208
259
  resolution: TokenResolution;
209
260
  }
210
261
  declare const tokenCandlesQueryKey: (params: UseTokenCandlesQueryParams, prefix?: string) => string[];
211
- declare const fetchTokenCandles: (client: _liberfi_io_types.IClient, params: UseTokenCandlesQueryParams) => Promise<TokenCandle[]>;
262
+ declare const fetchTokenCandles: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenCandlesQueryParams) => Promise<TokenCandle[]>;
212
263
  declare const useTokenCandlesQuery: (params: UseTokenCandlesQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<TokenCandle[], Error, TokenCandle[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<TokenCandle[], Error>;
213
264
 
214
265
  /** Parameters for {@link useTokenHoldersQuery}. */
@@ -217,7 +268,7 @@ interface UseTokenHoldersQueryParams extends GetTokenHoldersOptions {
217
268
  address: string;
218
269
  }
219
270
  declare const tokenHoldersQueryKey: (params: UseTokenHoldersQueryParams, prefix?: string) => string[];
220
- declare const fetchTokenHolders: (client: _liberfi_io_types.IClient, params: UseTokenHoldersQueryParams) => Promise<CursorList<TokenHolder>>;
271
+ declare const fetchTokenHolders: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenHoldersQueryParams) => Promise<CursorList<TokenHolder>>;
221
272
  declare const useTokenHoldersQuery: (params: UseTokenHoldersQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<TokenHolder>, Error, CursorList<TokenHolder>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<TokenHolder>, Error>;
222
273
 
223
274
  /** Parameters for {@link useTokenMarketDataQuery}. */
@@ -226,16 +277,52 @@ interface UseTokenMarketDataQueryParams {
226
277
  address: string;
227
278
  }
228
279
  declare const tokenMarketDataQueryKey: (params: UseTokenMarketDataQueryParams, prefix?: string) => string[];
229
- declare const fetchTokenMarketData: (client: _liberfi_io_types.IClient, params: UseTokenMarketDataQueryParams) => Promise<TokenMarketData>;
280
+ declare const fetchTokenMarketData: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenMarketDataQueryParams) => Promise<TokenMarketData>;
230
281
  declare const useTokenMarketDataQuery: (params: UseTokenMarketDataQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<TokenMarketData, Error, TokenMarketData, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<TokenMarketData, Error>;
231
282
 
283
+ interface TokenMarketSnapshot {
284
+ token?: Token;
285
+ isLoading: boolean;
286
+ error: Error | null;
287
+ generation: number;
288
+ }
289
+ type TokenMarketKey = string;
290
+ type ReleaseTokenMarket = () => void;
291
+ interface TokenMarketRuntime {
292
+ retain(key: TokenMarketKey): ReleaseTokenMarket;
293
+ getSnapshot(key: TokenMarketKey): TokenMarketSnapshot;
294
+ subscribe(key: TokenMarketKey, listener: (snapshot: TokenMarketSnapshot) => void): () => void;
295
+ refresh(key: TokenMarketKey): void;
296
+ }
297
+ declare function tokenMarketKey(chain: Chain, address: string): TokenMarketKey;
298
+
299
+ /** Parameters for {@link useTokenMarket}. */
300
+ interface UseTokenMarketParams {
301
+ chain: Chain;
302
+ address: string;
303
+ }
304
+ /**
305
+ * Returns the shared {@link TokenMarketRuntime} for the current Dex client.
306
+ * Runtimes are cached in a WeakMap keyed by `subscribeClient` (falling back
307
+ * to `client`) so widgets under one provider share query/subscribe work.
308
+ */
309
+ declare function getTokenMarketRuntime(client: Pick<IClient, "getToken">, subscribeClient?: Pick<ISubscribeClient, "subscribeToken"> | null): TokenMarketRuntime;
310
+ /** Shared runtime for the nearest `DexClientProvider`. */
311
+ declare function useTokenMarketRuntime(): TokenMarketRuntime;
312
+ /**
313
+ * Retains `chain+address` on the shared token market runtime and subscribes
314
+ * to snapshot updates. Two mounts of the same key share one upstream
315
+ * `subscribeToken`.
316
+ */
317
+ declare function useTokenMarket(params: UseTokenMarketParams): TokenMarketSnapshot;
318
+
232
319
  /** Parameters for {@link useTokenQuery}. */
233
320
  interface UseTokenQueryParams {
234
321
  chain: Chain;
235
322
  address: string;
236
323
  }
237
324
  declare const tokenQueryKey: (params: UseTokenQueryParams, prefix?: string) => string[];
238
- declare const fetchToken: (client: _liberfi_io_types.IClient, params: UseTokenQueryParams) => Promise<Token>;
325
+ declare const fetchToken: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenQueryParams) => Promise<Token>;
239
326
  declare const useTokenQuery: (params: UseTokenQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token, Error, Token, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token, Error>;
240
327
 
241
328
  /** Parameters for {@link useTokenSecurityQuery}. */
@@ -244,7 +331,7 @@ interface UseTokenSecurityQueryParams {
244
331
  address: string;
245
332
  }
246
333
  declare const tokenSecurityQueryKey: (params: UseTokenSecurityQueryParams, prefix?: string) => string[];
247
- declare const fetchTokenSecurity: (client: _liberfi_io_types.IClient, params: UseTokenSecurityQueryParams) => Promise<TokenSecurity>;
334
+ declare const fetchTokenSecurity: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenSecurityQueryParams) => Promise<TokenSecurity>;
248
335
  declare const useTokenSecurityQuery: (params: UseTokenSecurityQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<TokenSecurity, Error, TokenSecurity, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<TokenSecurity, Error>;
249
336
 
250
337
  /** Parameters for {@link useTokensQuery}. */
@@ -253,7 +340,7 @@ interface UseTokensQueryParams {
253
340
  addresses: Array<string>;
254
341
  }
255
342
  declare const tokensQueryKey: (params: UseTokensQueryParams, prefix?: string) => string[];
256
- declare const fetchTokens: (client: _liberfi_io_types.IClient, params: UseTokensQueryParams) => Promise<Token[]>;
343
+ declare const fetchTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseTokensQueryParams) => Promise<Token[]>;
257
344
  declare const useTokensQuery: (params: UseTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
258
345
 
259
346
  /** Parameters for {@link useTokensByCreatorQuery}. */
@@ -265,7 +352,7 @@ interface UseTokensByCreatorQueryParams extends GetTokensByCreatorOptions {
265
352
  * Fetch tokens created by a given wallet ("Dev Tokens" tab).
266
353
  */
267
354
  declare const tokensByCreatorQueryKey: (params: UseTokensByCreatorQueryParams, prefix?: string) => string[];
268
- declare const fetchTokensByCreator: (client: _liberfi_io_types.IClient, params: UseTokensByCreatorQueryParams) => Promise<CursorList<Token>>;
355
+ declare const fetchTokensByCreator: (client: _liberfi_io_types.TokenDataCapability, params: UseTokensByCreatorQueryParams) => Promise<CursorList<Token>>;
269
356
  declare const useTokensByCreatorQuery: (params: UseTokensByCreatorQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<Token>, Error, CursorList<Token>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<Token>, Error>;
270
357
 
271
358
  /** Parameters for {@link useTokenStatsQuery}. */
@@ -274,7 +361,7 @@ interface UseTokenStatsQueryParams {
274
361
  address: string;
275
362
  }
276
363
  declare const tokenStatsQueryKey: (params: UseTokenStatsQueryParams, prefix?: string) => string[];
277
- declare const fetchTokenStats: (client: _liberfi_io_types.IClient, params: UseTokenStatsQueryParams) => Promise<TokenStats>;
364
+ declare const fetchTokenStats: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenStatsQueryParams) => Promise<TokenStats>;
278
365
  declare const useTokenStatsQuery: (params: UseTokenStatsQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<TokenStats, Error, TokenStats, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<TokenStats, Error>;
279
366
 
280
367
  /** Parameters for {@link useTokenTopTradersQuery}. */
@@ -286,7 +373,7 @@ interface UseTokenTopTradersQueryParams extends GetTokenTopTradersOptions {
286
373
  * Fetch the "Top Traders" list for a token via `/v2/token/{chain}/{address}/topTraders`.
287
374
  */
288
375
  declare const tokenTopTradersQueryKey: (params: UseTokenTopTradersQueryParams, prefix?: string) => string[];
289
- declare const fetchTokenTopTraders: (client: _liberfi_io_types.IClient, params: UseTokenTopTradersQueryParams) => Promise<CursorList<TokenTopTrader>>;
376
+ declare const fetchTokenTopTraders: (client: _liberfi_io_types.TokenDataCapability, params: UseTokenTopTradersQueryParams) => Promise<CursorList<TokenTopTrader>>;
290
377
  declare const useTokenTopTradersQuery: (params: UseTokenTopTradersQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<TokenTopTrader>, Error, CursorList<TokenTopTrader>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<TokenTopTrader>, Error>;
291
378
 
292
379
  /** Parameters for {@link useTokenTradesQuery}. */
@@ -295,7 +382,7 @@ interface UseTokenTradesQueryParams extends GetTradesOptions {
295
382
  address: string;
296
383
  }
297
384
  declare const tokenTradesQueryKey: (params: UseTokenTradesQueryParams, prefix?: string) => string[];
298
- declare const fetchTokenTrades: (client: _liberfi_io_types.IClient, params: UseTokenTradesQueryParams) => Promise<CursorList<Trade>>;
385
+ declare const fetchTokenTrades: (client: _liberfi_io_types.ActivityDataCapability, params: UseTokenTradesQueryParams) => Promise<CursorList<Trade>>;
299
386
  declare const useTokenTradesQuery: (params: UseTokenTradesQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<Trade>, Error, CursorList<Trade>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<Trade>, Error>;
300
387
 
301
388
  /** Parameters for {@link useTrendingTokensQuery}. */
@@ -304,7 +391,7 @@ interface UseTrendingTokensQueryParams extends GetTokenListOptions {
304
391
  resolution: "1m" | "5m" | "1h" | "4h" | "24h";
305
392
  }
306
393
  declare const trendingTokensQueryKey: (params: UseTrendingTokensQueryParams, prefix?: string) => string[];
307
- declare const fetchTrendingTokens: (client: _liberfi_io_types.IClient, params: UseTrendingTokensQueryParams) => Promise<Token[]>;
394
+ declare const fetchTrendingTokens: (client: _liberfi_io_types.TokenDataCapability, params: UseTrendingTokensQueryParams) => Promise<Token[]>;
308
395
  declare const useTrendingTokensQuery: (params: UseTrendingTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Token[], Error, Token[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Token[], Error>;
309
396
 
310
397
  /** Parameters for {@link useTxSuccessQuery}. */
@@ -314,7 +401,7 @@ interface UseTxSuccessQueryParams {
314
401
  timeout?: number;
315
402
  }
316
403
  declare const txSuccessQueryKey: (params: UseTxSuccessQueryParams, prefix?: string) => string[];
317
- declare const fetchTxSuccess: (client: _liberfi_io_types.IClient, params: UseTxSuccessQueryParams) => Promise<boolean>;
404
+ declare const fetchTxSuccess: (client: _liberfi_io_types.TransactionCapability, params: UseTxSuccessQueryParams) => Promise<boolean>;
318
405
  declare const useTxSuccessQuery: (params: UseTxSuccessQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<boolean, Error, boolean, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<boolean, Error>;
319
406
 
320
407
  /** Parameters for {@link useWalletLimitOrdersQuery}. */
@@ -331,7 +418,7 @@ interface UseWalletLimitOrdersQueryParams extends GetWalletLimitOrdersOptions {
331
418
  * `isNotImplementedError` to render an "Orders coming soon" empty state.
332
419
  */
333
420
  declare const walletLimitOrdersQueryKey: (params: UseWalletLimitOrdersQueryParams, prefix?: string) => string[];
334
- declare const fetchWalletLimitOrders: (client: _liberfi_io_types.IClient, params: UseWalletLimitOrdersQueryParams) => Promise<CursorList<LimitOrder>>;
421
+ declare const fetchWalletLimitOrders: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletLimitOrdersQueryParams) => Promise<CursorList<LimitOrder>>;
335
422
  declare const useWalletLimitOrdersQuery: (params: UseWalletLimitOrdersQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<LimitOrder>, Error, CursorList<LimitOrder>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<LimitOrder>, Error>;
336
423
 
337
424
  /** Parameters for {@link useWalletPnlQuery}. */
@@ -341,7 +428,7 @@ interface UseWalletPnlQueryParams {
341
428
  resolution?: WalletPnlResolution;
342
429
  }
343
430
  declare const walletPnlQueryKey: (params: UseWalletPnlQueryParams, prefix?: string) => string[];
344
- declare const fetchWalletPnl: (client: _liberfi_io_types.IClient, params: UseWalletPnlQueryParams) => Promise<WalletPnl>;
431
+ declare const fetchWalletPnl: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletPnlQueryParams) => Promise<WalletPnl>;
345
432
  declare const useWalletPnlQuery: (params: UseWalletPnlQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<WalletPnl, Error, WalletPnl, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<WalletPnl, Error>;
346
433
 
347
434
  /** Parameters for {@link useWalletPortfolioPnlsQuery}. */
@@ -350,7 +437,7 @@ interface UseWalletPortfolioPnlsQueryParams extends GetWalletPortfolioPnlsOption
350
437
  address: string;
351
438
  }
352
439
  declare const walletPortfolioPnlsQueryKey: (params: UseWalletPortfolioPnlsQueryParams, prefix?: string) => string[];
353
- declare const fetchWalletPortfolioPnls: (client: _liberfi_io_types.IClient, params: UseWalletPortfolioPnlsQueryParams) => Promise<WalletPortfolioPnls>;
440
+ declare const fetchWalletPortfolioPnls: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletPortfolioPnlsQueryParams) => Promise<WalletPortfolioPnls>;
354
441
  declare const useWalletPortfolioPnlsQuery: (params: UseWalletPortfolioPnlsQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<WalletPortfolioPnls, Error, WalletPortfolioPnls, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<WalletPortfolioPnls, Error>;
355
442
 
356
443
  /** Parameters for {@link useWalletPortfolioPnlsInfiniteQuery}. */
@@ -376,7 +463,7 @@ interface UseWalletPortfoliosQueryParams {
376
463
  limit?: number;
377
464
  }
378
465
  declare const walletPortfoliosQueryKey: (params: UseWalletPortfoliosQueryParams, prefix?: string) => string[];
379
- declare const fetchWalletPortfolios: (client: _liberfi_io_types.IClient, params: UseWalletPortfoliosQueryParams) => Promise<WalletPortfolios>;
466
+ declare const fetchWalletPortfolios: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletPortfoliosQueryParams) => Promise<WalletPortfolios>;
380
467
  declare const useWalletPortfoliosQuery: (params: UseWalletPortfoliosQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<WalletPortfolios, Error, WalletPortfolios, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<WalletPortfolios, Error>;
381
468
 
382
469
  /** Parameters for {@link useWalletPortfoliosByTokensQuery}. */
@@ -386,7 +473,7 @@ interface UseWalletPortfoliosByTokensQueryParams {
386
473
  tokenAddresses: Array<string>;
387
474
  }
388
475
  declare const walletPortfoliosByTokensQueryKey: (params: UseWalletPortfoliosByTokensQueryParams, prefix?: string) => string[];
389
- declare const fetchWalletPortfoliosByTokens: (client: _liberfi_io_types.IClient, params: UseWalletPortfoliosByTokensQueryParams) => Promise<Portfolio[]>;
476
+ declare const fetchWalletPortfoliosByTokens: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletPortfoliosByTokensQueryParams) => Promise<Portfolio[]>;
390
477
  declare const useWalletPortfoliosByTokensQuery: (params: UseWalletPortfoliosByTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<Portfolio[], Error, Portfolio[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<Portfolio[], Error>;
391
478
 
392
479
  /** Parameters for {@link useWalletPortfoliosInfiniteQuery}. */
@@ -405,7 +492,7 @@ interface UseWalletPortfolioPnlsByTokensQueryParams {
405
492
  tokenAddresses: Array<string>;
406
493
  }
407
494
  declare const walletPortfolioPnlsByTokensQueryKey: (params: UseWalletPortfolioPnlsByTokensQueryParams, prefix?: string) => string[];
408
- declare const fetchWalletPortfolioPnlsByTokens: (client: _liberfi_io_types.IClient, params: UseWalletPortfolioPnlsByTokensQueryParams) => Promise<PortfolioPnl[]>;
495
+ declare const fetchWalletPortfolioPnlsByTokens: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletPortfolioPnlsByTokensQueryParams) => Promise<PortfolioPnl[]>;
409
496
  declare const useWalletPortfolioPnlsByTokensQuery: (params: UseWalletPortfolioPnlsByTokensQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<PortfolioPnl[], Error, PortfolioPnl[], string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<PortfolioPnl[], Error>;
410
497
 
411
498
  /** Parameters for {@link useWalletTokenPositionsQuery}. */
@@ -428,7 +515,7 @@ interface UseWalletTokenPositionsQueryParams extends Omit<GetWalletPortfolioPnls
428
515
  * to the Positions view (`Bought / Sold / Remaining / PnL`).
429
516
  */
430
517
  declare const walletTokenPositionsQueryKey: (params: UseWalletTokenPositionsQueryParams, prefix?: string) => string[];
431
- declare const fetchWalletTokenPositions: (client: _liberfi_io_types.IClient, params: UseWalletTokenPositionsQueryParams) => Promise<WalletPortfolioPnls>;
518
+ declare const fetchWalletTokenPositions: (client: _liberfi_io_types.WalletDataCapability, params: UseWalletTokenPositionsQueryParams) => Promise<WalletPortfolioPnls>;
432
519
  declare const useWalletTokenPositionsQuery: (params: UseWalletTokenPositionsQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<WalletPortfolioPnls, Error, WalletPortfolioPnls, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<WalletPortfolioPnls, Error>;
433
520
 
434
521
  /** Alias for consumers that only want the rows (not the wallet-level summary). */
@@ -440,7 +527,7 @@ interface UseWalletTradesQueryParams extends GetTradesOptions {
440
527
  address: string;
441
528
  }
442
529
  declare const walletTradesQueryKey: (params: UseWalletTradesQueryParams, prefix?: string) => string[];
443
- declare const fetchWalletTrades: (client: _liberfi_io_types.IClient, params: UseWalletTradesQueryParams) => Promise<CursorList<Trade>>;
530
+ declare const fetchWalletTrades: (client: _liberfi_io_types.ActivityDataCapability, params: UseWalletTradesQueryParams) => Promise<CursorList<Trade>>;
444
531
  declare const useWalletTradesQuery: (params: UseWalletTradesQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<Trade>, Error, CursorList<Trade>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<Trade>, Error>;
445
532
 
446
533
  /** Parameters for {@link useTokenActivitiesQuery}. */
@@ -449,7 +536,7 @@ interface UseTokenActivitiesQueryParams extends GetActivitiesOptions {
449
536
  address: string;
450
537
  }
451
538
  declare const tokenActivitiesQueryKey: (params: UseTokenActivitiesQueryParams, prefix?: string) => string[];
452
- declare const fetchTokenActivities: (client: _liberfi_io_types.IClient, params: UseTokenActivitiesQueryParams) => Promise<CursorList<Activity>>;
539
+ declare const fetchTokenActivities: (client: _liberfi_io_types.ActivityDataCapability, params: UseTokenActivitiesQueryParams) => Promise<CursorList<Activity>>;
453
540
  declare const useTokenActivitiesQuery: (params: UseTokenActivitiesQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<Activity>, Error, CursorList<Activity>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<Activity>, Error>;
454
541
 
455
542
  /** Parameters for {@link useWalletActivitiesQuery}. */
@@ -458,7 +545,7 @@ interface UseWalletActivitiesQueryParams extends GetActivitiesOptions {
458
545
  address: string;
459
546
  }
460
547
  declare const walletActivitiesQueryKey: (params: UseWalletActivitiesQueryParams, prefix?: string) => string[];
461
- declare const fetchWalletActivities: (client: _liberfi_io_types.IClient, params: UseWalletActivitiesQueryParams) => Promise<CursorList<Activity>>;
548
+ declare const fetchWalletActivities: (client: _liberfi_io_types.ActivityDataCapability, params: UseWalletActivitiesQueryParams) => Promise<CursorList<Activity>>;
462
549
  declare const useWalletActivitiesQuery: (params: UseWalletActivitiesQueryParams, options?: Omit<_tanstack_react_query.UseQueryOptions<CursorList<Activity>, Error, CursorList<Activity>, string[]>, "queryKey" | "queryFn"> | undefined) => _tanstack_react_query.UseQueryResult<CursorList<Activity>, Error>;
463
550
 
464
551
  /** Parameters for {@link useTokenSubscription}. */
@@ -591,9 +678,17 @@ interface UseStockTokensSubscriptionParams {
591
678
  /** Subscribes to real-time stock token updates. */
592
679
  declare function useStockTokensSubscription(params: UseStockTokensSubscriptionParams, callback: (data: Array<TokenSubscribed>) => void, options?: SubscriptionOptions): void;
593
680
 
594
- type DexClientProviderProps = PropsWithChildren<{
681
+ type LegacyClientInput = {
595
682
  client: IClient;
596
683
  subscribeClient: ISubscribeClient;
684
+ capabilities?: DexCapabilities;
685
+ };
686
+ type CapabilityInput = {
687
+ capabilities: DexCapabilities;
688
+ client?: IClient;
689
+ subscribeClient?: ISubscribeClient;
690
+ };
691
+ type DexClientProviderProps = PropsWithChildren<(LegacyClientInput | CapabilityInput) & {
597
692
  /**
598
693
  * Prefix prepended to every TanStack Query key produced by hooks in this
599
694
  * package. Useful for avoiding collisions with other libraries.
@@ -609,6 +704,6 @@ type DexClientProviderProps = PropsWithChildren<{
609
704
  * created with `useMemo` or stored in a `useRef`) to avoid unnecessary
610
705
  * re-renders of consumers.
611
706
  */
612
- declare function DexClientProvider({ client, subscribeClient, queryKeyPrefix, children, }: DexClientProviderProps): react_jsx_runtime.JSX.Element;
707
+ declare function DexClientProvider(props: DexClientProviderProps): react_jsx_runtime.JSX.Element;
613
708
 
614
- export { DEFAULT_QUERY_KEY_PREFIX, DexClientContext, type DexClientContextValue, DexClientProvider, type DexClientProviderProps, type InfiniteQueryHookConfig, type InfiniteQueryHookReturn, type LatestBlockCacheResult, type QueryHookConfig, type QueryHookReturn, type SubscriptionOptions, type UseFinalStretchTokensQueryParams, type UseFinalStretchTokensSubscriptionParams, type UseLatestBlockQueryParams, type UseMigratedTokensQueryParams, type UseMigratedTokensSubscriptionParams, type UseNewPoolsQueryParams, type UseNewPoolsSubscriptionParams, type UseNewTokensMetadataSubscriptionParams, type UseNewTokensQueryParams, type UseNewTokensSubscriptionParams, type UseSearchTokensInfiniteQueryParams, type UseSearchTokensQueryParams, type UseSendTxMutationParams, type UseStockTokensQueryParams, type UseStockTokensSubscriptionParams, type UseSwapRouteQueryParams, type UseTokenActivitiesQueryParams, type UseTokenActivitiesSubscriptionParams, type UseTokenCandlesQueryParams, type UseTokenCandlesSubscriptionParams, type UseTokenHoldersQueryParams, type UseTokenMarketDataQueryParams, type UseTokenQueryParams, type UseTokenSecurityQueryParams, type UseTokenStatsQueryParams, type UseTokenSubscriptionParams, type UseTokenTopTradersQueryParams, type UseTokenTradesQueryParams, type UseTokenTradesSubscriptionParams, type UseTokensByCreatorQueryParams, type UseTokensQueryParams, type UseTokensSubscriptionParams, type UseTrendingTokensQueryParams, type UseTrendingTokensSubscriptionParams, type UseTxSuccessQueryParams, type UseWalletActivitiesQueryParams, type UseWalletActivitiesSubscriptionParams, type UseWalletLimitOrdersQueryParams, type UseWalletPnlQueryParams, type UseWalletPnlSubscriptionParams, type UseWalletPortfolioPnlsByTokensQueryParams, type UseWalletPortfolioPnlsInfiniteQueryParams, type UseWalletPortfolioPnlsQueryParams, type UseWalletPortfolioPnlsSubscriptionParams, type UseWalletPortfoliosByTokensQueryParams, type UseWalletPortfoliosInfiniteQueryParams, type UseWalletPortfoliosQueryParams, type UseWalletPortfoliosSubscriptionParams, type UseWalletTokenPositionsQueryParams, type UseWalletTradesQueryParams, type UseWalletTradesSubscriptionParams, type WalletTokenPosition, createInfiniteQueryHook, createQueryHook, fetchFinalStretchTokens, fetchLatestBlock, fetchMigratedTokens, fetchNewPools, fetchNewTokens, fetchPresignedUploadUrl, fetchSearchTokens, fetchStockTokens, fetchSwapRoute, fetchToken, fetchTokenActivities, fetchTokenCandles, fetchTokenHolders, fetchTokenMarketData, fetchTokenSecurity, fetchTokenStats, fetchTokenTopTraders, fetchTokenTrades, fetchTokens, fetchTokensByCreator, fetchTrendingTokens, fetchTxSuccess, fetchWalletActivities, fetchWalletLimitOrders, fetchWalletPnl, fetchWalletPortfolioPnls, fetchWalletPortfolioPnlsByTokens, fetchWalletPortfolios, fetchWalletPortfoliosByTokens, fetchWalletTokenPositions, fetchWalletTrades, finalStretchTokensQueryKey, getCachedLatestBlock, latestBlockQueryKey, migratedTokensQueryKey, newPoolsQueryKey, newTokensQueryKey, presignedUploadUrlQueryKey, searchTokensInfiniteQueryKey, searchTokensQueryKey, sendTx, stockTokensQueryKey, swapRouteQueryKey, toKeySegment, toSortedKeySegment, tokenActivitiesQueryKey, tokenCandlesQueryKey, tokenHoldersQueryKey, tokenMarketDataQueryKey, tokenQueryKey, tokenSecurityQueryKey, tokenStatsQueryKey, tokenTopTradersQueryKey, tokenTradesQueryKey, tokensByCreatorQueryKey, tokensQueryKey, trendingTokensQueryKey, txSuccessQueryKey, useCachedLatestBlock, useDexClient, useFinalStretchTokensQuery, useFinalStretchTokensSubscription, useLatestBlockCacheReader, useLatestBlockFetcher, useLatestBlockQuery, useMigratedTokensQuery, useMigratedTokensSubscription, useNewPoolsQuery, useNewPoolsSubscription, useNewTokensMetadataSubscription, useNewTokensQuery, useNewTokensSubscription, usePresignedUploadUrlQuery, useSearchTokensInfiniteQuery, useSearchTokensQuery, useSendTxMutation, useStockTokensQuery, useStockTokensSubscription, useSwapRouteQuery, useTokenActivitiesQuery, useTokenActivitiesSubscription, useTokenCandlesQuery, useTokenCandlesSubscription, useTokenHoldersQuery, useTokenMarketDataQuery, useTokenQuery, useTokenSecurityQuery, useTokenStatsQuery, useTokenSubscription, useTokenTopTradersQuery, useTokenTradesQuery, useTokenTradesSubscription, useTokensByCreatorQuery, useTokensQuery, useTokensSubscription, useTrendingTokensQuery, useTrendingTokensSubscription, useTxSuccessQuery, useWalletActivitiesQuery, useWalletActivitiesSubscription, useWalletLimitOrdersQuery, useWalletPnlQuery, useWalletPnlSubscription, useWalletPortfolioPnlsByTokensQuery, useWalletPortfolioPnlsInfiniteQuery, useWalletPortfolioPnlsQuery, useWalletPortfolioPnlsSubscription, useWalletPortfoliosByTokensQuery, useWalletPortfoliosInfiniteQuery, useWalletPortfoliosQuery, useWalletPortfoliosSubscription, useWalletTokenPositionsQuery, useWalletTradesQuery, useWalletTradesSubscription, walletActivitiesQueryKey, walletLimitOrdersQueryKey, walletPnlQueryKey, walletPortfolioPnlsByTokensQueryKey, walletPortfolioPnlsInfiniteQueryKey, walletPortfolioPnlsQueryKey, walletPortfoliosByTokensQueryKey, walletPortfoliosInfiniteQueryKey, walletPortfoliosQueryKey, walletTokenPositionsQueryKey, walletTradesQueryKey };
709
+ export { CapabilityContext, DEFAULT_QUERY_KEY_PREFIX, type DexCapabilities, type DexCapabilityKey, DexClientContext, type DexClientContextValue, DexClientProvider, type DexClientProviderProps, type InfiniteQueryHookConfig, type InfiniteQueryHookReturn, type LatestBlockCacheResult, type QueryHookConfig, type QueryHookReturn, type SubscriptionOptions, type TokenMarketRuntime, type TokenMarketSnapshot, type UseFinalStretchTokensQueryParams, type UseFinalStretchTokensSubscriptionParams, type UseLatestBlockQueryParams, type UseMigratedTokensQueryParams, type UseMigratedTokensSubscriptionParams, type UseNewPoolsQueryParams, type UseNewPoolsSubscriptionParams, type UseNewTokensMetadataSubscriptionParams, type UseNewTokensQueryParams, type UseNewTokensSubscriptionParams, type UseSearchTokensInfiniteQueryParams, type UseSearchTokensQueryParams, type UseSendTxMutationParams, type UseStockTokensQueryParams, type UseStockTokensSubscriptionParams, type UseSwapRouteQueryParams, type UseTokenActivitiesQueryParams, type UseTokenActivitiesSubscriptionParams, type UseTokenCandlesQueryParams, type UseTokenCandlesSubscriptionParams, type UseTokenHoldersQueryParams, type UseTokenMarketDataQueryParams, type UseTokenMarketParams, type UseTokenQueryParams, type UseTokenSecurityQueryParams, type UseTokenStatsQueryParams, type UseTokenSubscriptionParams, type UseTokenTopTradersQueryParams, type UseTokenTradesQueryParams, type UseTokenTradesSubscriptionParams, type UseTokensByCreatorQueryParams, type UseTokensQueryParams, type UseTokensSubscriptionParams, type UseTradeExecutionOptions, type UseTradeExecutionResult, type UseTrendingTokensQueryParams, type UseTrendingTokensSubscriptionParams, type UseTxSuccessQueryParams, type UseWalletActivitiesQueryParams, type UseWalletActivitiesSubscriptionParams, type UseWalletLimitOrdersQueryParams, type UseWalletPnlQueryParams, type UseWalletPnlSubscriptionParams, type UseWalletPortfolioPnlsByTokensQueryParams, type UseWalletPortfolioPnlsInfiniteQueryParams, type UseWalletPortfolioPnlsQueryParams, type UseWalletPortfolioPnlsSubscriptionParams, type UseWalletPortfoliosByTokensQueryParams, type UseWalletPortfoliosInfiniteQueryParams, type UseWalletPortfoliosQueryParams, type UseWalletPortfoliosSubscriptionParams, type UseWalletTokenPositionsQueryParams, type UseWalletTradesQueryParams, type UseWalletTradesSubscriptionParams, type WalletTokenPosition, createInfiniteQueryHook, createQueryHook, fetchFinalStretchTokens, fetchLatestBlock, fetchMigratedTokens, fetchNewPools, fetchNewTokens, fetchPresignedUploadUrl, fetchSearchTokens, fetchStockTokens, fetchSwapRoute, fetchToken, fetchTokenActivities, fetchTokenCandles, fetchTokenHolders, fetchTokenMarketData, fetchTokenSecurity, fetchTokenStats, fetchTokenTopTraders, fetchTokenTrades, fetchTokens, fetchTokensByCreator, fetchTrendingTokens, fetchTxSuccess, fetchWalletActivities, fetchWalletLimitOrders, fetchWalletPnl, fetchWalletPortfolioPnls, fetchWalletPortfolioPnlsByTokens, fetchWalletPortfolios, fetchWalletPortfoliosByTokens, fetchWalletTokenPositions, fetchWalletTrades, finalStretchTokensQueryKey, getCachedLatestBlock, getTokenMarketRuntime, latestBlockQueryKey, migratedTokensQueryKey, newPoolsQueryKey, newTokensQueryKey, presignedUploadUrlQueryKey, searchTokensInfiniteQueryKey, searchTokensQueryKey, sendTx, stockTokensQueryKey, swapRouteQueryKey, toKeySegment, toSortedKeySegment, tokenActivitiesQueryKey, tokenCandlesQueryKey, tokenHoldersQueryKey, tokenMarketDataQueryKey, tokenMarketKey, tokenQueryKey, tokenSecurityQueryKey, tokenStatsQueryKey, tokenTopTradersQueryKey, tokenTradesQueryKey, tokensByCreatorQueryKey, tokensQueryKey, trendingTokensQueryKey, txSuccessQueryKey, useCachedLatestBlock, useDexCapabilities, useDexCapability, useDexClient, useFinalStretchTokensQuery, useFinalStretchTokensSubscription, useLatestBlockCacheReader, useLatestBlockFetcher, useLatestBlockQuery, useMigratedTokensQuery, useMigratedTokensSubscription, useNewPoolsQuery, useNewPoolsSubscription, useNewTokensMetadataSubscription, useNewTokensQuery, useNewTokensSubscription, usePresignedUploadUrlQuery, useSearchTokensInfiniteQuery, useSearchTokensQuery, useSendTxMutation, useStockTokensQuery, useStockTokensSubscription, useSwapRouteQuery, useTokenActivitiesQuery, useTokenActivitiesSubscription, useTokenCandlesQuery, useTokenCandlesSubscription, useTokenHoldersQuery, useTokenMarket, useTokenMarketDataQuery, useTokenMarketRuntime, useTokenQuery, useTokenSecurityQuery, useTokenStatsQuery, useTokenSubscription, useTokenTopTradersQuery, useTokenTradesQuery, useTokenTradesSubscription, useTokensByCreatorQuery, useTokensQuery, useTokensSubscription, useTradeExecution, useTrendingTokensQuery, useTrendingTokensSubscription, useTxSuccessQuery, useWalletActivitiesQuery, useWalletActivitiesSubscription, useWalletLimitOrdersQuery, useWalletPnlQuery, useWalletPnlSubscription, useWalletPortfolioPnlsByTokensQuery, useWalletPortfolioPnlsInfiniteQuery, useWalletPortfolioPnlsQuery, useWalletPortfolioPnlsSubscription, useWalletPortfoliosByTokensQuery, useWalletPortfoliosInfiniteQuery, useWalletPortfoliosQuery, useWalletPortfoliosSubscription, useWalletTokenPositionsQuery, useWalletTradesQuery, useWalletTradesSubscription, walletActivitiesQueryKey, walletLimitOrdersQueryKey, walletPnlQueryKey, walletPortfolioPnlsByTokensQueryKey, walletPortfolioPnlsInfiniteQueryKey, walletPortfolioPnlsQueryKey, walletPortfoliosByTokensQueryKey, walletPortfoliosInfiniteQueryKey, walletPortfoliosQueryKey, walletTokenPositionsQueryKey, walletTradesQueryKey };