@liberfi.io/react-predict 0.1.31 → 0.1.33

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.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, S as SimilarEventsParams, e as PredictMarket, O as Orderbook, f as ListMarketTradesParams, g as PredictTrade, h as PriceHistoryRange, i as PriceHistoryResponse, j as ListCandlesticksParams, C as Candlestick, k as PositionsResponse, B as BalanceResponse, l as ListOrdersParams, m as PredictOrder, n as CancelOrderResult, M as MatchesParams, o as MatchGroupPage, p as MatchGroup, q as MatchMarketParams, r as MatchMarketPage, s as ListTradesParams, D as DFlowQuoteRequest, t as DFlowQuoteResponse, u as DFlowSubmitResponse, v as DFlowSubmitRequest, w as DFlowKYCStatus, x as PolymarketSetupStatus, W as WithdrawBuildResponse, y as WithdrawBuildRequest, z as WithdrawSubmitResponse, A as WithdrawSubmitRequest, F as WithdrawStatusResponse, G as PolymarketDepositAddresses, H as PolymarketWithdrawResponse, I as PolymarketWithdrawRequest, J as WsConnectionStatus, K as WsDataMessage, N as WsPriceEvent, Q as WsOrderbookEvent, R as WsTradeEvent, T as CreateOrderInput } from './server-lP60FIU5.mjs';
2
- export { aY as BuildClobAuthMessageInput, b9 as BuildOrderMessageInput, aP as CLOB_AUTH_DOMAIN, aQ as CLOB_AUTH_TYPES, aZ as CTF_EXCHANGE_ADDRESS, b2 as CTF_ORDER_TYPES, b8 as ClobOrderPayload, ab as DFlowOrderContext, ad as DepositBuildRequest, ae as DepositBuildResponse, ah as DepositStatusResponse, af as DepositSubmitRequest, ag as DepositSubmitResponse, a2 as EventSortField, a5 as EventSummary, aV as HttpMethod, a1 as MarketOutcome, a0 as MarketResult, $ as MarketStatus, a6 as MarketSummary, ao as MatchConfidenceTier, ak as MatchGroupEntry, al as MatchGroupMarket, ap as MatchMarketFlat, am as MatchSortField, aj as MatchStatus, an as MatchesStats, a_ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b3 as ORDER_TYPE, ba as OrderMessage, aa as OrderSide, a9 as OrderStatus, a3 as OrderbookLevel, b0 as POLYGON_CHAIN_ID, aX as PolymarketL2Headers, aW as PolymarketL2HeadersInput, ac as PolymarketOrderType, a8 as PredictPosition, Z as PredictTag, X as PredictWsClientConfig, a7 as PricePoint, Y as ProviderMeta, aG as ResolveEventsParamsInput, b4 as SIDE, _ as SettlementSource, bb as SignedOrder, aH as TagSlugSelection, a4 as TradeType, a$ as USDC_ADDRESS, ai as UnsignedTx, aq as WsChannel, ar as WsChannelEvent, as as WsClientMessage, ay as WsErrorCode, az as WsErrorMessage, au as WsPingMessage, aw as WsPongMessage, av as WsServerMessage, at as WsSubscribeMessage, ax as WsSubscribedMessage, aR as buildClobAuthMessage, b7 as buildClobPayload, b1 as buildCtfExchangeDomain, b5 as buildOrderMessage, aT as buildPolymarketL2Headers, b6 as buildSignedOrder, U as createPredictClient, V as createPredictWsClient, aU as derivePolymarketApiKey, aA as eventQueryKey, aB as fetchEvent, aF as fetchEventsPage, aJ as fetchMarket, aO as fetchMatchMarketsPage, aM as fetchMatchesPage, aS as hmacSha256Base64, aE as infiniteEventsQueryKey, aI as marketQueryKey, aN as matchMarketsQueryKey, aL as matchQueryKey, aK as matchesQueryKey, aD as resolveEventsParams, aC as resolveTagSlug } from './server-lP60FIU5.mjs';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, e as EventSortField, S as SimilarEventsParams, f as PredictMarket, O as Orderbook, g as ListMarketTradesParams, h as PredictTrade, i as PriceHistoryRange, j as PriceHistoryResponse, k as ListCandlesticksParams, C as Candlestick, l as PositionsResponse, B as BalanceResponse, m as ListOrdersParams, n as PredictOrder, o as CancelOrderResult, M as MatchesParams, p as MatchGroupPage, q as MatchGroup, r as MatchMarketParams, s as MatchMarketPage, t as ListTradesParams, D as DFlowQuoteRequest, u as DFlowQuoteResponse, v as DFlowSubmitResponse, w as DFlowSubmitRequest, x as DFlowKYCStatus, y as PolymarketSetupStatus, W as WithdrawBuildResponse, z as WithdrawBuildRequest, A as WithdrawSubmitResponse, F as WithdrawSubmitRequest, G as WithdrawStatusResponse, H as PolymarketDepositAddresses, I as PolymarketWithdrawResponse, J as PolymarketWithdrawRequest, K as WsConnectionStatus, N as WsDataMessage, Q as WsPriceEvent, R as WsOrderbookEvent, T as WsTradeEvent, U as CreateOrderInput } from './server-BOEaPGc-.mjs';
2
+ export { aY as BuildClobAuthMessageInput, b9 as BuildOrderMessageInput, aP as CLOB_AUTH_DOMAIN, aQ as CLOB_AUTH_TYPES, aZ as CTF_EXCHANGE_ADDRESS, b2 as CTF_ORDER_TYPES, b8 as ClobOrderPayload, ab as DFlowOrderContext, ad as DepositBuildRequest, ae as DepositBuildResponse, ah as DepositStatusResponse, af as DepositSubmitRequest, ag as DepositSubmitResponse, a5 as EventSummary, aV as HttpMethod, a2 as MarketOutcome, a1 as MarketResult, a0 as MarketStatus, a6 as MarketSummary, ao as MatchConfidenceTier, ak as MatchGroupEntry, al as MatchGroupMarket, ap as MatchMarketFlat, am as MatchSortField, aj as MatchStatus, an as MatchesStats, a_ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b3 as ORDER_TYPE, ba as OrderMessage, aa as OrderSide, a9 as OrderStatus, a3 as OrderbookLevel, b0 as POLYGON_CHAIN_ID, aX as PolymarketL2Headers, aW as PolymarketL2HeadersInput, ac as PolymarketOrderType, a8 as PredictPosition, _ as PredictTag, Y as PredictWsClientConfig, a7 as PricePoint, Z as ProviderMeta, aG as ResolveEventsParamsInput, b4 as SIDE, $ as SettlementSource, bb as SignedOrder, aH as TagSlugSelection, a4 as TradeType, a$ as USDC_ADDRESS, ai as UnsignedTx, aq as WsChannel, ar as WsChannelEvent, as as WsClientMessage, ay as WsErrorCode, az as WsErrorMessage, au as WsPingMessage, aw as WsPongMessage, av as WsServerMessage, at as WsSubscribeMessage, ax as WsSubscribedMessage, aR as buildClobAuthMessage, b7 as buildClobPayload, b1 as buildCtfExchangeDomain, b5 as buildOrderMessage, aT as buildPolymarketL2Headers, b6 as buildSignedOrder, V as createPredictClient, X as createPredictWsClient, aU as derivePolymarketApiKey, aA as eventQueryKey, aB as fetchEvent, aF as fetchEventsPage, aJ as fetchMarket, aO as fetchMatchMarketsPage, aM as fetchMatchesPage, aS as hmacSha256Base64, aE as infiniteEventsQueryKey, aI as marketQueryKey, aN as matchMarketsQueryKey, aL as matchQueryKey, aK as matchesQueryKey, aD as resolveEventsParams, aC as resolveTagSlug } from './server-BOEaPGc-.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren } from 'react';
@@ -250,6 +250,10 @@ interface UseSearchEventsParams {
250
250
  source?: ProviderSource;
251
251
  /** Include nested markets (default: false for lighter search payloads). */
252
252
  with_markets?: boolean;
253
+ /** Field to sort by (e.g. "volume" for trending). */
254
+ sort_by?: EventSortField;
255
+ /** When `true`, sort ascending. Defaults to descending. */
256
+ sort_asc?: boolean;
253
257
  }
254
258
  /**
255
259
  * Infinite query hook for searching prediction events via the `listEvents`
@@ -782,4 +786,4 @@ interface CreatePolymarketOrderVariables {
782
786
  */
783
787
  declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
784
788
 
785
- export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
789
+ export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, S as SimilarEventsParams, e as PredictMarket, O as Orderbook, f as ListMarketTradesParams, g as PredictTrade, h as PriceHistoryRange, i as PriceHistoryResponse, j as ListCandlesticksParams, C as Candlestick, k as PositionsResponse, B as BalanceResponse, l as ListOrdersParams, m as PredictOrder, n as CancelOrderResult, M as MatchesParams, o as MatchGroupPage, p as MatchGroup, q as MatchMarketParams, r as MatchMarketPage, s as ListTradesParams, D as DFlowQuoteRequest, t as DFlowQuoteResponse, u as DFlowSubmitResponse, v as DFlowSubmitRequest, w as DFlowKYCStatus, x as PolymarketSetupStatus, W as WithdrawBuildResponse, y as WithdrawBuildRequest, z as WithdrawSubmitResponse, A as WithdrawSubmitRequest, F as WithdrawStatusResponse, G as PolymarketDepositAddresses, H as PolymarketWithdrawResponse, I as PolymarketWithdrawRequest, J as WsConnectionStatus, K as WsDataMessage, N as WsPriceEvent, Q as WsOrderbookEvent, R as WsTradeEvent, T as CreateOrderInput } from './server-lP60FIU5.js';
2
- export { aY as BuildClobAuthMessageInput, b9 as BuildOrderMessageInput, aP as CLOB_AUTH_DOMAIN, aQ as CLOB_AUTH_TYPES, aZ as CTF_EXCHANGE_ADDRESS, b2 as CTF_ORDER_TYPES, b8 as ClobOrderPayload, ab as DFlowOrderContext, ad as DepositBuildRequest, ae as DepositBuildResponse, ah as DepositStatusResponse, af as DepositSubmitRequest, ag as DepositSubmitResponse, a2 as EventSortField, a5 as EventSummary, aV as HttpMethod, a1 as MarketOutcome, a0 as MarketResult, $ as MarketStatus, a6 as MarketSummary, ao as MatchConfidenceTier, ak as MatchGroupEntry, al as MatchGroupMarket, ap as MatchMarketFlat, am as MatchSortField, aj as MatchStatus, an as MatchesStats, a_ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b3 as ORDER_TYPE, ba as OrderMessage, aa as OrderSide, a9 as OrderStatus, a3 as OrderbookLevel, b0 as POLYGON_CHAIN_ID, aX as PolymarketL2Headers, aW as PolymarketL2HeadersInput, ac as PolymarketOrderType, a8 as PredictPosition, Z as PredictTag, X as PredictWsClientConfig, a7 as PricePoint, Y as ProviderMeta, aG as ResolveEventsParamsInput, b4 as SIDE, _ as SettlementSource, bb as SignedOrder, aH as TagSlugSelection, a4 as TradeType, a$ as USDC_ADDRESS, ai as UnsignedTx, aq as WsChannel, ar as WsChannelEvent, as as WsClientMessage, ay as WsErrorCode, az as WsErrorMessage, au as WsPingMessage, aw as WsPongMessage, av as WsServerMessage, at as WsSubscribeMessage, ax as WsSubscribedMessage, aR as buildClobAuthMessage, b7 as buildClobPayload, b1 as buildCtfExchangeDomain, b5 as buildOrderMessage, aT as buildPolymarketL2Headers, b6 as buildSignedOrder, U as createPredictClient, V as createPredictWsClient, aU as derivePolymarketApiKey, aA as eventQueryKey, aB as fetchEvent, aF as fetchEventsPage, aJ as fetchMarket, aO as fetchMatchMarketsPage, aM as fetchMatchesPage, aS as hmacSha256Base64, aE as infiniteEventsQueryKey, aI as marketQueryKey, aN as matchMarketsQueryKey, aL as matchQueryKey, aK as matchesQueryKey, aD as resolveEventsParams, aC as resolveTagSlug } from './server-lP60FIU5.js';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, e as EventSortField, S as SimilarEventsParams, f as PredictMarket, O as Orderbook, g as ListMarketTradesParams, h as PredictTrade, i as PriceHistoryRange, j as PriceHistoryResponse, k as ListCandlesticksParams, C as Candlestick, l as PositionsResponse, B as BalanceResponse, m as ListOrdersParams, n as PredictOrder, o as CancelOrderResult, M as MatchesParams, p as MatchGroupPage, q as MatchGroup, r as MatchMarketParams, s as MatchMarketPage, t as ListTradesParams, D as DFlowQuoteRequest, u as DFlowQuoteResponse, v as DFlowSubmitResponse, w as DFlowSubmitRequest, x as DFlowKYCStatus, y as PolymarketSetupStatus, W as WithdrawBuildResponse, z as WithdrawBuildRequest, A as WithdrawSubmitResponse, F as WithdrawSubmitRequest, G as WithdrawStatusResponse, H as PolymarketDepositAddresses, I as PolymarketWithdrawResponse, J as PolymarketWithdrawRequest, K as WsConnectionStatus, N as WsDataMessage, Q as WsPriceEvent, R as WsOrderbookEvent, T as WsTradeEvent, U as CreateOrderInput } from './server-BOEaPGc-.js';
2
+ export { aY as BuildClobAuthMessageInput, b9 as BuildOrderMessageInput, aP as CLOB_AUTH_DOMAIN, aQ as CLOB_AUTH_TYPES, aZ as CTF_EXCHANGE_ADDRESS, b2 as CTF_ORDER_TYPES, b8 as ClobOrderPayload, ab as DFlowOrderContext, ad as DepositBuildRequest, ae as DepositBuildResponse, ah as DepositStatusResponse, af as DepositSubmitRequest, ag as DepositSubmitResponse, a5 as EventSummary, aV as HttpMethod, a2 as MarketOutcome, a1 as MarketResult, a0 as MarketStatus, a6 as MarketSummary, ao as MatchConfidenceTier, ak as MatchGroupEntry, al as MatchGroupMarket, ap as MatchMarketFlat, am as MatchSortField, aj as MatchStatus, an as MatchesStats, a_ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b3 as ORDER_TYPE, ba as OrderMessage, aa as OrderSide, a9 as OrderStatus, a3 as OrderbookLevel, b0 as POLYGON_CHAIN_ID, aX as PolymarketL2Headers, aW as PolymarketL2HeadersInput, ac as PolymarketOrderType, a8 as PredictPosition, _ as PredictTag, Y as PredictWsClientConfig, a7 as PricePoint, Z as ProviderMeta, aG as ResolveEventsParamsInput, b4 as SIDE, $ as SettlementSource, bb as SignedOrder, aH as TagSlugSelection, a4 as TradeType, a$ as USDC_ADDRESS, ai as UnsignedTx, aq as WsChannel, ar as WsChannelEvent, as as WsClientMessage, ay as WsErrorCode, az as WsErrorMessage, au as WsPingMessage, aw as WsPongMessage, av as WsServerMessage, at as WsSubscribeMessage, ax as WsSubscribedMessage, aR as buildClobAuthMessage, b7 as buildClobPayload, b1 as buildCtfExchangeDomain, b5 as buildOrderMessage, aT as buildPolymarketL2Headers, b6 as buildSignedOrder, V as createPredictClient, X as createPredictWsClient, aU as derivePolymarketApiKey, aA as eventQueryKey, aB as fetchEvent, aF as fetchEventsPage, aJ as fetchMarket, aO as fetchMatchMarketsPage, aM as fetchMatchesPage, aS as hmacSha256Base64, aE as infiniteEventsQueryKey, aI as marketQueryKey, aN as matchMarketsQueryKey, aL as matchQueryKey, aK as matchesQueryKey, aD as resolveEventsParams, aC as resolveTagSlug } from './server-BOEaPGc-.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren } from 'react';
@@ -250,6 +250,10 @@ interface UseSearchEventsParams {
250
250
  source?: ProviderSource;
251
251
  /** Include nested markets (default: false for lighter search payloads). */
252
252
  with_markets?: boolean;
253
+ /** Field to sort by (e.g. "volume" for trending). */
254
+ sort_by?: EventSortField;
255
+ /** When `true`, sort ascending. Defaults to descending. */
256
+ sort_asc?: boolean;
253
257
  }
254
258
  /**
255
259
  * Infinite query hook for searching prediction events via the `listEvents`
@@ -782,4 +786,4 @@ interface CreatePolymarketOrderVariables {
782
786
  */
783
787
  declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
784
788
 
785
- export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
789
+ export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
package/dist/index.js CHANGED
@@ -996,18 +996,22 @@ function useSearchEvents(params, queryOptions) {
996
996
  const client = usePredictClient();
997
997
  const apiParams = react.useMemo(
998
998
  () => ({
999
- search: params.keyword,
999
+ search: params.keyword || void 0,
1000
1000
  limit: params.limit ?? 20,
1001
1001
  status: params.status ?? "open",
1002
1002
  source: params.source,
1003
- with_markets: params.with_markets ?? false
1003
+ with_markets: params.with_markets ?? false,
1004
+ sort_by: params.sort_by,
1005
+ sort_asc: params.sort_asc
1004
1006
  }),
1005
1007
  [
1006
1008
  params.keyword,
1007
1009
  params.limit,
1008
1010
  params.status,
1009
1011
  params.source,
1010
- params.with_markets
1012
+ params.with_markets,
1013
+ params.sort_by,
1014
+ params.sort_asc
1011
1015
  ]
1012
1016
  );
1013
1017
  return reactQuery.useInfiniteQuery({
@@ -1018,7 +1022,7 @@ function useSearchEvents(params, queryOptions) {
1018
1022
  }),
1019
1023
  initialPageParam: void 0,
1020
1024
  getNextPageParam: (lastPage) => lastPage.has_more && lastPage.next_cursor ? lastPage.next_cursor : void 0,
1021
- enabled: queryOptions?.enabled ?? !!params.keyword
1025
+ enabled: queryOptions?.enabled ?? true
1022
1026
  });
1023
1027
  }
1024
1028
  function similarEventsQueryKey(slug, source, params) {