@liberfi.io/react-predict 0.1.64 → 0.1.65
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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{server-BJChohWB.d.mts → server-DsjYCQiB.d.mts} +12 -3
- package/dist/{server-BJChohWB.d.ts → server-DsjYCQiB.d.ts} +12 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +2 -2
- 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 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 TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-
|
|
2
|
-
export { b5 as BuildClobAuthMessageInput,
|
|
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 TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-DsjYCQiB.mjs';
|
|
2
|
+
export { b5 as BuildClobAuthMessageInput, bj as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, bi as ClobOrderPayload, ai as DFlowOrderContext, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, ac as EventSummary, b2 as HttpMethod, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, at as MatchGroupEntry, au as MatchGroupMarket, ay as MatchMarketFlat, av as MatchSortField, as as MatchStatus, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bk as OrderMessage, ah as OrderSide, ag as OrderStatus, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, aq as PolymarketWithdrawPrepareRequest, ar as PolymarketWithdrawPrepareResponse, af as PredictPosition, a5 as PredictTag, a3 as PredictWsClientConfig, ae as PricePoint, a4 as ProviderMeta, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bl as SignedOrder, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, aH as WsErrorCode, aI as WsErrorMessage, aD as WsPingMessage, aF as WsPongMessage, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, bh as getPolymarketSharesPrecision, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-DsjYCQiB.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 TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-
|
|
2
|
-
export { b5 as BuildClobAuthMessageInput,
|
|
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 TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-DsjYCQiB.js';
|
|
2
|
+
export { b5 as BuildClobAuthMessageInput, bj as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, bi as ClobOrderPayload, ai as DFlowOrderContext, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, ac as EventSummary, b2 as HttpMethod, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, at as MatchGroupEntry, au as MatchGroupMarket, ay as MatchMarketFlat, av as MatchSortField, as as MatchStatus, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bk as OrderMessage, ah as OrderSide, ag as OrderStatus, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, aq as PolymarketWithdrawPrepareRequest, ar as PolymarketWithdrawPrepareResponse, af as PredictPosition, a5 as PredictTag, a3 as PredictWsClientConfig, ae as PricePoint, a4 as ProviderMeta, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bl as SignedOrder, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, aH as WsErrorCode, aI as WsErrorMessage, aD as WsPingMessage, aF as WsPongMessage, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, bh as getPolymarketSharesPrecision, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-DsjYCQiB.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
|
@@ -2024,8 +2024,8 @@ var SIDE = { BUY: 0, SELL: 1 };
|
|
|
2024
2024
|
var ROUNDING_CONFIG = {
|
|
2025
2025
|
"0.1": { size: 2, price: 1, amount: 3 },
|
|
2026
2026
|
"0.01": { size: 2, price: 2, amount: 4 },
|
|
2027
|
-
"0.001": { size:
|
|
2028
|
-
"0.0001": { size:
|
|
2027
|
+
"0.001": { size: 2, price: 3, amount: 5 },
|
|
2028
|
+
"0.0001": { size: 2, price: 4, amount: 6 }
|
|
2029
2029
|
};
|
|
2030
2030
|
var DEFAULT_ROUNDING = { size: 2, price: 2, amount: 4 };
|
|
2031
2031
|
function decimalPlaces(n, d) {
|
|
@@ -2132,6 +2132,10 @@ function buildClobPayload(signedOrder, owner) {
|
|
|
2132
2132
|
deferExec: false
|
|
2133
2133
|
};
|
|
2134
2134
|
}
|
|
2135
|
+
function getPolymarketSharesPrecision(tickSize) {
|
|
2136
|
+
const rc = ROUNDING_CONFIG[tickSize] ?? DEFAULT_ROUNDING;
|
|
2137
|
+
return rc.size;
|
|
2138
|
+
}
|
|
2135
2139
|
|
|
2136
2140
|
// src/hooks/polymarket/useCreatePolymarketOrder.ts
|
|
2137
2141
|
var TX_POLL_INTERVAL2 = 3e3;
|
|
@@ -2269,6 +2273,7 @@ exports.fetchEventsPage = fetchEventsPage;
|
|
|
2269
2273
|
exports.fetchMarket = fetchMarket;
|
|
2270
2274
|
exports.fetchMatchMarketsPage = fetchMatchMarketsPage;
|
|
2271
2275
|
exports.fetchMatchesPage = fetchMatchesPage;
|
|
2276
|
+
exports.getPolymarketSharesPrecision = getPolymarketSharesPrecision;
|
|
2272
2277
|
exports.hmacSha256Base64 = hmacSha256Base64;
|
|
2273
2278
|
exports.infiniteEventsQueryKey = infiniteEventsQueryKey;
|
|
2274
2279
|
exports.infiniteOrdersQueryKey = infiniteOrdersQueryKey;
|