@liberfi.io/react-predict 0.3.45 → 0.3.47
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{server-BYvRRFCr.d.mts → server-Byq4PK9C.d.mts} +37 -1
- package/dist/{server-BYvRRFCr.d.ts → server-Byq4PK9C.d.ts} +37 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +11 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +12 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
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 OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-
|
|
2
|
-
export {
|
|
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 OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-Byq4PK9C.mjs';
|
|
2
|
+
export { bz as BuildClobAuthMessageInput, bN as BuildOrderMessageInput, bq as CLOB_AUTH_DOMAIN, br as CLOB_AUTH_TYPES, bA as CTF_EXCHANGE_ADDRESS, bF as CTF_ORDER_TYPES, bM as ClobOrderPayload, aD as DFlowOrderContext, aH as DepositBuildRequest, aI as DepositBuildResponse, aL as DepositStatusResponse, aJ as DepositSubmitRequest, aK as DepositSubmitResponse, aw as EventSummary, bw as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, ax as MarketSummary, aW as MatchConfidenceTier, aS as MatchGroupEntry, aT as MatchGroupMarket, aY as MatchLeg, aZ as MatchMarketFlat, aU as MatchSortField, aR as MatchStatus, aV as MatchesStats, bB as NEG_RISK_CTF_EXCHANGE_ADDRESS, bG as ORDER_TYPE, bO as OrderMessage, aC as OrderSide, aB as OrderStatus, ar as OrderbookBatchItem, as as OrderbookBatchResult, aq as OrderbookLevel, at as OrderbooksBatchRequest, au as OrderbooksBatchResponse, bD as POLYGON_CHAIN_ID, aN as PolymarketBridgeToken, aG as PolymarketDepositWalletDeployRequest, by as PolymarketL2Headers, bx as PolymarketL2HeadersInput, aE as PolymarketOrderType, ba as PolymarketRedeemInput, b8 as PolymarketRedeemPrepareInput, b9 as PolymarketRedeemPrepareResponse, aO as PolymarketSupportedAssetsResponse, aP as PolymarketTypedData, aQ as PolymarketTypedDataArg, aF as PolymarketWalletKind, ay as PredictCommentProfile, aA as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, az as PricePoint, ak as ProviderMeta, bh as ResolveEventsParamsInput, bH as SIDE, am as SettlementSource, aX as SignalTag, bP as SignedOrder, bi as TagSlugSelection, av as TradeType, bC as USDC_ADDRESS, aM as UnsignedTx, a_ as WsChannel, a$ as WsChannelEvent, b0 as WsClientMessage, b6 as WsErrorCode, b7 as WsErrorMessage, b2 as WsPingMessage, b4 as WsPongMessage, b3 as WsServerMessage, b1 as WsSubscribeMessage, b5 as WsSubscribedMessage, bs as buildClobAuthMessage, bK as buildClobPayload, bE as buildCtfExchangeDomain, bI as buildOrderMessage, bu as buildPolymarketL2Headers, bJ as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, bv as derivePolymarketApiKey, bb as eventQueryKey, bc as fetchEvent, bg as fetchEventsPage, bk as fetchMarket, bp as fetchMatchMarketsPage, bn as fetchMatchesPage, bL as getPolymarketSharesPrecision, bt as hmacSha256Base64, bf as infiniteEventsQueryKey, bj as marketQueryKey, bo as matchMarketsQueryKey, bm as matchQueryKey, bl as matchesQueryKey, be as resolveEventsParams, bd as resolveTagSlug } from './server-Byq4PK9C.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 OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-
|
|
2
|
-
export {
|
|
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 OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-Byq4PK9C.js';
|
|
2
|
+
export { bz as BuildClobAuthMessageInput, bN as BuildOrderMessageInput, bq as CLOB_AUTH_DOMAIN, br as CLOB_AUTH_TYPES, bA as CTF_EXCHANGE_ADDRESS, bF as CTF_ORDER_TYPES, bM as ClobOrderPayload, aD as DFlowOrderContext, aH as DepositBuildRequest, aI as DepositBuildResponse, aL as DepositStatusResponse, aJ as DepositSubmitRequest, aK as DepositSubmitResponse, aw as EventSummary, bw as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, ax as MarketSummary, aW as MatchConfidenceTier, aS as MatchGroupEntry, aT as MatchGroupMarket, aY as MatchLeg, aZ as MatchMarketFlat, aU as MatchSortField, aR as MatchStatus, aV as MatchesStats, bB as NEG_RISK_CTF_EXCHANGE_ADDRESS, bG as ORDER_TYPE, bO as OrderMessage, aC as OrderSide, aB as OrderStatus, ar as OrderbookBatchItem, as as OrderbookBatchResult, aq as OrderbookLevel, at as OrderbooksBatchRequest, au as OrderbooksBatchResponse, bD as POLYGON_CHAIN_ID, aN as PolymarketBridgeToken, aG as PolymarketDepositWalletDeployRequest, by as PolymarketL2Headers, bx as PolymarketL2HeadersInput, aE as PolymarketOrderType, ba as PolymarketRedeemInput, b8 as PolymarketRedeemPrepareInput, b9 as PolymarketRedeemPrepareResponse, aO as PolymarketSupportedAssetsResponse, aP as PolymarketTypedData, aQ as PolymarketTypedDataArg, aF as PolymarketWalletKind, ay as PredictCommentProfile, aA as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, az as PricePoint, ak as ProviderMeta, bh as ResolveEventsParamsInput, bH as SIDE, am as SettlementSource, aX as SignalTag, bP as SignedOrder, bi as TagSlugSelection, av as TradeType, bC as USDC_ADDRESS, aM as UnsignedTx, a_ as WsChannel, a$ as WsChannelEvent, b0 as WsClientMessage, b6 as WsErrorCode, b7 as WsErrorMessage, b2 as WsPingMessage, b4 as WsPongMessage, b3 as WsServerMessage, b1 as WsSubscribeMessage, b5 as WsSubscribedMessage, bs as buildClobAuthMessage, bK as buildClobPayload, bE as buildCtfExchangeDomain, bI as buildOrderMessage, bu as buildPolymarketL2Headers, bJ as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, bv as derivePolymarketApiKey, bb as eventQueryKey, bc as fetchEvent, bg as fetchEventsPage, bk as fetchMarket, bp as fetchMatchMarketsPage, bn as fetchMatchesPage, bL as getPolymarketSharesPrecision, bt as hmacSha256Base64, bf as infiniteEventsQueryKey, bj as marketQueryKey, bo as matchMarketsQueryKey, bm as matchQueryKey, bl as matchesQueryKey, be as resolveEventsParams, bd as resolveTagSlug } from './server-Byq4PK9C.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
|
@@ -115,6 +115,17 @@ var PredictClient = class {
|
|
|
115
115
|
const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/orderbook${query}`;
|
|
116
116
|
return await utils.httpGet(url);
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Maps to `POST /api/v1/markets/orderbooks`.
|
|
120
|
+
* Fetches order books for many markets in a single request (max 100 items).
|
|
121
|
+
* Results are returned in the same order as `items`; per-item failures are
|
|
122
|
+
* reported via `OrderbookBatchResult.error` and never fail the whole batch.
|
|
123
|
+
*/
|
|
124
|
+
async getOrderbooks(items) {
|
|
125
|
+
const url = `${this.endpoint}/api/v1/markets/orderbooks`;
|
|
126
|
+
const res = await utils.httpPost(url, { items });
|
|
127
|
+
return res.results;
|
|
128
|
+
}
|
|
118
129
|
/** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
|
|
119
130
|
async listMarketTrades(slug, params) {
|
|
120
131
|
const query = buildQuery(params);
|