@liberfi.io/react-predict 0.3.62 → 0.3.63
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 +11 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{server-BW_QhQos.d.mts → server-Dk8PqvnI.d.mts} +21 -2
- package/dist/{server-BW_QhQos.d.ts → server-Dk8PqvnI.d.ts} +21 -2
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +2 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +4 -4
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, q as PositionValueResponse, A as AvailableSharesResponse, B as BalanceResponse, r as ListOrdersParams, s as PredictOrder, t as ListOrdersMultiParams, u as PredictOrdersResponse, v as CancelOrderResult, M as MatchesParams, w as MatchGroupPage, x as MatchGroup, y as MatchMarketParams, z as MatchMarketPage, D as ListTradesParams, F as ListTradesMultiParams, G as DFlowQuoteRequest, H as DFlowQuoteResponse, I as DFlowSubmitResponse, J as DFlowSubmitRequest, K as DFlowKYCStatus, N as PolymarketSetupStatus, Q as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, R as WithdrawBuildRequest, T as WithdrawSubmitResponse, U as WithdrawSubmitRequest, V as WithdrawStatusResponse, X as PolymarketDepositAddresses, Y as PolymarketSupportedAsset, Z as PolymarketWithdrawResponse, _ as PolymarketWithdrawRequest, $ as PolymarketWithdrawPrepareResponse, a0 as PolymarketWithdrawPrepareRequest, a1 as PolymarketWithdrawQuoteResponse, a2 as PolymarketWithdrawQuoteRequest, a3 as PolymarketWithdrawRelayBuildResponse, a4 as PolymarketWithdrawRelayBuildRequest, a5 as PolymarketWithdrawRelaySubmitResponse, a6 as PolymarketWithdrawRelaySubmitRequest, a7 as PolymarketWithdrawBridgeStatusResponse, a8 as PolymarketRedeemResponse, a9 as PolymarketTypedData, aa as TickSizeResponse, ab as FeeRateResponse, ac as RebateConfig, ad as WsConnectionStatus, ae as WsDataMessage, af as WsPriceEvent, ag as WsOrderbookEvent, ah as WsTradeEvent, ai 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, q as PositionValueResponse, A as AvailableSharesResponse, B as BalanceResponse, r as ListOrdersParams, s as PredictOrder, t as ListOrdersMultiParams, u as PredictOrdersResponse, v as CancelOrderResult, M as MatchesParams, w as MatchGroupPage, x as MatchGroup, y as MatchMarketParams, z as MatchMarketPage, D as ListTradesParams, F as ListTradesMultiParams, G as DFlowQuoteRequest, H as DFlowQuoteResponse, I as DFlowSubmitResponse, J as DFlowSubmitRequest, K as DFlowKYCStatus, N as PolymarketSetupStatus, Q as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, R as WithdrawBuildRequest, T as WithdrawSubmitResponse, U as WithdrawSubmitRequest, V as WithdrawStatusResponse, X as PolymarketDepositAddresses, Y as PolymarketSupportedAsset, Z as PolymarketWithdrawResponse, _ as PolymarketWithdrawRequest, $ as PolymarketWithdrawPrepareResponse, a0 as PolymarketWithdrawPrepareRequest, a1 as PolymarketWithdrawQuoteResponse, a2 as PolymarketWithdrawQuoteRequest, a3 as PolymarketWithdrawRelayBuildResponse, a4 as PolymarketWithdrawRelayBuildRequest, a5 as PolymarketWithdrawRelaySubmitResponse, a6 as PolymarketWithdrawRelaySubmitRequest, a7 as PolymarketWithdrawBridgeStatusResponse, a8 as PolymarketRedeemResponse, a9 as PolymarketTypedData, aa as TickSizeResponse, ab as FeeRateResponse, ac as RebateConfig, ad as WsConnectionStatus, ae as WsDataMessage, af as WsPriceEvent, ag as WsOrderbookEvent, ah as WsTradeEvent, ai as CreateOrderInput } from './server-Dk8PqvnI.mjs';
|
|
2
|
+
export { bE as BuildClobAuthMessageInput, bT as BuildOrderMessageInput, bv as CLOB_AUTH_DOMAIN, bw as CLOB_AUTH_TYPES, bF as CTF_EXCHANGE_ADDRESS, bK as CTF_ORDER_TYPES, bS as ClobOrderPayload, aI as DFlowOrderContext, aN as DepositBuildRequest, aO as DepositBuildResponse, aR as DepositStatusResponse, aP as DepositSubmitRequest, aQ as DepositSubmitResponse, az as EventSummary, bB as HttpMethod, as as MarketOutcome, ar as MarketResult, aq as MarketStatus, aA as MarketSummary, a$ as MatchConfidenceTier, aX as MatchGroupEntry, aY as MatchGroupMarket, b1 as MatchLeg, b2 as MatchMarketFlat, aZ as MatchSortField, aW as MatchStatus, a_ as MatchesStats, bG as NEG_RISK_CTF_EXCHANGE_ADDRESS, bL as ORDER_TYPE, bU as OrderMessage, aH as OrderSide, aG as OrderStatus, au as OrderbookBatchItem, av as OrderbookBatchResult, at as OrderbookLevel, aw as OrderbooksBatchRequest, ax as OrderbooksBatchResponse, bI as POLYGON_CHAIN_ID, aT as PolymarketBridgeToken, aM as PolymarketDepositWalletDeployRequest, bD as PolymarketL2Headers, bC as PolymarketL2HeadersInput, aJ as PolymarketOrderType, bf as PolymarketRedeemInput, bd as PolymarketRedeemPrepareInput, be as PolymarketRedeemPrepareResponse, aU as PolymarketSupportedAssetsResponse, aK as PolymarketTickSize, aV as PolymarketTypedDataArg, aL as PolymarketWalletKind, aE as PositionValue, aF as PositionValueError, ak as PredictClientOptions, aB as PredictCommentProfile, aD as PredictPosition, ao as PredictTag, am as PredictWsClientConfig, aC as PricePoint, an as ProviderMeta, bm as ResolveEventsParamsInput, bM as SIDE, ap as SettlementSource, b0 as SignalTag, bV as SignedOrder, bn as TagSlugSelection, ay as TradeType, bH as USDC_ADDRESS, aS as UnsignedTx, b3 as WsChannel, b4 as WsChannelEvent, b5 as WsClientMessage, bb as WsErrorCode, bc as WsErrorMessage, b7 as WsPingMessage, b9 as WsPongMessage, b8 as WsServerMessage, b6 as WsSubscribeMessage, ba as WsSubscribedMessage, bx as buildClobAuthMessage, bP as buildClobPayload, bJ as buildCtfExchangeDomain, bN as buildOrderMessage, bz as buildPolymarketL2Headers, bO as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bA as derivePolymarketApiKey, bg as eventQueryKey, bh as fetchEvent, bl as fetchEventsPage, bp as fetchMarket, bu as fetchMatchMarketsPage, bs as fetchMatchesPage, bQ as getPolymarketSharesPrecision, by as hmacSha256Base64, bk as infiniteEventsQueryKey, bo as marketQueryKey, bt as matchMarketsQueryKey, br as matchQueryKey, bq as matchesQueryKey, bR as normalizePolymarketTickSize, bj as resolveEventsParams, bi as resolveTagSlug } from './server-Dk8PqvnI.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, q as PositionValueResponse, A as AvailableSharesResponse, B as BalanceResponse, r as ListOrdersParams, s as PredictOrder, t as ListOrdersMultiParams, u as PredictOrdersResponse, v as CancelOrderResult, M as MatchesParams, w as MatchGroupPage, x as MatchGroup, y as MatchMarketParams, z as MatchMarketPage, D as ListTradesParams, F as ListTradesMultiParams, G as DFlowQuoteRequest, H as DFlowQuoteResponse, I as DFlowSubmitResponse, J as DFlowSubmitRequest, K as DFlowKYCStatus, N as PolymarketSetupStatus, Q as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, R as WithdrawBuildRequest, T as WithdrawSubmitResponse, U as WithdrawSubmitRequest, V as WithdrawStatusResponse, X as PolymarketDepositAddresses, Y as PolymarketSupportedAsset, Z as PolymarketWithdrawResponse, _ as PolymarketWithdrawRequest, $ as PolymarketWithdrawPrepareResponse, a0 as PolymarketWithdrawPrepareRequest, a1 as PolymarketWithdrawQuoteResponse, a2 as PolymarketWithdrawQuoteRequest, a3 as PolymarketWithdrawRelayBuildResponse, a4 as PolymarketWithdrawRelayBuildRequest, a5 as PolymarketWithdrawRelaySubmitResponse, a6 as PolymarketWithdrawRelaySubmitRequest, a7 as PolymarketWithdrawBridgeStatusResponse, a8 as PolymarketRedeemResponse, a9 as PolymarketTypedData, aa as TickSizeResponse, ab as FeeRateResponse, ac as RebateConfig, ad as WsConnectionStatus, ae as WsDataMessage, af as WsPriceEvent, ag as WsOrderbookEvent, ah as WsTradeEvent, ai 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, q as PositionValueResponse, A as AvailableSharesResponse, B as BalanceResponse, r as ListOrdersParams, s as PredictOrder, t as ListOrdersMultiParams, u as PredictOrdersResponse, v as CancelOrderResult, M as MatchesParams, w as MatchGroupPage, x as MatchGroup, y as MatchMarketParams, z as MatchMarketPage, D as ListTradesParams, F as ListTradesMultiParams, G as DFlowQuoteRequest, H as DFlowQuoteResponse, I as DFlowSubmitResponse, J as DFlowSubmitRequest, K as DFlowKYCStatus, N as PolymarketSetupStatus, Q as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, R as WithdrawBuildRequest, T as WithdrawSubmitResponse, U as WithdrawSubmitRequest, V as WithdrawStatusResponse, X as PolymarketDepositAddresses, Y as PolymarketSupportedAsset, Z as PolymarketWithdrawResponse, _ as PolymarketWithdrawRequest, $ as PolymarketWithdrawPrepareResponse, a0 as PolymarketWithdrawPrepareRequest, a1 as PolymarketWithdrawQuoteResponse, a2 as PolymarketWithdrawQuoteRequest, a3 as PolymarketWithdrawRelayBuildResponse, a4 as PolymarketWithdrawRelayBuildRequest, a5 as PolymarketWithdrawRelaySubmitResponse, a6 as PolymarketWithdrawRelaySubmitRequest, a7 as PolymarketWithdrawBridgeStatusResponse, a8 as PolymarketRedeemResponse, a9 as PolymarketTypedData, aa as TickSizeResponse, ab as FeeRateResponse, ac as RebateConfig, ad as WsConnectionStatus, ae as WsDataMessage, af as WsPriceEvent, ag as WsOrderbookEvent, ah as WsTradeEvent, ai as CreateOrderInput } from './server-Dk8PqvnI.js';
|
|
2
|
+
export { bE as BuildClobAuthMessageInput, bT as BuildOrderMessageInput, bv as CLOB_AUTH_DOMAIN, bw as CLOB_AUTH_TYPES, bF as CTF_EXCHANGE_ADDRESS, bK as CTF_ORDER_TYPES, bS as ClobOrderPayload, aI as DFlowOrderContext, aN as DepositBuildRequest, aO as DepositBuildResponse, aR as DepositStatusResponse, aP as DepositSubmitRequest, aQ as DepositSubmitResponse, az as EventSummary, bB as HttpMethod, as as MarketOutcome, ar as MarketResult, aq as MarketStatus, aA as MarketSummary, a$ as MatchConfidenceTier, aX as MatchGroupEntry, aY as MatchGroupMarket, b1 as MatchLeg, b2 as MatchMarketFlat, aZ as MatchSortField, aW as MatchStatus, a_ as MatchesStats, bG as NEG_RISK_CTF_EXCHANGE_ADDRESS, bL as ORDER_TYPE, bU as OrderMessage, aH as OrderSide, aG as OrderStatus, au as OrderbookBatchItem, av as OrderbookBatchResult, at as OrderbookLevel, aw as OrderbooksBatchRequest, ax as OrderbooksBatchResponse, bI as POLYGON_CHAIN_ID, aT as PolymarketBridgeToken, aM as PolymarketDepositWalletDeployRequest, bD as PolymarketL2Headers, bC as PolymarketL2HeadersInput, aJ as PolymarketOrderType, bf as PolymarketRedeemInput, bd as PolymarketRedeemPrepareInput, be as PolymarketRedeemPrepareResponse, aU as PolymarketSupportedAssetsResponse, aK as PolymarketTickSize, aV as PolymarketTypedDataArg, aL as PolymarketWalletKind, aE as PositionValue, aF as PositionValueError, ak as PredictClientOptions, aB as PredictCommentProfile, aD as PredictPosition, ao as PredictTag, am as PredictWsClientConfig, aC as PricePoint, an as ProviderMeta, bm as ResolveEventsParamsInput, bM as SIDE, ap as SettlementSource, b0 as SignalTag, bV as SignedOrder, bn as TagSlugSelection, ay as TradeType, bH as USDC_ADDRESS, aS as UnsignedTx, b3 as WsChannel, b4 as WsChannelEvent, b5 as WsClientMessage, bb as WsErrorCode, bc as WsErrorMessage, b7 as WsPingMessage, b9 as WsPongMessage, b8 as WsServerMessage, b6 as WsSubscribeMessage, ba as WsSubscribedMessage, bx as buildClobAuthMessage, bP as buildClobPayload, bJ as buildCtfExchangeDomain, bN as buildOrderMessage, bz as buildPolymarketL2Headers, bO as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bA as derivePolymarketApiKey, bg as eventQueryKey, bh as fetchEvent, bl as fetchEventsPage, bp as fetchMarket, bu as fetchMatchMarketsPage, bs as fetchMatchesPage, bQ as getPolymarketSharesPrecision, by as hmacSha256Base64, bk as infiniteEventsQueryKey, bo as marketQueryKey, bt as matchMarketsQueryKey, br as matchQueryKey, bq as matchesQueryKey, bR as normalizePolymarketTickSize, bj as resolveEventsParams, bi as resolveTagSlug } from './server-Dk8PqvnI.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
|
@@ -2886,10 +2886,20 @@ var SIDE = { BUY: 0, SELL: 1 };
|
|
|
2886
2886
|
var ROUNDING_CONFIG = {
|
|
2887
2887
|
"0.1": { size: 2, price: 1, amount: 3 },
|
|
2888
2888
|
"0.01": { size: 2, price: 2, amount: 4 },
|
|
2889
|
+
"0.005": { size: 2, price: 3, amount: 5 },
|
|
2890
|
+
"0.0025": { size: 2, price: 4, amount: 6 },
|
|
2889
2891
|
"0.001": { size: 2, price: 3, amount: 5 },
|
|
2890
2892
|
"0.0001": { size: 2, price: 4, amount: 6 }
|
|
2891
2893
|
};
|
|
2892
2894
|
var DEFAULT_ROUNDING = { size: 2, price: 2, amount: 4 };
|
|
2895
|
+
function normalizePolymarketTickSize(raw) {
|
|
2896
|
+
const value = typeof raw === "string" ? parseFloat(raw) : raw;
|
|
2897
|
+
if (value == null || !Number.isFinite(value) || value <= 0) return "0.01";
|
|
2898
|
+
for (const tick of Object.keys(ROUNDING_CONFIG)) {
|
|
2899
|
+
if (Math.abs(parseFloat(tick) - value) < 1e-9) return tick;
|
|
2900
|
+
}
|
|
2901
|
+
return "0.01";
|
|
2902
|
+
}
|
|
2893
2903
|
function decimalPlaces(n, d) {
|
|
2894
2904
|
return parseFloat(n.toFixed(d));
|
|
2895
2905
|
}
|
|
@@ -3329,6 +3339,7 @@ exports.marketTradesQueryKey = marketTradesQueryKey;
|
|
|
3329
3339
|
exports.matchMarketsQueryKey = matchMarketsQueryKey;
|
|
3330
3340
|
exports.matchQueryKey = matchQueryKey;
|
|
3331
3341
|
exports.matchesQueryKey = matchesQueryKey;
|
|
3342
|
+
exports.normalizePolymarketTickSize = normalizePolymarketTickSize;
|
|
3332
3343
|
exports.orderQueryKey = orderQueryKey;
|
|
3333
3344
|
exports.orderbookQueryKey = orderbookQueryKey;
|
|
3334
3345
|
exports.ordersMultiQueryKey = ordersMultiQueryKey;
|