@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.
@@ -1214,6 +1214,192 @@ interface IPredictWsClient {
1214
1214
  subscribeOrderbook(options: WsSubscribeOptions, onUpdate: (update: WsOrderbookUpdate) => void): () => void;
1215
1215
  }
1216
1216
 
1217
+ /**
1218
+ * V2 types for the prediction-server REST API (/api/v1/events).
1219
+ *
1220
+ * These types are intentionally isolated from the legacy client types so that
1221
+ * the v1 (DFlow) and v2 (prediction-server) clients can coexist and be migrated
1222
+ * incrementally.
1223
+ *
1224
+ * Mirrors: github.com/liberfi-io/prediction-server/internal/domain
1225
+ */
1226
+ /** Upstream data provider that produced a domain object. */
1227
+ type V2ProviderSource = "dflow" | "polymarket";
1228
+ /**
1229
+ * Provider-specific metadata attached to every domain aggregate.
1230
+ * Keys are namespaced field paths, e.g. "polymarket.conditionId" or "dflow.yesMint".
1231
+ * Values are raw JSON-decoded values.
1232
+ */
1233
+ type V2ProviderMeta = Record<string, unknown>;
1234
+ /** Provider-sourced label attached to an Event. */
1235
+ interface V2Tag {
1236
+ slug: string;
1237
+ label: string;
1238
+ source: V2ProviderSource;
1239
+ provider_meta?: V2ProviderMeta;
1240
+ }
1241
+ /** Lifecycle status of a prediction event (normalised across all providers). */
1242
+ type V2EventStatus = "pending" | "open" | "closed" | "voided";
1243
+ /** Settlement / resolution data source for an event. */
1244
+ interface V2SettlementSource {
1245
+ url: string;
1246
+ name?: string;
1247
+ }
1248
+ /** Root aggregate for a prediction event from the prediction-server API. */
1249
+ interface V2Event {
1250
+ /** Internal database surrogate key (absent when not yet persisted). */
1251
+ id?: number;
1252
+ /**
1253
+ * Canonical business key shared across all providers.
1254
+ * - DFlow: ticker (e.g. "KXBTCD-25FEB-T68000")
1255
+ * - Polymarket: slug (e.g. "will-trump-win-2024")
1256
+ */
1257
+ slug: string;
1258
+ title: string;
1259
+ subtitle?: string;
1260
+ description?: string;
1261
+ image_url?: string;
1262
+ status: V2EventStatus;
1263
+ /** ISO 8601 timestamp; absent if the provider does not supply it. */
1264
+ start_at?: string;
1265
+ end_at?: string;
1266
+ created_at?: string;
1267
+ updated_at?: string;
1268
+ /** Provider-sourced labels for display only. */
1269
+ tags?: V2Tag[];
1270
+ /** All values are USD amounts. */
1271
+ volume?: number;
1272
+ volume_24h?: number;
1273
+ liquidity?: number;
1274
+ open_interest?: number;
1275
+ settlement_sources?: V2SettlementSource[];
1276
+ /** Nested markets; omitted when the request used `with_markets=false`. */
1277
+ markets?: V2Market[];
1278
+ source: V2ProviderSource;
1279
+ provider_meta?: V2ProviderMeta;
1280
+ }
1281
+ /** Lifecycle status of a prediction market (normalised across all providers). */
1282
+ type V2MarketStatus = "pending" | "open" | "closed" | "voided";
1283
+ /** Final resolution of a closed market. Empty string means unresolved. */
1284
+ type V2MarketResult = "yes" | "no" | "voided" | "";
1285
+ /** One possible outcome in a binary (or multi-outcome) prediction market. */
1286
+ interface V2Outcome {
1287
+ /** Display name, e.g. "Yes" or "No". */
1288
+ label: string;
1289
+ /** Current implied probability [0, 1]. */
1290
+ price?: number;
1291
+ best_bid?: number;
1292
+ best_ask?: number;
1293
+ }
1294
+ /** Tradeable prediction outcome within an Event. */
1295
+ interface V2Market {
1296
+ id?: number;
1297
+ event_id?: number;
1298
+ slug: string;
1299
+ event_slug: string;
1300
+ question: string;
1301
+ description?: string;
1302
+ /** Resolution/settlement rules in order. */
1303
+ rules?: string[];
1304
+ status: V2MarketStatus;
1305
+ result?: V2MarketResult;
1306
+ start_at?: string;
1307
+ end_at?: string;
1308
+ expires_at?: string;
1309
+ created_at?: string;
1310
+ updated_at?: string;
1311
+ /** Always present; binary markets have exactly 2 outcomes (YES at [0], NO at [1]). */
1312
+ outcomes: V2Outcome[];
1313
+ volume?: number;
1314
+ volume_24h?: number;
1315
+ liquidity?: number;
1316
+ open_interest?: number;
1317
+ source: V2ProviderSource;
1318
+ provider_meta?: V2ProviderMeta;
1319
+ }
1320
+ /** Generic paginated result set returned by the prediction-server list endpoints. */
1321
+ interface V2Page<T> {
1322
+ items: T[];
1323
+ next_cursor?: string;
1324
+ has_more?: boolean;
1325
+ limit?: number;
1326
+ /** Not all backends support total count. */
1327
+ total?: number;
1328
+ }
1329
+ /** Valid sort fields accepted by `GET /api/v1/events`. */
1330
+ type V2EventSortField = "volume" | "volume_24h" | "liquidity" | "open_interest" | "end_at" | "start_at" | "created_at";
1331
+ /** Query parameters for `listEvents`. All fields are optional. */
1332
+ interface V2ListEventsParams {
1333
+ /** Page size. Server default: 20. */
1334
+ limit?: number;
1335
+ /** Opaque pagination cursor returned by the previous page's `next_cursor`. */
1336
+ cursor?: string;
1337
+ /** Filter by event lifecycle status. */
1338
+ status?: V2EventStatus;
1339
+ /** Filter by upstream provider. */
1340
+ source?: V2ProviderSource;
1341
+ /** Unified navigation tag slug (e.g. "politics", "sports"). */
1342
+ tag_slug?: string;
1343
+ /** Full-text search query. */
1344
+ search?: string;
1345
+ /** Field to sort by. */
1346
+ sort_by?: V2EventSortField;
1347
+ /** When `true`, sort ascending. Defaults to descending. */
1348
+ sort_asc?: boolean;
1349
+ /**
1350
+ * When `false`, markets are omitted from each event for lighter payloads.
1351
+ * Defaults to `true` on the server.
1352
+ */
1353
+ with_markets?: boolean;
1354
+ }
1355
+
1356
+ /**
1357
+ * HTTP client for the prediction-server REST API (v2 / prediction-server backend).
1358
+ *
1359
+ * Covers `GET /api/v1/events` (listEvents) and `GET /api/v1/events/:slug` (getEvent).
1360
+ *
1361
+ * This client is intentionally decoupled from the legacy `DflowPredictClient` so
1362
+ * that both can be used in parallel during the incremental migration from the old
1363
+ * DFlow-direct integration to the unified prediction-server backend.
1364
+ *
1365
+ * @example
1366
+ * ```ts
1367
+ * const client = new PredictClientV2("https://api.example.com");
1368
+ * const page = await client.listEvents({ status: "open", limit: 20 });
1369
+ * const event = await client.getEvent("will-trump-win-2024");
1370
+ * ```
1371
+ */
1372
+ declare class PredictClientV2 {
1373
+ private readonly endpoint;
1374
+ constructor(endpoint: string);
1375
+ /**
1376
+ * List prediction events with optional filtering, sorting, and pagination.
1377
+ *
1378
+ * Maps to `GET /api/v1/events`.
1379
+ *
1380
+ * @param params - Optional query parameters (filter, sort, pagination).
1381
+ * @returns A paginated page of events.
1382
+ */
1383
+ listEvents(params?: V2ListEventsParams): Promise<V2Page<V2Event>>;
1384
+ /**
1385
+ * Fetch a single prediction event by its slug.
1386
+ *
1387
+ * Maps to `GET /api/v1/events/:slug`.
1388
+ *
1389
+ * @param slug - Canonical event slug (e.g. "will-trump-win-2024" for Polymarket
1390
+ * or "KXBTCD-25FEB-T68000" for DFlow).
1391
+ * @returns The matching event.
1392
+ * @throws When the server responds with 404 or any other non-2xx status.
1393
+ */
1394
+ getEvent(slug: string): Promise<V2Event>;
1395
+ }
1396
+ /**
1397
+ * Factory function for `PredictClientV2`.
1398
+ *
1399
+ * @param endpoint - Base URL of the prediction-server, without a trailing slash.
1400
+ */
1401
+ declare function createPredictClientV2(endpoint: string): PredictClientV2;
1402
+
1217
1403
  /**
1218
1404
  * Build a query string from a params object.
1219
1405
  * Skips `undefined` and `null` values.
@@ -1415,4 +1601,4 @@ declare class DflowPredictWsClient implements IPredictWsClient {
1415
1601
  */
1416
1602
  declare function createDflowPredictWsClient(config: WsClientConfig): DflowPredictWsClient;
1417
1603
 
1418
- export { type IntentSwapRequestBody as $, type SearchResponse as A, type WalletPositionsResponse as B, type CandlesticksResponse as C, type OutcomeMintsQueryParams as D, type EventQueryParams as E, type ForecastPercentileHistoryQueryParams as F, type OutcomeMintsResponse as G, type FilterOutcomeMintsRequest as H, type IPredictClient as I, type FilterOutcomeMintsResponse as J, type QuoteResponse as K, type LiveDataQueryParams as L, type MarketQueryParams as M, type SwapRequestBody as N, type OrderResponse as O, type PositionsByWalletQueryParams as P, type QuoteQueryParams as Q, type SwapResponse as R, type StandardEvent as S, type TradesQueryParams as T, type SwapInstructionsResponse as U, type OrderQueryParams as V, type WalletPositionItem as W, type OrderStatusQueryParams as X, type OrderStatusResponse as Y, type IntentQuoteQueryParams as Z, type IntentQuoteResponse as _, type StandardMarket as a, type IntentSwapResponse as a0, type PredictionMarketInitQueryParams as a1, type PredictionMarketInitResponse as a2, type TokenListResponse as a3, type TokenListWithDecimalsResponse as a4, type VenueListResponse as a5, type WsConnectionStatus as a6, type WsPriceUpdate as a7, type WsTradeUpdate as a8, type WsOrderbookUpdate as a9, type OrderRevert as aA, type IntentExpiry as aB, type TokenWithDecimals as aC, type OrderbookQueryParams as aD, type PrioritizationFeeLamports as aE, type DestinationTokenAccountParam as aF, type CreateFeeAccountParams as aG, type PositiveSlippageParams as aH, type WsSubscribeOptions as aI, BasePredictClient as aJ, buildQuery as aK, toRecord as aL, DflowPredictClient as aM, DflowPredictWsClient as aN, createDflowPredictWsClient as aO, type WsClientConfig as aP, type ProviderType as aa, type MarketStatus as ab, type SortField as ac, type SortOrder as ad, type OrderStatus as ae, type PlatformFeeMode as af, type SlippageTolerance as ag, type PriorityLevel as ah, type ExecutionMode as ai, type SettlementSource as aj, type MarketAccountInfo as ak, type OnchainTrade as al, type OnchainTradeSortBy as am, type OnchainTradesBaseQueryParams as an, type CandlestickOHLC as ao, type CandlestickDataPoint as ap, type ForecastPercentileDataPoint as aq, type SeriesSettlementSource as ar, type RoutePlanLeg as as, type PlatformFee as at, type ComputeBudgetInfo as au, type PrioritizationType as av, type AccountMetaResponse as aw, type InstructionResponse as ax, type BlockhashWithMetadata as ay, type OrderFill as az, type SeriesResponse as b, type OrderbookLevel as c, type SingleTradeResponse as d, type IPredictWsClient as e, type StandardEventsResponse as f, type StandardMarketsResponse as g, type MarketsBatchRequest as h, type OrderbookResponse as i, type MultiTradeResponse as j, type TradesByMintQueryParams as k, type OnchainTradesByWalletQueryParams as l, type MultiOnchainTradeResponse as m, type OnchainTradesByEventQueryParams as n, type OnchainTradesByMarketQueryParams as o, type CandlesticksQueryParams as p, type ForecastPercentileHistoryResponse as q, type ForecastPercentileHistoryByMintQueryParams as r, type LiveDataResponse as s, type LiveDataByEventQueryParams as t, type LiveDataByMintQueryParams as u, type SeriesQueryParams as v, type SeriesListResponse as w, type TagsByCategoriesResponse as x, type FiltersBySportsResponse as y, type SearchQueryParams as z };
1604
+ export { type SwapRequestBody as $, type LiveDataByMintQueryParams as A, type SeriesQueryParams as B, type CandlesticksResponse as C, type SeriesListResponse as D, type EventQueryParams as E, type ForecastPercentileHistoryQueryParams as F, type TagsByCategoriesResponse as G, type FiltersBySportsResponse as H, type IPredictClient as I, type SearchQueryParams as J, type SearchResponse as K, type LiveDataQueryParams as L, type MarketQueryParams as M, type PositionsByWalletQueryParams as N, type OrderResponse as O, PredictClientV2 as P, type WalletPositionsResponse as Q, type OutcomeMintsQueryParams as R, type StandardEvent as S, type TradesQueryParams as T, type OutcomeMintsResponse as U, type V2Event as V, type WalletPositionItem as W, type FilterOutcomeMintsRequest as X, type FilterOutcomeMintsResponse as Y, type QuoteQueryParams as Z, type QuoteResponse as _, type StandardMarket as a, type V2ProviderMeta as a$, type SwapResponse as a0, type SwapInstructionsResponse as a1, type OrderQueryParams as a2, type OrderStatusQueryParams as a3, type IntentQuoteQueryParams as a4, type IntentQuoteResponse as a5, type IntentSwapRequestBody as a6, type IntentSwapResponse as a7, type PredictionMarketInitQueryParams as a8, type PredictionMarketInitResponse as a9, type PlatformFee as aA, type ComputeBudgetInfo as aB, type PrioritizationType as aC, type AccountMetaResponse as aD, type InstructionResponse as aE, type BlockhashWithMetadata as aF, type OrderFill as aG, type OrderRevert as aH, type IntentExpiry as aI, type TokenWithDecimals as aJ, type OrderbookQueryParams as aK, type PrioritizationFeeLamports as aL, type DestinationTokenAccountParam as aM, type CreateFeeAccountParams as aN, type PositiveSlippageParams as aO, type WsSubscribeOptions as aP, BasePredictClient as aQ, buildQuery as aR, toRecord as aS, DflowPredictClient as aT, DflowPredictWsClient as aU, createDflowPredictWsClient as aV, type WsClientConfig as aW, createPredictClientV2 as aX, type V2MarketResult as aY, type V2MarketStatus as aZ, type V2Outcome as a_, type TokenListResponse as aa, type TokenListWithDecimalsResponse as ab, type VenueListResponse as ac, type WsConnectionStatus as ad, type WsPriceUpdate as ae, type WsTradeUpdate as af, type WsOrderbookUpdate as ag, type ProviderType as ah, type MarketStatus as ai, type SortField as aj, type SortOrder as ak, type OrderStatus as al, type PlatformFeeMode as am, type SlippageTolerance as an, type PriorityLevel as ao, type ExecutionMode as ap, type SettlementSource as aq, type MarketAccountInfo as ar, type OnchainTrade as as, type OnchainTradeSortBy as at, type OnchainTradesBaseQueryParams as au, type CandlestickOHLC as av, type CandlestickDataPoint as aw, type ForecastPercentileDataPoint as ax, type SeriesSettlementSource as ay, type RoutePlanLeg as az, type V2Market as b, type V2ProviderSource as b0, type V2SettlementSource as b1, type V2Tag as b2, type V2EventStatus as c, type V2EventSortField as d, type OrderStatusResponse as e, type SeriesResponse as f, type OrderbookLevel as g, type SingleTradeResponse as h, type IPredictWsClient as i, type V2ListEventsParams as j, type V2Page as k, type StandardEventsResponse as l, type StandardMarketsResponse as m, type MarketsBatchRequest as n, type OrderbookResponse as o, type MultiTradeResponse as p, type TradesByMintQueryParams as q, type OnchainTradesByWalletQueryParams as r, type MultiOnchainTradeResponse as s, type OnchainTradesByEventQueryParams as t, type OnchainTradesByMarketQueryParams as u, type CandlesticksQueryParams as v, type ForecastPercentileHistoryResponse as w, type ForecastPercentileHistoryByMintQueryParams as x, type LiveDataResponse as y, type LiveDataByEventQueryParams as z };
package/dist/index.d.mts 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, b as SeriesResponse, C as CandlesticksResponse, c as OrderbookLevel, d as SingleTradeResponse, I as IPredictClient, e as IPredictWsClient, W as WalletPositionItem, f as StandardEventsResponse, M as MarketQueryParams, g as StandardMarketsResponse, h as MarketsBatchRequest, i as OrderbookResponse, T as TradesQueryParams, j as MultiTradeResponse, k as TradesByMintQueryParams, l as OnchainTradesByWalletQueryParams, m as MultiOnchainTradeResponse, n as OnchainTradesByEventQueryParams, o as OnchainTradesByMarketQueryParams, p as CandlesticksQueryParams, F as ForecastPercentileHistoryQueryParams, q as ForecastPercentileHistoryResponse, r as ForecastPercentileHistoryByMintQueryParams, L as LiveDataQueryParams, s as LiveDataResponse, t as LiveDataByEventQueryParams, u as LiveDataByMintQueryParams, v as SeriesQueryParams, w as SeriesListResponse, x as TagsByCategoriesResponse, y as FiltersBySportsResponse, z as SearchQueryParams, A as SearchResponse, P as PositionsByWalletQueryParams, B as WalletPositionsResponse, D as OutcomeMintsQueryParams, G as OutcomeMintsResponse, H as FilterOutcomeMintsRequest, J as FilterOutcomeMintsResponse, Q as QuoteQueryParams, K as QuoteResponse, N as SwapRequestBody, R as SwapResponse, U as SwapInstructionsResponse, V as OrderQueryParams, X as OrderStatusQueryParams, Y as OrderStatusResponse, Z as IntentQuoteQueryParams, _ as IntentQuoteResponse, $ as IntentSwapRequestBody, a0 as IntentSwapResponse, a1 as PredictionMarketInitQueryParams, a2 as PredictionMarketInitResponse, a3 as TokenListResponse, a4 as TokenListWithDecimalsResponse, a5 as VenueListResponse, a6 as WsConnectionStatus, a7 as WsPriceUpdate, a8 as WsTradeUpdate, a9 as WsOrderbookUpdate } from './index-B-NMsVEe.mjs';
3
- export { aw as AccountMetaResponse, aJ as BasePredictClient, ay as BlockhashWithMetadata, ap as CandlestickDataPoint, ao as CandlestickOHLC, au as ComputeBudgetInfo, aG as CreateFeeAccountParams, aF as DestinationTokenAccountParam, aM as DflowPredictClient, aN as DflowPredictWsClient, ai as ExecutionMode, aq as ForecastPercentileDataPoint, ax as InstructionResponse, aB as IntentExpiry, ak as MarketAccountInfo, ab as MarketStatus, al as OnchainTrade, am as OnchainTradeSortBy, an as OnchainTradesBaseQueryParams, az as OrderFill, aA as OrderRevert, ae as OrderStatus, aD as OrderbookQueryParams, at as PlatformFee, af as PlatformFeeMode, aH as PositiveSlippageParams, aM as PredictClient, aN as PredictWsClient, aE as PrioritizationFeeLamports, av as PrioritizationType, ah as PriorityLevel, aa as ProviderType, as as RoutePlanLeg, ar as SeriesSettlementSource, aj as SettlementSource, ag as SlippageTolerance, ac as SortField, ad as SortOrder, aC as TokenWithDecimals, aP as WsClientConfig, aI as WsSubscribeOptions, aK as buildQuery, aO as createDflowPredictWsClient, aO as createPredictWsClient, aL as toRecord } from './index-B-NMsVEe.mjs';
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.mjs';
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.mjs';
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.49";
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 };