@liberfi.io/react-predict 0.1.67 → 0.1.69

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 EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as PolymarketRedeemResponse, V as TickSizeResponse, X as FeeRateResponse, Y as WsConnectionStatus, Z as WsDataMessage, _ as WsPriceEvent, $ as WsOrderbookEvent, a0 as WsTradeEvent, a1 as CreateOrderInput } from './server-DDzzly1V.mjs';
2
- export { b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, bm as ClobOrderPayload, aj as DFlowOrderContext, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, ad as EventSummary, b6 as HttpMethod, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, au as MatchGroupEntry, av as MatchGroupMarket, az as MatchMarketFlat, aw as MatchSortField, at as MatchStatus, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, aM as PolymarketRedeemInput, aK as PolymarketRedeemPrepareInput, aL as PolymarketRedeemPrepareResponse, ar as PolymarketWithdrawPrepareRequest, as as PolymarketWithdrawPrepareResponse, ag as PredictPosition, a6 as PredictTag, a4 as PredictWsClientConfig, af as PricePoint, a5 as ProviderMeta, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, aI as WsErrorCode, aJ as WsErrorMessage, aE as WsPingMessage, aG as WsPongMessage, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, bl as getPolymarketSharesPrecision, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-DDzzly1V.mjs';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as PolymarketRedeemResponse, V as TickSizeResponse, X as FeeRateResponse, Y as WsConnectionStatus, Z as WsDataMessage, _ as WsPriceEvent, $ as WsOrderbookEvent, a0 as WsTradeEvent, a1 as CreateOrderInput } from './server-HRO1ViL3.mjs';
2
+ export { b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, bm as ClobOrderPayload, aj as DFlowOrderContext, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, ad as EventSummary, b6 as HttpMethod, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, au as MatchGroupEntry, av as MatchGroupMarket, az as MatchMarketFlat, aw as MatchSortField, at as MatchStatus, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, aM as PolymarketRedeemInput, aK as PolymarketRedeemPrepareInput, aL as PolymarketRedeemPrepareResponse, ar as PolymarketWithdrawPrepareRequest, as as PolymarketWithdrawPrepareResponse, ag as PredictPosition, a6 as PredictTag, a4 as PredictWsClientConfig, af as PricePoint, a5 as ProviderMeta, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, aI as WsErrorCode, aJ as WsErrorMessage, aE as WsPingMessage, aG as WsPongMessage, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, bl as getPolymarketSharesPrecision, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-HRO1ViL3.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';
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 EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as PolymarketRedeemResponse, V as TickSizeResponse, X as FeeRateResponse, Y as WsConnectionStatus, Z as WsDataMessage, _ as WsPriceEvent, $ as WsOrderbookEvent, a0 as WsTradeEvent, a1 as CreateOrderInput } from './server-DDzzly1V.js';
2
- export { b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, bm as ClobOrderPayload, aj as DFlowOrderContext, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, ad as EventSummary, b6 as HttpMethod, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, au as MatchGroupEntry, av as MatchGroupMarket, az as MatchMarketFlat, aw as MatchSortField, at as MatchStatus, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, aM as PolymarketRedeemInput, aK as PolymarketRedeemPrepareInput, aL as PolymarketRedeemPrepareResponse, ar as PolymarketWithdrawPrepareRequest, as as PolymarketWithdrawPrepareResponse, ag as PredictPosition, a6 as PredictTag, a4 as PredictWsClientConfig, af as PricePoint, a5 as ProviderMeta, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, aI as WsErrorCode, aJ as WsErrorMessage, aE as WsPingMessage, aG as WsPongMessage, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, bl as getPolymarketSharesPrecision, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-DDzzly1V.js';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as PolymarketRedeemResponse, V as TickSizeResponse, X as FeeRateResponse, Y as WsConnectionStatus, Z as WsDataMessage, _ as WsPriceEvent, $ as WsOrderbookEvent, a0 as WsTradeEvent, a1 as CreateOrderInput } from './server-HRO1ViL3.js';
2
+ export { b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, bm as ClobOrderPayload, aj as DFlowOrderContext, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, ad as EventSummary, b6 as HttpMethod, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, au as MatchGroupEntry, av as MatchGroupMarket, az as MatchMarketFlat, aw as MatchSortField, at as MatchStatus, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, aM as PolymarketRedeemInput, aK as PolymarketRedeemPrepareInput, aL as PolymarketRedeemPrepareResponse, ar as PolymarketWithdrawPrepareRequest, as as PolymarketWithdrawPrepareResponse, ag as PredictPosition, a6 as PredictTag, a4 as PredictWsClientConfig, af as PricePoint, a5 as ProviderMeta, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, aI as WsErrorCode, aJ as WsErrorMessage, aE as WsPingMessage, aG as WsPongMessage, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, bl as getPolymarketSharesPrecision, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-HRO1ViL3.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';
package/dist/index.js CHANGED
@@ -507,7 +507,7 @@ var PredictWsClient = class {
507
507
  this.reconnectMax = config.reconnectMaxInterval ?? DEFAULT_RECONNECT_MAX;
508
508
  this.pingMs = config.pingInterval ?? DEFAULT_PING_INTERVAL;
509
509
  this.pongTimeoutMs = config.pongTimeout ?? DEFAULT_PONG_TIMEOUT;
510
- if (config.autoConnect !== false) {
510
+ if (config.autoConnect !== false && typeof window !== "undefined") {
511
511
  this.connect();
512
512
  }
513
513
  }
@@ -515,6 +515,7 @@ var PredictWsClient = class {
515
515
  // Connection management
516
516
  // -------------------------------------------------------------------------
517
517
  connect() {
518
+ if (typeof window === "undefined") return;
518
519
  if (this.ws && (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING)) {
519
520
  return;
520
521
  }