@liberfi.io/react-predict 0.2.36 → 0.3.0
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 +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{server-rd8X_X_4.d.mts → server-D2N-KDxj.d.mts} +47 -1
- package/dist/{server-rd8X_X_4.d.ts → server-D2N-KDxj.d.ts} +47 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +13 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +13 -0
- 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
|
|
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 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 PolymarketSupportedAsset, T as PolymarketWithdrawResponse, U as PolymarketWithdrawRequest, V as PolymarketRedeemResponse, X as TickSizeResponse, Y as FeeRateResponse, Z as WsConnectionStatus, _ as WsDataMessage, $ as WsPriceEvent, a0 as WsOrderbookEvent, a1 as WsTradeEvent, a2 as CreateOrderInput } from './server-D2N-KDxj.mjs';
|
|
2
|
+
export { be as BuildClobAuthMessageInput, bs as BuildOrderMessageInput, b5 as CLOB_AUTH_DOMAIN, b6 as CLOB_AUTH_TYPES, bf as CTF_EXCHANGE_ADDRESS, bk as CTF_ORDER_TYPES, br as ClobOrderPayload, ak as DFlowOrderContext, am as DepositBuildRequest, an as DepositBuildResponse, aq as DepositStatusResponse, ao as DepositSubmitRequest, ap as DepositSubmitResponse, ae as EventSummary, bb as HttpMethod, ab as MarketOutcome, aa as MarketResult, a9 as MarketStatus, af as MarketSummary, aB as MatchConfidenceTier, ax as MatchGroupEntry, ay as MatchGroupMarket, aD as MatchLeg, aE as MatchMarketFlat, az as MatchSortField, aw as MatchStatus, aA as MatchesStats, bg as NEG_RISK_CTF_EXCHANGE_ADDRESS, bl as ORDER_TYPE, bt as OrderMessage, aj as OrderSide, ai as OrderStatus, ac as OrderbookLevel, bi as POLYGON_CHAIN_ID, as as PolymarketBridgeToken, bd as PolymarketL2Headers, bc as PolymarketL2HeadersInput, al as PolymarketOrderType, aR as PolymarketRedeemInput, aP as PolymarketRedeemPrepareInput, aQ as PolymarketRedeemPrepareResponse, at as PolymarketSupportedAssetsResponse, au as PolymarketWithdrawPrepareRequest, av as PolymarketWithdrawPrepareResponse, ah as PredictPosition, a7 as PredictTag, a5 as PredictWsClientConfig, ag as PricePoint, a6 as ProviderMeta, aY as ResolveEventsParamsInput, bm as SIDE, a8 as SettlementSource, aC as SignalTag, bu as SignedOrder, aZ as TagSlugSelection, ad as TradeType, bh as USDC_ADDRESS, ar as UnsignedTx, aF as WsChannel, aG as WsChannelEvent, aH as WsClientMessage, aN as WsErrorCode, aO as WsErrorMessage, aJ as WsPingMessage, aL as WsPongMessage, aK as WsServerMessage, aI as WsSubscribeMessage, aM as WsSubscribedMessage, b7 as buildClobAuthMessage, bp as buildClobPayload, bj as buildCtfExchangeDomain, bn as buildOrderMessage, b9 as buildPolymarketL2Headers, bo as buildSignedOrder, a3 as createPredictClient, a4 as createPredictWsClient, ba as derivePolymarketApiKey, aS as eventQueryKey, aT as fetchEvent, aX as fetchEventsPage, a$ as fetchMarket, b4 as fetchMatchMarketsPage, b2 as fetchMatchesPage, bq as getPolymarketSharesPrecision, b8 as hmacSha256Base64, aW as infiniteEventsQueryKey, a_ as marketQueryKey, b3 as matchMarketsQueryKey, b1 as matchQueryKey, b0 as matchesQueryKey, aV as resolveEventsParams, aU as resolveTagSlug } from './server-D2N-KDxj.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';
|
|
@@ -597,6 +597,27 @@ declare const polymarketDepositAddressesQueryKey: (safeAddress: string) => reado
|
|
|
597
597
|
*/
|
|
598
598
|
declare function usePolymarketDepositAddresses(safeAddress: string | undefined): _tanstack_react_query.UseQueryResult<PolymarketDepositAddresses, Error>;
|
|
599
599
|
|
|
600
|
+
/**
|
|
601
|
+
* React-Query key for the Polymarket Bridge supported-assets list.
|
|
602
|
+
*
|
|
603
|
+
* The query is parameter-less because the list is identical for every caller.
|
|
604
|
+
*/
|
|
605
|
+
declare const polymarketSupportedAssetsQueryKey: () => readonly ["polymarket", "supported-assets"];
|
|
606
|
+
/**
|
|
607
|
+
* Fetch the Polymarket Bridge supported (chain, token) tuples and their
|
|
608
|
+
* minimum USD deposit amounts.
|
|
609
|
+
*
|
|
610
|
+
* The underlying list is essentially static (changes when the bridge adds /
|
|
611
|
+
* removes a chain or token), so this query uses generous cache settings:
|
|
612
|
+
*
|
|
613
|
+
* - `staleTime: 15 minutes` — matches the prediction-server in-process TTL.
|
|
614
|
+
* - `gcTime: 1 hour` — keeps the data available across modal open/close cycles.
|
|
615
|
+
*
|
|
616
|
+
* Common downstream usage is to filter by `chainId` to derive a single chain's
|
|
617
|
+
* minimum deposit amount and supported token symbols.
|
|
618
|
+
*/
|
|
619
|
+
declare function usePolymarketSupportedAssets(): _tanstack_react_query.UseQueryResult<PolymarketSupportedAsset[], Error>;
|
|
620
|
+
|
|
600
621
|
/**
|
|
601
622
|
* Mutation hook to execute a gasless USDC.e withdrawal from a Polymarket Safe
|
|
602
623
|
* wallet via the Relayer.
|
|
@@ -972,4 +993,4 @@ interface WalkOrderbookParams {
|
|
|
972
993
|
*/
|
|
973
994
|
declare function walkOrderbook({ orderbook, outcome, side, sharesNeeded, slippageBps, }: WalkOrderbookParams): WalkResult;
|
|
974
995
|
|
|
975
|
-
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, PolymarketRedeemResponse, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, type RedeemPositionVariables, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, 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, type WalkOrderbookParams, type WalkOutcome, type WalkResult, type WalkSide, type WalkStatus, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, pickBestAsk, pickBestBid, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRedeemPosition, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, walkOrderbook, withdrawStatusQueryKey };
|
|
996
|
+
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, PolymarketRedeemResponse, type PolymarketSigner, PolymarketSupportedAsset, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, type RedeemPositionVariables, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, 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, type WalkOrderbookParams, type WalkOutcome, type WalkResult, type WalkSide, type WalkStatus, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, pickBestAsk, pickBestBid, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, polymarketSupportedAssetsQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketSupportedAssets, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRedeemPosition, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, walkOrderbook, 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 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
|
|
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 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 PolymarketSupportedAsset, T as PolymarketWithdrawResponse, U as PolymarketWithdrawRequest, V as PolymarketRedeemResponse, X as TickSizeResponse, Y as FeeRateResponse, Z as WsConnectionStatus, _ as WsDataMessage, $ as WsPriceEvent, a0 as WsOrderbookEvent, a1 as WsTradeEvent, a2 as CreateOrderInput } from './server-D2N-KDxj.js';
|
|
2
|
+
export { be as BuildClobAuthMessageInput, bs as BuildOrderMessageInput, b5 as CLOB_AUTH_DOMAIN, b6 as CLOB_AUTH_TYPES, bf as CTF_EXCHANGE_ADDRESS, bk as CTF_ORDER_TYPES, br as ClobOrderPayload, ak as DFlowOrderContext, am as DepositBuildRequest, an as DepositBuildResponse, aq as DepositStatusResponse, ao as DepositSubmitRequest, ap as DepositSubmitResponse, ae as EventSummary, bb as HttpMethod, ab as MarketOutcome, aa as MarketResult, a9 as MarketStatus, af as MarketSummary, aB as MatchConfidenceTier, ax as MatchGroupEntry, ay as MatchGroupMarket, aD as MatchLeg, aE as MatchMarketFlat, az as MatchSortField, aw as MatchStatus, aA as MatchesStats, bg as NEG_RISK_CTF_EXCHANGE_ADDRESS, bl as ORDER_TYPE, bt as OrderMessage, aj as OrderSide, ai as OrderStatus, ac as OrderbookLevel, bi as POLYGON_CHAIN_ID, as as PolymarketBridgeToken, bd as PolymarketL2Headers, bc as PolymarketL2HeadersInput, al as PolymarketOrderType, aR as PolymarketRedeemInput, aP as PolymarketRedeemPrepareInput, aQ as PolymarketRedeemPrepareResponse, at as PolymarketSupportedAssetsResponse, au as PolymarketWithdrawPrepareRequest, av as PolymarketWithdrawPrepareResponse, ah as PredictPosition, a7 as PredictTag, a5 as PredictWsClientConfig, ag as PricePoint, a6 as ProviderMeta, aY as ResolveEventsParamsInput, bm as SIDE, a8 as SettlementSource, aC as SignalTag, bu as SignedOrder, aZ as TagSlugSelection, ad as TradeType, bh as USDC_ADDRESS, ar as UnsignedTx, aF as WsChannel, aG as WsChannelEvent, aH as WsClientMessage, aN as WsErrorCode, aO as WsErrorMessage, aJ as WsPingMessage, aL as WsPongMessage, aK as WsServerMessage, aI as WsSubscribeMessage, aM as WsSubscribedMessage, b7 as buildClobAuthMessage, bp as buildClobPayload, bj as buildCtfExchangeDomain, bn as buildOrderMessage, b9 as buildPolymarketL2Headers, bo as buildSignedOrder, a3 as createPredictClient, a4 as createPredictWsClient, ba as derivePolymarketApiKey, aS as eventQueryKey, aT as fetchEvent, aX as fetchEventsPage, a$ as fetchMarket, b4 as fetchMatchMarketsPage, b2 as fetchMatchesPage, bq as getPolymarketSharesPrecision, b8 as hmacSha256Base64, aW as infiniteEventsQueryKey, a_ as marketQueryKey, b3 as matchMarketsQueryKey, b1 as matchQueryKey, b0 as matchesQueryKey, aV as resolveEventsParams, aU as resolveTagSlug } from './server-D2N-KDxj.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';
|
|
@@ -597,6 +597,27 @@ declare const polymarketDepositAddressesQueryKey: (safeAddress: string) => reado
|
|
|
597
597
|
*/
|
|
598
598
|
declare function usePolymarketDepositAddresses(safeAddress: string | undefined): _tanstack_react_query.UseQueryResult<PolymarketDepositAddresses, Error>;
|
|
599
599
|
|
|
600
|
+
/**
|
|
601
|
+
* React-Query key for the Polymarket Bridge supported-assets list.
|
|
602
|
+
*
|
|
603
|
+
* The query is parameter-less because the list is identical for every caller.
|
|
604
|
+
*/
|
|
605
|
+
declare const polymarketSupportedAssetsQueryKey: () => readonly ["polymarket", "supported-assets"];
|
|
606
|
+
/**
|
|
607
|
+
* Fetch the Polymarket Bridge supported (chain, token) tuples and their
|
|
608
|
+
* minimum USD deposit amounts.
|
|
609
|
+
*
|
|
610
|
+
* The underlying list is essentially static (changes when the bridge adds /
|
|
611
|
+
* removes a chain or token), so this query uses generous cache settings:
|
|
612
|
+
*
|
|
613
|
+
* - `staleTime: 15 minutes` — matches the prediction-server in-process TTL.
|
|
614
|
+
* - `gcTime: 1 hour` — keeps the data available across modal open/close cycles.
|
|
615
|
+
*
|
|
616
|
+
* Common downstream usage is to filter by `chainId` to derive a single chain's
|
|
617
|
+
* minimum deposit amount and supported token symbols.
|
|
618
|
+
*/
|
|
619
|
+
declare function usePolymarketSupportedAssets(): _tanstack_react_query.UseQueryResult<PolymarketSupportedAsset[], Error>;
|
|
620
|
+
|
|
600
621
|
/**
|
|
601
622
|
* Mutation hook to execute a gasless USDC.e withdrawal from a Polymarket Safe
|
|
602
623
|
* wallet via the Relayer.
|
|
@@ -972,4 +993,4 @@ interface WalkOrderbookParams {
|
|
|
972
993
|
*/
|
|
973
994
|
declare function walkOrderbook({ orderbook, outcome, side, sharesNeeded, slippageBps, }: WalkOrderbookParams): WalkResult;
|
|
974
995
|
|
|
975
|
-
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, PolymarketRedeemResponse, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, type RedeemPositionVariables, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, 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, type WalkOrderbookParams, type WalkOutcome, type WalkResult, type WalkSide, type WalkStatus, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, pickBestAsk, pickBestBid, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRedeemPosition, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, walkOrderbook, withdrawStatusQueryKey };
|
|
996
|
+
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, PolymarketRedeemResponse, type PolymarketSigner, PolymarketSupportedAsset, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, type RedeemPositionVariables, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, 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, type WalkOrderbookParams, type WalkOutcome, type WalkResult, type WalkSide, type WalkStatus, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, pickBestAsk, pickBestBid, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, polymarketSupportedAssetsQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketSupportedAssets, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRedeemPosition, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, walkOrderbook, withdrawStatusQueryKey };
|
package/dist/index.js
CHANGED
|
@@ -414,6 +414,19 @@ var PredictClient = class {
|
|
|
414
414
|
const url = `${this.endpoint}/api/v1/deposit/polymarket/addresses${query}`;
|
|
415
415
|
return await utils.httpGet(url);
|
|
416
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* List the Polymarket Bridge supported (chain, token) tuples along with
|
|
419
|
+
* the per-asset minimum USD deposit amount.
|
|
420
|
+
*
|
|
421
|
+
* The list is the same for every caller; backend caches it for 15 minutes.
|
|
422
|
+
*
|
|
423
|
+
* Maps to `GET /api/v1/deposit/polymarket/supported-assets`.
|
|
424
|
+
*/
|
|
425
|
+
async getPolymarketSupportedAssets() {
|
|
426
|
+
const url = `${this.endpoint}/api/v1/deposit/polymarket/supported-assets`;
|
|
427
|
+
const data = await utils.httpGet(url);
|
|
428
|
+
return data.supportedAssets ?? [];
|
|
429
|
+
}
|
|
417
430
|
// -------------------------------------------------------------------------
|
|
418
431
|
// Polymarket Relayer Withdraw
|
|
419
432
|
// -------------------------------------------------------------------------
|
|
@@ -1732,6 +1745,16 @@ function usePolymarketDepositAddresses(safeAddress) {
|
|
|
1732
1745
|
staleTime: 5 * 60 * 1e3
|
|
1733
1746
|
});
|
|
1734
1747
|
}
|
|
1748
|
+
var polymarketSupportedAssetsQueryKey = () => ["polymarket", "supported-assets"];
|
|
1749
|
+
function usePolymarketSupportedAssets() {
|
|
1750
|
+
const client = usePredictClient();
|
|
1751
|
+
return reactQuery.useQuery({
|
|
1752
|
+
queryKey: polymarketSupportedAssetsQueryKey(),
|
|
1753
|
+
queryFn: () => client.getPolymarketSupportedAssets(),
|
|
1754
|
+
staleTime: 15 * 60 * 1e3,
|
|
1755
|
+
gcTime: 60 * 60 * 1e3
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1735
1758
|
function usePolymarketWithdraw() {
|
|
1736
1759
|
const client = usePredictClient();
|
|
1737
1760
|
return reactQuery.useMutation({
|
|
@@ -2449,6 +2472,7 @@ exports.pickBestAsk = pickBestAsk;
|
|
|
2449
2472
|
exports.pickBestBid = pickBestBid;
|
|
2450
2473
|
exports.polymarketDepositAddressesQueryKey = polymarketDepositAddressesQueryKey;
|
|
2451
2474
|
exports.polymarketSetupQueryKey = polymarketSetupQueryKey;
|
|
2475
|
+
exports.polymarketSupportedAssetsQueryKey = polymarketSupportedAssetsQueryKey;
|
|
2452
2476
|
exports.positionsMultiQueryKey = positionsMultiQueryKey;
|
|
2453
2477
|
exports.positionsQueryKey = positionsQueryKey;
|
|
2454
2478
|
exports.priceHistoryQueryKey = priceHistoryQueryKey;
|
|
@@ -2488,6 +2512,7 @@ exports.usePolymarket = usePolymarket;
|
|
|
2488
2512
|
exports.usePolymarketDeposit = usePolymarketDeposit;
|
|
2489
2513
|
exports.usePolymarketDepositAddresses = usePolymarketDepositAddresses;
|
|
2490
2514
|
exports.usePolymarketSetup = usePolymarketSetup;
|
|
2515
|
+
exports.usePolymarketSupportedAssets = usePolymarketSupportedAssets;
|
|
2491
2516
|
exports.usePolymarketWithdraw = usePolymarketWithdraw;
|
|
2492
2517
|
exports.usePositions = usePositions;
|
|
2493
2518
|
exports.usePositionsMulti = usePositionsMulti;
|