@liberfi.io/ui-predict 0.1.49 → 0.1.51
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/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/{index-B-NMsVEe.d.mts → index-D3Ek8yK4.d.mts} +187 -1
- package/dist/{index-B-NMsVEe.d.ts → index-D3Ek8yK4.d.ts} +187 -1
- package/dist/index.d.mts +278 -5
- package/dist/index.d.ts +278 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as StandardEvent, a as StandardMarket, E as EventQueryParams, O as OrderResponse,
|
|
3
|
-
export {
|
|
2
|
+
import { S as StandardEvent, a as StandardMarket, E as EventQueryParams, V as V2Event, b as V2Market, c as V2EventStatus, d as V2EventSortField, O as OrderResponse, e as OrderStatusResponse, f as SeriesResponse, C as CandlesticksResponse, g as OrderbookLevel, h as SingleTradeResponse, I as IPredictClient, i as IPredictWsClient, W as WalletPositionItem, P as PredictClientV2, j as V2ListEventsParams, k as V2Page, l as StandardEventsResponse, M as MarketQueryParams, m as StandardMarketsResponse, n as MarketsBatchRequest, o as OrderbookResponse, T as TradesQueryParams, p as MultiTradeResponse, q as TradesByMintQueryParams, r as OnchainTradesByWalletQueryParams, s as MultiOnchainTradeResponse, t as OnchainTradesByEventQueryParams, u as OnchainTradesByMarketQueryParams, v as CandlesticksQueryParams, F as ForecastPercentileHistoryQueryParams, w as ForecastPercentileHistoryResponse, x as ForecastPercentileHistoryByMintQueryParams, L as LiveDataQueryParams, y as LiveDataResponse, z as LiveDataByEventQueryParams, A as LiveDataByMintQueryParams, B as SeriesQueryParams, D as SeriesListResponse, G as TagsByCategoriesResponse, H as FiltersBySportsResponse, J as SearchQueryParams, K as SearchResponse, N as PositionsByWalletQueryParams, Q as WalletPositionsResponse, R as OutcomeMintsQueryParams, U as OutcomeMintsResponse, X as FilterOutcomeMintsRequest, Y as FilterOutcomeMintsResponse, Z as QuoteQueryParams, _ as QuoteResponse, $ as SwapRequestBody, a0 as SwapResponse, a1 as SwapInstructionsResponse, a2 as OrderQueryParams, a3 as OrderStatusQueryParams, a4 as IntentQuoteQueryParams, a5 as IntentQuoteResponse, a6 as IntentSwapRequestBody, a7 as IntentSwapResponse, a8 as PredictionMarketInitQueryParams, a9 as PredictionMarketInitResponse, aa as TokenListResponse, ab as TokenListWithDecimalsResponse, ac as VenueListResponse, ad as WsConnectionStatus, ae as WsPriceUpdate, af as WsTradeUpdate, ag as WsOrderbookUpdate } from './index-D3Ek8yK4.js';
|
|
3
|
+
export { aD as AccountMetaResponse, aQ as BasePredictClient, aF as BlockhashWithMetadata, aw as CandlestickDataPoint, av as CandlestickOHLC, aB as ComputeBudgetInfo, aN as CreateFeeAccountParams, aM as DestinationTokenAccountParam, aT as DflowPredictClient, aU as DflowPredictWsClient, ap as ExecutionMode, ax as ForecastPercentileDataPoint, aE as InstructionResponse, aI as IntentExpiry, ar as MarketAccountInfo, ai as MarketStatus, as as OnchainTrade, at as OnchainTradeSortBy, au as OnchainTradesBaseQueryParams, aG as OrderFill, aH as OrderRevert, al as OrderStatus, aK as OrderbookQueryParams, aA as PlatformFee, am as PlatformFeeMode, aO as PositiveSlippageParams, aT as PredictClient, aU as PredictWsClient, aL as PrioritizationFeeLamports, aC as PrioritizationType, ao as PriorityLevel, ah as ProviderType, az as RoutePlanLeg, ay as SeriesSettlementSource, aq as SettlementSource, an as SlippageTolerance, aj as SortField, ak as SortOrder, aJ as TokenWithDecimals, aY as V2MarketResult, aZ as V2MarketStatus, a_ as V2Outcome, a$ as V2ProviderMeta, b0 as V2ProviderSource, b1 as V2SettlementSource, b2 as V2Tag, aW as WsClientConfig, aP as WsSubscribeOptions, aR as buildQuery, aV as createDflowPredictWsClient, aX as createPredictClientV2, aV as createPredictWsClient, aS as toRecord } from './index-D3Ek8yK4.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -13,7 +13,7 @@ declare global {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
declare const _default: "0.1.
|
|
16
|
+
declare const _default: "0.1.51";
|
|
17
17
|
|
|
18
18
|
interface EventsPageProps {
|
|
19
19
|
/** Callback when an event is selected */
|
|
@@ -123,6 +123,157 @@ type EventItemUIProps = {
|
|
|
123
123
|
};
|
|
124
124
|
declare function EventItemUI({ event, onSelect, onSelectOutcome, }: EventItemUIProps): react_jsx_runtime.JSX.Element;
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* A single category entry in the v2 navigation model.
|
|
128
|
+
*
|
|
129
|
+
* Slug logic: slug === label (verbatim), matching mapTag() in the prediction
|
|
130
|
+
* server's DFlow strategy. Pass the slug directly to DFlow API filters.
|
|
131
|
+
*/
|
|
132
|
+
interface CategoryItemV2 {
|
|
133
|
+
/** Category slug — equals the label; use directly as DFlow `category` filter */
|
|
134
|
+
slug: string;
|
|
135
|
+
/** Display label */
|
|
136
|
+
label: string;
|
|
137
|
+
/** Tag entries for this category (empty array when the category has no sub-tags) */
|
|
138
|
+
tags: TagItemV2[];
|
|
139
|
+
}
|
|
140
|
+
/** A single tag entry in the v2 navigation model */
|
|
141
|
+
interface TagItemV2 {
|
|
142
|
+
/** Tag slug — equals the label; use directly as DFlow `tags` filter */
|
|
143
|
+
slug: string;
|
|
144
|
+
/** Display label */
|
|
145
|
+
label: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Sorted category list derived from the static DFlow API snapshot.
|
|
149
|
+
* Memoised at module level — computed once, never re-created.
|
|
150
|
+
*/
|
|
151
|
+
declare const CATEGORIES_V2: CategoryItemV2[];
|
|
152
|
+
/**
|
|
153
|
+
* Selection emitted by CategoriesWidgetV2.
|
|
154
|
+
*
|
|
155
|
+
* - `categorySlug = null, tagSlug = null` → "Trending" (no filter)
|
|
156
|
+
* - `categorySlug = "Politics", tagSlug = null` → category selected, all its tags
|
|
157
|
+
* - `categorySlug = "Politics", tagSlug = "Trump"` → specific tag selected
|
|
158
|
+
*/
|
|
159
|
+
interface TagSlugSelection {
|
|
160
|
+
/** Selected category slug (null = Trending / no filter) */
|
|
161
|
+
categorySlug: string | null;
|
|
162
|
+
/** Selected tag slug within the category (null = all tags in the category) */
|
|
163
|
+
tagSlug: string | null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface EventsPageV2Props {
|
|
167
|
+
/** Callback when an event card is selected */
|
|
168
|
+
onSelect?: (event: V2Event) => void;
|
|
169
|
+
/** Callback when an outcome button (yes / no) is pressed */
|
|
170
|
+
onSelectOutcome?: (event: V2Event, market: V2Market, side: "yes" | "no") => void;
|
|
171
|
+
}
|
|
172
|
+
declare function EventsPageV2({ onSelect, onSelectOutcome }: EventsPageV2Props): react_jsx_runtime.JSX.Element;
|
|
173
|
+
|
|
174
|
+
interface EventsWidgetV2Props {
|
|
175
|
+
/**
|
|
176
|
+
* Category / tag selection from CategoriesWidgetV2.
|
|
177
|
+
* Passed through directly to useEventsV2.
|
|
178
|
+
*/
|
|
179
|
+
tagSlugSelection?: TagSlugSelection | null;
|
|
180
|
+
/** Page size (default: DEFAULT_PAGE_SIZE) */
|
|
181
|
+
limit?: number;
|
|
182
|
+
/** Event lifecycle status filter (default: "open") */
|
|
183
|
+
status?: V2EventStatus;
|
|
184
|
+
/** Sort field */
|
|
185
|
+
sort_by?: V2EventSortField;
|
|
186
|
+
/** Ascending sort order (default: false → descending) */
|
|
187
|
+
sort_asc?: boolean;
|
|
188
|
+
/** Include nested markets in the response (default: true) */
|
|
189
|
+
with_markets?: boolean;
|
|
190
|
+
/** Callback when an event card is selected */
|
|
191
|
+
onSelect?: (event: V2Event) => void;
|
|
192
|
+
/** Callback when an outcome button (yes/no) is pressed */
|
|
193
|
+
onSelectOutcome?: (event: V2Event, market: V2Market, side: "yes" | "no") => void;
|
|
194
|
+
}
|
|
195
|
+
declare function EventsWidgetV2({ tagSlugSelection, limit, status, sort_by, sort_asc, with_markets, onSelect, onSelectOutcome, }: EventsWidgetV2Props): react_jsx_runtime.JSX.Element;
|
|
196
|
+
|
|
197
|
+
/** Parameters for useEventsV2 */
|
|
198
|
+
interface UseEventsV2Params {
|
|
199
|
+
/**
|
|
200
|
+
* Category / tag selection from CategoriesWidgetV2.
|
|
201
|
+
*
|
|
202
|
+
* Mapped to `V2ListEventsParams.tag_slug`:
|
|
203
|
+
* - tagSlug is set → use tagSlug
|
|
204
|
+
* - only categorySlug is set → use categorySlug
|
|
205
|
+
* - both null → no filter (Trending)
|
|
206
|
+
*/
|
|
207
|
+
tagSlugSelection?: TagSlugSelection | null;
|
|
208
|
+
/** Page size (default: DEFAULT_PAGE_SIZE) */
|
|
209
|
+
limit?: number;
|
|
210
|
+
/** Event lifecycle status filter (default: "open") */
|
|
211
|
+
status?: V2EventStatus;
|
|
212
|
+
/** Sort field */
|
|
213
|
+
sort_by?: V2EventSortField;
|
|
214
|
+
/** Ascending sort (default: false → descending) */
|
|
215
|
+
sort_asc?: boolean;
|
|
216
|
+
/** Include nested markets (default: true) */
|
|
217
|
+
with_markets?: boolean;
|
|
218
|
+
}
|
|
219
|
+
/** Return value of useEventsV2 — mirrors the UseEventsResult interface from v1 */
|
|
220
|
+
interface UseEventsV2Result {
|
|
221
|
+
/** All accumulated V2 events from all loaded pages */
|
|
222
|
+
data: V2Event[];
|
|
223
|
+
/** True only on initial load (no cache yet) */
|
|
224
|
+
isLoading: boolean;
|
|
225
|
+
/** True whenever a request is in-flight (param change / refetch), excludes fetchMore */
|
|
226
|
+
isFetching: boolean;
|
|
227
|
+
/** True while loading additional pages via fetchMore */
|
|
228
|
+
isFetchingMore: boolean;
|
|
229
|
+
/** True when any query errored */
|
|
230
|
+
isError: boolean;
|
|
231
|
+
/** Error instance, or null */
|
|
232
|
+
error: Error | null;
|
|
233
|
+
/** True when more pages are available */
|
|
234
|
+
hasMore: boolean;
|
|
235
|
+
/** Load the next page */
|
|
236
|
+
fetchMore: () => void;
|
|
237
|
+
/** Refetch all pages from the first */
|
|
238
|
+
refetch: () => void;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* V2 events list hook with cursor-based infinite scroll.
|
|
242
|
+
*
|
|
243
|
+
* Uses the prediction-server v2 client (PredictClientV2) directly, avoiding
|
|
244
|
+
* the legacy DFlow series-lookup path that the v1 `useEvents` hook requires.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```tsx
|
|
248
|
+
* const { data, isLoading, hasMore, fetchMore } = useEventsV2({
|
|
249
|
+
* tagSlugSelection: { categorySlug: "Crypto", tagSlug: "BTC" },
|
|
250
|
+
* limit: 20,
|
|
251
|
+
* });
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
declare function useEventsV2(params?: UseEventsV2Params): UseEventsV2Result;
|
|
255
|
+
|
|
256
|
+
type EventsV2UIProps = {
|
|
257
|
+
/** V2 events to render */
|
|
258
|
+
events: V2Event[];
|
|
259
|
+
/** Whether more data is available */
|
|
260
|
+
hasMore?: boolean;
|
|
261
|
+
/** Callback to request the next page */
|
|
262
|
+
onFetchMore?: () => void;
|
|
263
|
+
/** Callback when a card is selected */
|
|
264
|
+
onSelect?: (event: V2Event) => void;
|
|
265
|
+
/** Callback when an outcome button (yes/no) is pressed */
|
|
266
|
+
onSelectOutcome?: (event: V2Event, market: V2Market, side: "yes" | "no") => void;
|
|
267
|
+
};
|
|
268
|
+
declare function EventsV2UI({ events, hasMore, onFetchMore, onSelect, onSelectOutcome, }: EventsV2UIProps): react_jsx_runtime.JSX.Element;
|
|
269
|
+
|
|
270
|
+
type EventItemV2UIProps = {
|
|
271
|
+
event: V2Event;
|
|
272
|
+
onSelect?: (event: V2Event) => void;
|
|
273
|
+
onSelectOutcome?: (event: V2Event, market: V2Market, side: "yes" | "no") => void;
|
|
274
|
+
};
|
|
275
|
+
declare function EventItemV2UI({ event, onSelect, onSelectOutcome, }: EventItemV2UIProps): react_jsx_runtime.JSX.Element;
|
|
276
|
+
|
|
126
277
|
/** Default page size for list queries */
|
|
127
278
|
declare const DEFAULT_PAGE_SIZE = 48;
|
|
128
279
|
/** Maximum number of markets to display in price history chart */
|
|
@@ -239,12 +390,14 @@ interface UseTradeFormResult {
|
|
|
239
390
|
isBalanceLoading: boolean;
|
|
240
391
|
/** Whether order/quote is being fetched */
|
|
241
392
|
isQuoteLoading: boolean;
|
|
242
|
-
/** Whether a transaction is being signed/sent */
|
|
393
|
+
/** Whether a transaction is being signed/sent or order is pending */
|
|
243
394
|
isSubmitting: boolean;
|
|
244
395
|
/** Order/quote fetch error (if any) */
|
|
245
396
|
quoteError: Error | null;
|
|
246
397
|
/** Transaction hash after successful send */
|
|
247
398
|
txHash: string | null;
|
|
399
|
+
/** Order status polling result (null before submit or after reset) */
|
|
400
|
+
orderStatus: OrderStatusResponse | null;
|
|
248
401
|
/** Form validation result */
|
|
249
402
|
validation: TradeFormValidation;
|
|
250
403
|
/** Set outcome */
|
|
@@ -723,6 +876,21 @@ interface CategoriesWidgetProps {
|
|
|
723
876
|
}
|
|
724
877
|
declare function CategoriesWidget({ onSelect, className, }: CategoriesWidgetProps): react_jsx_runtime.JSX.Element;
|
|
725
878
|
|
|
879
|
+
interface CategoriesWidgetV2Props {
|
|
880
|
+
/**
|
|
881
|
+
* Callback fired when the category / tag selection changes.
|
|
882
|
+
*
|
|
883
|
+
* Slug values follow the DFlow `mapTag()` convention (slug === label):
|
|
884
|
+
* - `{ categorySlug: null, tagSlug: null }` → "Trending" (no filter)
|
|
885
|
+
* - `{ categorySlug: "Crypto", tagSlug: null }` → category selected
|
|
886
|
+
* - `{ categorySlug: "Crypto", tagSlug: "BTC" }` → specific tag selected
|
|
887
|
+
*/
|
|
888
|
+
onSelect?: (selection: TagSlugSelection) => void;
|
|
889
|
+
/** Optional class name applied to the root element */
|
|
890
|
+
className?: string;
|
|
891
|
+
}
|
|
892
|
+
declare function CategoriesWidgetV2({ onSelect, className, }: CategoriesWidgetV2Props): react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
726
894
|
interface PredictContextValue {
|
|
727
895
|
/** The predict API client instance */
|
|
728
896
|
client: IPredictClient;
|
|
@@ -745,6 +913,21 @@ interface UserPredictContextValue {
|
|
|
745
913
|
}
|
|
746
914
|
declare const UserPredictContext: react.Context<UserPredictContextValue | null>;
|
|
747
915
|
|
|
916
|
+
interface PredictV2ContextValue {
|
|
917
|
+
/** The prediction-server v2 HTTP client instance. */
|
|
918
|
+
client: PredictClientV2;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Context that carries the v2 prediction client (prediction-server backend).
|
|
922
|
+
*
|
|
923
|
+
* Intentionally separate from `PredictContext` so that the legacy DFlow client
|
|
924
|
+
* and the new prediction-server client can coexist in the same application
|
|
925
|
+
* during an incremental migration.
|
|
926
|
+
*
|
|
927
|
+
* Consumers must be wrapped in `PredictV2Provider`.
|
|
928
|
+
*/
|
|
929
|
+
declare const PredictV2Context: react.Context<PredictV2ContextValue | null>;
|
|
930
|
+
|
|
748
931
|
type PredictProviderProps = PropsWithChildren<{
|
|
749
932
|
/** The predict API client instance */
|
|
750
933
|
client: IPredictClient;
|
|
@@ -763,6 +946,96 @@ type UserPredictProviderProps = PropsWithChildren<{
|
|
|
763
946
|
}>;
|
|
764
947
|
declare function UserPredictProvider({ walletAddress, pollingInterval, enabled, children, }: UserPredictProviderProps): react_jsx_runtime.JSX.Element;
|
|
765
948
|
|
|
949
|
+
type PredictV2ProviderProps = PropsWithChildren<{
|
|
950
|
+
/**
|
|
951
|
+
* A `PredictClientV2` instance pointed at the prediction-server endpoint.
|
|
952
|
+
*
|
|
953
|
+
* @example
|
|
954
|
+
* ```tsx
|
|
955
|
+
* import { createPredictClientV2 } from "@liberfi.io/ui-predict";
|
|
956
|
+
*
|
|
957
|
+
* const client = createPredictClientV2("https://api.example.com");
|
|
958
|
+
*
|
|
959
|
+
* <PredictV2Provider client={client}>
|
|
960
|
+
* <App />
|
|
961
|
+
* </PredictV2Provider>
|
|
962
|
+
* ```
|
|
963
|
+
*/
|
|
964
|
+
client: PredictClientV2;
|
|
965
|
+
}>;
|
|
966
|
+
/**
|
|
967
|
+
* Provides the v2 prediction client via React context.
|
|
968
|
+
*
|
|
969
|
+
* Place this provider at the application root (or any subtree boundary)
|
|
970
|
+
* where v2 prediction hooks are used. It is independent of `PredictProvider`,
|
|
971
|
+
* allowing both to coexist during an incremental migration.
|
|
972
|
+
*/
|
|
973
|
+
declare function PredictV2Provider({ client, children, }: PredictV2ProviderProps): react_jsx_runtime.JSX.Element;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Returns the v2 prediction context value.
|
|
977
|
+
*
|
|
978
|
+
* Must be called inside a component tree wrapped by `PredictV2Provider`.
|
|
979
|
+
*
|
|
980
|
+
* @throws When used outside of `PredictV2Provider`.
|
|
981
|
+
*/
|
|
982
|
+
declare function usePredictV2Context(): PredictV2ContextValue;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Convenience hook that returns the `PredictClientV2` instance from context.
|
|
986
|
+
*
|
|
987
|
+
* Must be called inside a component tree wrapped by `PredictV2Provider`.
|
|
988
|
+
*/
|
|
989
|
+
declare function usePredictV2Client(): PredictClientV2;
|
|
990
|
+
|
|
991
|
+
/** Stable TanStack Query key for the v2 events list. */
|
|
992
|
+
declare function eventsV2QueryKey(params?: V2ListEventsParams): unknown[];
|
|
993
|
+
/**
|
|
994
|
+
* Fetch function that can be used outside of React (e.g. in loaders or tests).
|
|
995
|
+
*
|
|
996
|
+
* @param client - A `PredictClientV2` instance.
|
|
997
|
+
* @param params - Optional filter / sort / pagination parameters.
|
|
998
|
+
*/
|
|
999
|
+
declare function fetchEventsV2(client: PredictClientV2, params?: V2ListEventsParams): Promise<V2Page<V2Event>>;
|
|
1000
|
+
/**
|
|
1001
|
+
* React Query hook for `GET /api/v1/events` via the prediction-server v2 client.
|
|
1002
|
+
*
|
|
1003
|
+
* @param params - Optional filter / sort / pagination parameters.
|
|
1004
|
+
* @param queryOptions - Additional TanStack Query options (e.g. `enabled`, `staleTime`).
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* ```tsx
|
|
1008
|
+
* const { data, isLoading } = useEventsV2Query({ status: "open", limit: 20 });
|
|
1009
|
+
* ```
|
|
1010
|
+
*/
|
|
1011
|
+
declare function useEventsV2Query(params?: V2ListEventsParams, queryOptions?: Omit<UseQueryOptions<V2Page<V2Event>, Error, V2Page<V2Event>, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<V2Page<V2Event>, Error>;
|
|
1012
|
+
|
|
1013
|
+
/** Stable TanStack Query key for a single v2 event. */
|
|
1014
|
+
declare function eventV2QueryKey(slug: string): unknown[];
|
|
1015
|
+
/**
|
|
1016
|
+
* Fetch function that can be used outside of React (e.g. in loaders or tests).
|
|
1017
|
+
*
|
|
1018
|
+
* @param client - A `PredictClientV2` instance.
|
|
1019
|
+
* @param slug - Canonical event slug.
|
|
1020
|
+
*/
|
|
1021
|
+
declare function fetchEventV2(client: PredictClientV2, slug: string): Promise<V2Event>;
|
|
1022
|
+
interface UseEventV2QueryParams {
|
|
1023
|
+
/** Canonical event slug (e.g. "will-trump-win-2024" or "KXBTCD-25FEB-T68000"). */
|
|
1024
|
+
slug: string;
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* React Query hook for `GET /api/v1/events/:slug` via the prediction-server v2 client.
|
|
1028
|
+
*
|
|
1029
|
+
* @param params - Object containing the event `slug`.
|
|
1030
|
+
* @param queryOptions - Additional TanStack Query options (e.g. `enabled`, `staleTime`).
|
|
1031
|
+
*
|
|
1032
|
+
* @example
|
|
1033
|
+
* ```tsx
|
|
1034
|
+
* const { data, isLoading } = useEventV2Query({ slug: "will-trump-win-2024" });
|
|
1035
|
+
* ```
|
|
1036
|
+
*/
|
|
1037
|
+
declare function useEventV2Query(params: UseEventV2QueryParams, queryOptions?: Omit<UseQueryOptions<V2Event, Error, V2Event, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<V2Event, Error>;
|
|
1038
|
+
|
|
766
1039
|
declare function usePredictContext(): PredictContextValue;
|
|
767
1040
|
|
|
768
1041
|
declare function usePredictClient(): IPredictClient;
|
|
@@ -1102,4 +1375,4 @@ interface UseOrderbookSubscriptionResult {
|
|
|
1102
1375
|
*/
|
|
1103
1376
|
declare function useOrderbookSubscription({ client, all, tickers, enabled, onUpdate, }: UseOrderbookSubscriptionParams): UseOrderbookSubscriptionResult;
|
|
1104
1377
|
|
|
1105
|
-
export { CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CandlesticksQueryParams, CandlesticksResponse, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategorySelection, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type EventCategory, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItemSkeleton, type EventItemSkeletonProps, EventItemUI, type EventItemUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventQueryParams, EventsPage, type EventsPageProps, EventsSkeleton, type EventsSkeletonProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, FilterOutcomeMintsRequest, FilterOutcomeMintsResponse, FiltersBySportsResponse, ForecastPercentileHistoryByMintQueryParams, ForecastPercentileHistoryQueryParams, ForecastPercentileHistoryResponse, IPredictClient, IPredictWsClient, IntentQuoteQueryParams, IntentQuoteResponse, IntentSwapRequestBody, IntentSwapResponse, LiveDataByEventQueryParams, LiveDataByMintQueryParams, LiveDataQueryParams, LiveDataResponse, MAX_PRICE_HISTORY_MARKETS, type MarketPositionsResult, MarketQueryParams, MarketsBatchRequest, MultiOnchainTradeResponse, MultiTradeResponse, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, OnchainTradesByEventQueryParams, OnchainTradesByMarketQueryParams, OnchainTradesByWalletQueryParams, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBookRow, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, OrderQueryParams, OrderResponse, OrderStatusQueryParams, OrderStatusResponse, type OrderbookData, OrderbookLevel, OrderbookResponse, OutcomeMintsQueryParams, OutcomeMintsResponse, PRICE_HISTORY_SAMPLE_INTERVAL, type Position, PositionsByWalletQueryParams, type PositionsSummary, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, PredictContext, type PredictContextValue, PredictProvider, type PredictProviderProps, PredictionMarketInitQueryParams, PredictionMarketInitResponse, type PriceData, PriceHistoryInterval, type PriceHistoryIntervalType, QuoteQueryParams, QuoteResponse, SearchQueryParams, SearchResponse, SeriesListResponse, SeriesQueryParams, SeriesResponse, SingleTradeResponse, StandardEvent, StandardEventsResponse, StandardMarket, StandardMarketsResponse, SwapInstructionsResponse, SwapRequestBody, SwapResponse, TagsByCategoriesResponse, TokenListResponse, TokenListWithDecimalsResponse, type TradeData, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeOutcome, type TradeSide, TradesByMintQueryParams, TradesQueryParams, type UseEventByIdQueryParams, type UseEventCandlesticksParams, type UseEventDetailParams, type UseEventsCategoriesResult, type UseEventsParams, type UseEventsResult, type UseMarketByIdQueryParams, type UseMarketCandlesticksByMintParams, type UseMarketCandlesticksParams, type UseOpenOrdersParams, type UseOpenOrdersResult, type UseOrderBookParams, type UseOrderBookResult, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePositionsResult, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseTradeFormParams, type UseTradeFormResult, type UseTradeHistoryParams, type UseTradeHistoryResult, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWsClientResult, type UseWsConnectionParams, type UseWsConnectionResult, UserPredictContext, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, VenueListResponse, WalletPositionItem, WalletPositionsResponse, WsConnectionStatus, WsOrderbookUpdate, WsPriceUpdate, WsTradeUpdate, createSwap, createSwapInstructions, eventByIdQueryKey, eventCandlesticksQueryKey, eventsInfiniteQueryKey, eventsQueryKey, fetchEventById, fetchEventCandlesticks, fetchEvents, fetchFiltersBySports, fetchForecastPercentileHistory, fetchForecastPercentileHistoryByMint, fetchIntentQuote, fetchLiveData, fetchLiveDataByEvent, fetchLiveDataByMint, fetchMarketById, fetchMarketByMint, fetchMarketCandlesticks, fetchMarketCandlesticksByMint, fetchMarkets, fetchMarketsBatch, fetchOnchainTradesByEvent, fetchOnchainTradesByMarket, fetchOnchainTradesByWallet, fetchOrder, fetchOrderBook, fetchOrderBookByMint, fetchOrderStatus, fetchOutcomeMints, fetchPositionsByWallet, fetchQuote, fetchSearch, fetchSeries, fetchSeriesByTicker, fetchTagsByCategories, fetchTokens, fetchTokensWithDecimals, fetchTrades, fetchTradesByMint, fetchVenues, filterOutcomeMints, filtersBySportsQueryKey, forecastPercentileHistoryByMintQueryKey, forecastPercentileHistoryQueryKey, initPredictionMarket, intentQuoteQueryKey, liveDataByEventQueryKey, liveDataByMintQueryKey, liveDataQueryKey, marketByIdQueryKey, marketByMintQueryKey, marketCandlesticksByMintQueryKey, marketCandlesticksQueryKey, marketsBatchQueryKey, marketsQueryKey, onchainTradesByEventInfiniteQueryKey, onchainTradesByEventQueryKey, onchainTradesByMarketInfiniteQueryKey, onchainTradesByMarketQueryKey, onchainTradesByWalletInfiniteQueryKey, onchainTradesByWalletQueryKey, orderBookByMintQueryKey, orderBookQueryKey, orderQueryKey, orderStatusQueryKey, outcomeMintsQueryKey, positionsByWalletQueryKey, quoteQueryKey, searchQueryKey, seriesByTickerQueryKey, seriesQueryKey, submitIntentSwap, tagsByCategoriesQueryKey, tokensQueryKey, tokensWithDecimalsQueryKey, tradesByMintQueryKey, tradesQueryKey, useCategoriesQuery, useCreateSwapInstructionsMutation, useCreateSwapMutation, useEventByIdQuery, useEventCandlesticksQuery, useEventDetail, useEvents, useEventsCategories, useEventsInfiniteQuery, useEventsQuery, useFilterOutcomeMintsMutation, useFiltersBySportsQuery, useForecastPercentileHistoryByMintQuery, useForecastPercentileHistoryQuery, useInitPredictionMarketMutation, useIntentQuoteQuery, useLiveDataByEventQuery, useLiveDataByMintQuery, useLiveDataQuery, useMarketByIdQuery, useMarketByMintQuery, useMarketCandlesticksByMintQuery, useMarketCandlesticksQuery, useMarketPositions, useMarketsBatchQuery, useMarketsQuery, useOnchainTradesByEventInfiniteQuery, useOnchainTradesByEventQuery, useOnchainTradesByMarketInfiniteQuery, useOnchainTradesByMarketQuery, useOnchainTradesByWalletInfiniteQuery, useOnchainTradesByWalletQuery, useOpenOrders, useOrderBook, useOrderBookByMintQuery, useOrderBookQuery, useOrderQuery, useOrderStatusQuery, useOrderbookSubscription, useOutcomeMintsQuery, usePositions, usePositionsByWalletQuery, usePredictClient, usePredictContext, usePriceHistoryQuery, usePricesSubscription, useQuoteQuery, useSearchQuery, useSeriesByTickerQuery, useSeriesQuery, useSubmitIntentSwapMutation, useTagsByCategoriesQuery, useTokensQuery, useTokensWithDecimalsQuery, useTradeForm, useTradeHistory, useTradesByMintQuery, useTradesQuery, useTradesSubscription, useUserPredictContext, useVenuesQuery, useWsClient, useWsConnection, venuesQueryKey, _default as version };
|
|
1378
|
+
export { CATEGORIES_V2, CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CandlesticksQueryParams, CandlesticksResponse, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, CategoriesWidgetV2, type CategoriesWidgetV2Props, type CategoryItemV2, type CategorySelection, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type EventCategory, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItemSkeleton, type EventItemSkeletonProps, EventItemUI, type EventItemUIProps, EventItemV2UI, type EventItemV2UIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventQueryParams, EventsPage, type EventsPageProps, EventsPageV2, type EventsPageV2Props, EventsSkeleton, type EventsSkeletonProps, EventsUI, type EventsUIProps, EventsV2UI, type EventsV2UIProps, EventsWidget, type EventsWidgetProps, EventsWidgetV2, type EventsWidgetV2Props, FilterOutcomeMintsRequest, FilterOutcomeMintsResponse, FiltersBySportsResponse, ForecastPercentileHistoryByMintQueryParams, ForecastPercentileHistoryQueryParams, ForecastPercentileHistoryResponse, IPredictClient, IPredictWsClient, IntentQuoteQueryParams, IntentQuoteResponse, IntentSwapRequestBody, IntentSwapResponse, LiveDataByEventQueryParams, LiveDataByMintQueryParams, LiveDataQueryParams, LiveDataResponse, MAX_PRICE_HISTORY_MARKETS, type MarketPositionsResult, MarketQueryParams, MarketsBatchRequest, MultiOnchainTradeResponse, MultiTradeResponse, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, OnchainTradesByEventQueryParams, OnchainTradesByMarketQueryParams, OnchainTradesByWalletQueryParams, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBookRow, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, OrderQueryParams, OrderResponse, OrderStatusQueryParams, OrderStatusResponse, type OrderbookData, OrderbookLevel, OrderbookResponse, OutcomeMintsQueryParams, OutcomeMintsResponse, PRICE_HISTORY_SAMPLE_INTERVAL, type Position, PositionsByWalletQueryParams, type PositionsSummary, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, PredictClientV2, PredictContext, type PredictContextValue, PredictProvider, type PredictProviderProps, PredictV2Context, type PredictV2ContextValue, PredictV2Provider, type PredictV2ProviderProps, PredictionMarketInitQueryParams, PredictionMarketInitResponse, type PriceData, PriceHistoryInterval, type PriceHistoryIntervalType, QuoteQueryParams, QuoteResponse, SearchQueryParams, SearchResponse, SeriesListResponse, SeriesQueryParams, SeriesResponse, SingleTradeResponse, StandardEvent, StandardEventsResponse, StandardMarket, StandardMarketsResponse, SwapInstructionsResponse, SwapRequestBody, SwapResponse, type TagItemV2, type TagSlugSelection, TagsByCategoriesResponse, TokenListResponse, TokenListWithDecimalsResponse, type TradeData, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeOutcome, type TradeSide, TradesByMintQueryParams, TradesQueryParams, type UseEventByIdQueryParams, type UseEventCandlesticksParams, type UseEventDetailParams, type UseEventV2QueryParams, type UseEventsCategoriesResult, type UseEventsParams, type UseEventsResult, type UseEventsV2Params, type UseEventsV2Result, type UseMarketByIdQueryParams, type UseMarketCandlesticksByMintParams, type UseMarketCandlesticksParams, type UseOpenOrdersParams, type UseOpenOrdersResult, type UseOrderBookParams, type UseOrderBookResult, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePositionsResult, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseTradeFormParams, type UseTradeFormResult, type UseTradeHistoryParams, type UseTradeHistoryResult, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWsClientResult, type UseWsConnectionParams, type UseWsConnectionResult, UserPredictContext, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, V2Event, V2EventSortField, V2EventStatus, V2ListEventsParams, V2Market, V2Page, VenueListResponse, WalletPositionItem, WalletPositionsResponse, WsConnectionStatus, WsOrderbookUpdate, WsPriceUpdate, WsTradeUpdate, createSwap, createSwapInstructions, eventByIdQueryKey, eventCandlesticksQueryKey, eventV2QueryKey, eventsInfiniteQueryKey, eventsQueryKey, eventsV2QueryKey, fetchEventById, fetchEventCandlesticks, fetchEventV2, fetchEvents, fetchEventsV2, fetchFiltersBySports, fetchForecastPercentileHistory, fetchForecastPercentileHistoryByMint, fetchIntentQuote, fetchLiveData, fetchLiveDataByEvent, fetchLiveDataByMint, fetchMarketById, fetchMarketByMint, fetchMarketCandlesticks, fetchMarketCandlesticksByMint, fetchMarkets, fetchMarketsBatch, fetchOnchainTradesByEvent, fetchOnchainTradesByMarket, fetchOnchainTradesByWallet, fetchOrder, fetchOrderBook, fetchOrderBookByMint, fetchOrderStatus, fetchOutcomeMints, fetchPositionsByWallet, fetchQuote, fetchSearch, fetchSeries, fetchSeriesByTicker, fetchTagsByCategories, fetchTokens, fetchTokensWithDecimals, fetchTrades, fetchTradesByMint, fetchVenues, filterOutcomeMints, filtersBySportsQueryKey, forecastPercentileHistoryByMintQueryKey, forecastPercentileHistoryQueryKey, initPredictionMarket, intentQuoteQueryKey, liveDataByEventQueryKey, liveDataByMintQueryKey, liveDataQueryKey, marketByIdQueryKey, marketByMintQueryKey, marketCandlesticksByMintQueryKey, marketCandlesticksQueryKey, marketsBatchQueryKey, marketsQueryKey, onchainTradesByEventInfiniteQueryKey, onchainTradesByEventQueryKey, onchainTradesByMarketInfiniteQueryKey, onchainTradesByMarketQueryKey, onchainTradesByWalletInfiniteQueryKey, onchainTradesByWalletQueryKey, orderBookByMintQueryKey, orderBookQueryKey, orderQueryKey, orderStatusQueryKey, outcomeMintsQueryKey, positionsByWalletQueryKey, quoteQueryKey, searchQueryKey, seriesByTickerQueryKey, seriesQueryKey, submitIntentSwap, tagsByCategoriesQueryKey, tokensQueryKey, tokensWithDecimalsQueryKey, tradesByMintQueryKey, tradesQueryKey, useCategoriesQuery, useCreateSwapInstructionsMutation, useCreateSwapMutation, useEventByIdQuery, useEventCandlesticksQuery, useEventDetail, useEventV2Query, useEvents, useEventsCategories, useEventsInfiniteQuery, useEventsQuery, useEventsV2, useEventsV2Query, useFilterOutcomeMintsMutation, useFiltersBySportsQuery, useForecastPercentileHistoryByMintQuery, useForecastPercentileHistoryQuery, useInitPredictionMarketMutation, useIntentQuoteQuery, useLiveDataByEventQuery, useLiveDataByMintQuery, useLiveDataQuery, useMarketByIdQuery, useMarketByMintQuery, useMarketCandlesticksByMintQuery, useMarketCandlesticksQuery, useMarketPositions, useMarketsBatchQuery, useMarketsQuery, useOnchainTradesByEventInfiniteQuery, useOnchainTradesByEventQuery, useOnchainTradesByMarketInfiniteQuery, useOnchainTradesByMarketQuery, useOnchainTradesByWalletInfiniteQuery, useOnchainTradesByWalletQuery, useOpenOrders, useOrderBook, useOrderBookByMintQuery, useOrderBookQuery, useOrderQuery, useOrderStatusQuery, useOrderbookSubscription, useOutcomeMintsQuery, usePositions, usePositionsByWalletQuery, usePredictClient, usePredictContext, usePredictV2Client, usePredictV2Context, usePriceHistoryQuery, usePricesSubscription, useQuoteQuery, useSearchQuery, useSeriesByTickerQuery, useSeriesQuery, useSubmitIntentSwapMutation, useTagsByCategoriesQuery, useTokensQuery, useTokensWithDecimalsQuery, useTradeForm, useTradeHistory, useTradesByMintQuery, useTradesQuery, useTradesSubscription, useUserPredictContext, useVenuesQuery, useWsClient, useWsConnection, venuesQueryKey, _default as version };
|