@polymarket/client 0.2.0 → 0.3.0-beta.1
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/actions/index.d.ts +4 -4
- package/dist/actions/index.js +1 -1
- package/dist/chunk-4LDMO37Q.js +6 -0
- package/dist/chunk-4LDMO37Q.js.map +1 -0
- package/dist/chunk-KZISI26J.js +2 -0
- package/dist/{chunk-3GYPYD7Z.js.map → chunk-KZISI26J.js.map} +1 -1
- package/dist/chunk-NJ2FDU52.js +3 -0
- package/dist/chunk-NJ2FDU52.js.map +1 -0
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/ethers-v5.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/privy.js +1 -1
- package/dist/{sports-CYYRGlQj.d.ts → sports-BrD6Dal5.d.ts} +1 -1
- package/dist/{types-vvy5wT5V.d.ts → types-BXOHrumK.d.ts} +160 -13
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-3GYPYD7Z.js +0 -2
- package/dist/chunk-FA3ZDOJN.js +0 -2
- package/dist/chunk-FA3ZDOJN.js.map +0 -1
- package/dist/chunk-TYJAXA3Y.js +0 -6
- package/dist/chunk-TYJAXA3Y.js.map +0 -1
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as ApproveErc1155ForAllError, f as ApproveErc20Error, C as CancelAllError, j as CancelAllPerpsOrdersRequest, k as CancelMarketOrdersError, d6 as CancelMarketOrdersRequest, l as CancelOrderError, d7 as CancelOrderRequest, m as CancelOrdersError, d8 as CancelOrdersRequest, n as CancelPerpsOrderRequest, o as CancelPerpsOrdersRequest, d9 as CollateralReturnExecutionWorkflow, u as ComboPositionSort, da as CommentsEventType, db as CommentsSubscription, y as CreatePerpsSessionRequest, dc as CryptoPricesEventType, dd as CryptoPricesSubscription, de as DeployDepositWalletError, E as DepositToPerpsError, F as DepositToPerpsRequest, H as DownloadAccountingSnapshotError, df as DownloadAccountingSnapshotRequest, I as DropNotificationsError, dg as DropNotificationsRequest, dh as EquityPricesEventType, di as EquityPricesSubscription, dj as Erc1155ApprovalForAllWorkflow, dk as Erc1155ApprovalForAllWorkflowRequest, dl as Erc20ApprovalWorkflow, dm as Erc20ApprovalWorkflowRequest, dn as Erc20TransferWorkflow, dp as Erc20TransferWorkflowRequest, dq as EstimateMarketBuyPriceRequest, M as EstimateMarketPriceError, dr as EstimateMarketPriceRequest, ds as EstimateMarketSellPriceRequest, dt as EventForSubscriptionSpec, du as EventForSubscriptionSpecs, N as ExecuteCollateralReturnPlanError, O as ExecuteCollateralReturnPlanRequest, dv as FetchBalanceAllowanceError, dw as FetchBalanceAllowanceRequest, dx as FetchBuilderFeeRatesError, dy as FetchBuilderFeeRatesRequest, P as FetchClosedOnlyModeError, Q as FetchCommentsByIdError, dz as FetchCommentsByIdRequest, R as FetchEventError, V as FetchEventLiveVolumeError, dA as FetchEventLiveVolumeRequest, dB as FetchEventRequest, W as FetchEventTagsError, dC as FetchEventTagsRequest, dD as FetchExecuteParamsError, dE as FetchExecuteParamsRequest, dF as FetchGaslessTransactionRequest, X as FetchLastTradePriceError, dG as FetchLastTradePriceRequest, Y as FetchLastTradePricesError, dH as FetchLastTradePricesRequest, Z as FetchMarketError, dI as FetchMarketInfoError, dJ as FetchMarketInfoRequest, dK as FetchMarketRequest, _ as FetchMarketTagsError, dL as FetchMarketTagsRequest, $ as FetchMidpointError, dM as FetchMidpointRequest, a0 as FetchMidpointsError, dN as FetchMidpointsRequest, dO as FetchNegRiskError, dP as FetchNegRiskRequest, a1 as FetchNotificationsError, a2 as FetchOrderBookError, dQ as FetchOrderBookRequest, a3 as FetchOrderBooksError, dR as FetchOrderBooksRequest, a4 as FetchOrderError, dS as FetchOrderRequest, a5 as FetchOrderScoringError, dT as FetchOrderScoringRequest, a6 as FetchOrdersScoringError, dU as FetchOrdersScoringRequest, a7 as FetchPerpsAccountConfigRequest, a8 as FetchPerpsBookError, a9 as FetchPerpsBookRequest, aa as FetchPerpsFeesError, ab as FetchPerpsInstrumentsError, ac as FetchPerpsInstrumentsRequest, ad as FetchPerpsOpenOrdersRequest, ae as FetchPerpsOrdersRequest, af as FetchPerpsTickerError, ag as FetchPerpsTickerRequest, ah as FetchPerpsTickersError, ai as FetchPerpsTickersRequest, aj as FetchPortfolioValueError, dV as FetchPortfolioValueRequest, ak as FetchPriceError, al as FetchPriceHistoryError, dW as FetchPriceHistoryRequest, dX as FetchPriceRequest, am as FetchPricesError, dY as FetchPricesRequest, an as FetchPublicProfileError, dZ as FetchPublicProfileRequest, ao as FetchRelatedTagResourcesError, d_ as FetchRelatedTagResourcesRequest, ap as FetchRelatedTagsError, d$ as FetchRelatedTagsRequest, aq as FetchRewardPercentagesError, ar as FetchSeriesError, e0 as FetchSeriesRequest, as as FetchSpreadError, e1 as FetchSpreadRequest, at as FetchSpreadsError, e2 as FetchSpreadsRequest, au as FetchTagError, e3 as FetchTagRequest, e4 as FetchTickSizeError, e5 as FetchTickSizeRequest, av as FetchTotalEarningsForUserForDayError, e6 as FetchTotalEarningsForUserForDayRequest, aw as FetchTradedMarketCountError, e7 as FetchTradedMarketCountRequest, e8 as GaslessTransactionMetadataSchema, e9 as GaslessWorkflow, ea as GaslessWorkflowRequest, eb as IsWalletDeployedError, ec as IsWalletDeployedRequest, ay as ListAccountTradesError, ed as ListAccountTradesRequest, az as ListActivityError, ee as ListActivityRequest, aA as ListBuilderLeaderboardError, ef as ListBuilderLeaderboardRequest, aB as ListBuilderTradesError, eg as ListBuilderTradesRequest, aC as ListBuilderVolumeError, eh as ListBuilderVolumeRequest, aD as ListClosedPositionsError, ei as ListClosedPositionsRequest, aE as ListComboActivityError, ej as ListComboActivityRequest, aF as ListComboMarketsError, ek as ListComboMarketsRequest, aG as ListComboPositionsError, el as ListComboPositionsRequest, aH as ListCommentsByUserAddressError, em as ListCommentsByUserAddressRequest, aI as ListCommentsError, en as ListCommentsRequest, aJ as ListCurrentRewardsError, eo as ListCurrentRewardsRequest, aK as ListEventsError, ep as ListEventsRequest, eq as ListMarketClarificationsError, er as ListMarketClarificationsRequest, aL as ListMarketHoldersError, es as ListMarketHoldersRequest, aM as ListMarketPositionsError, et as ListMarketPositionsRequest, aN as ListMarketRewardsError, eu as ListMarketRewardsRequest, aO as ListMarketsError, ev as ListMarketsRequest, aP as ListOpenInterestError, ew as ListOpenInterestRequest, aQ as ListOpenOrdersError, ex as ListOpenOrdersRequest, aR as ListPerpsCandlesError, aS as ListPerpsCandlesRequest, aT as ListPerpsDepositsRequest, aU as ListPerpsEquityHistoryRequest, aV as ListPerpsFillsRequest, aW as ListPerpsFundingHistoryError, aX as ListPerpsFundingHistoryRequest, aY as ListPerpsFundingPaymentsRequest, aZ as ListPerpsPnlHistoryRequest, a_ as ListPerpsTradesError, a$ as ListPerpsTradesRequest, b0 as ListPerpsWithdrawalsRequest, b1 as ListPositionsError, ey as ListPositionsRequest, b2 as ListSeriesError, ez as ListSeriesRequest, b3 as ListTagsError, eA as ListTagsRequest, b4 as ListTeamsError, eB as ListTeamsRequest, b5 as ListTraderLeaderboardError, eC as ListTraderLeaderboardRequest, b6 as ListTradesError, eD as ListTradesRequest, b7 as ListUserEarningsAndMarketsConfigError, eE as ListUserEarningsAndMarketsConfigRequest, b8 as ListUserEarningsForDayError, eF as ListUserEarningsForDayRequest, eG as MarketEventType, eH as MarketSubscription, eI as MergeComboPositionError, eJ as MergeMarketPositionError, b9 as MergePositionsError, eK as MergePositionsWorkflow, eL as MergePositionsWorkflowRequest, ba as OpenPerpsSessionError, bb as OpenPerpsSessionRequest, bc as OpenRfqSessionError, eM as OrderDraft, eN as OrderPostingWorkflow, eO as OrderWorkflow, eP as OrderWorkflowRequest, eQ as PerpsBboSubscription, bh as PerpsBookDepth, eR as PerpsBookSubscription, eS as PerpsCandlesSubscription, eT as PerpsDepositWorkflow, eU as PerpsDepositWorkflowRequest, eV as PerpsMarketDataEventType, eW as PerpsMarketDataSubscription, bj as PerpsOrderRequest, bk as PerpsPlaceFokOrderRequest, bl as PerpsPlaceGtcOrderRequest, bm as PerpsPlaceIocOrderRequest, bn as PerpsPlacedTpSlOrder, bo as PerpsPlacedTpSlOrders, bp as PerpsPositionTpSlTrigger, bq as PerpsSession, br as PerpsSessionAccountError, bs as PerpsSessionLifecycleError, bt as PerpsSessionTradingError, eX as PerpsStatisticsSubscription, eY as PerpsStreamingCandleInterval, eZ as PerpsTickersSubscription, bu as PerpsTpSlTrigger, e_ as PerpsTradesSubscription, bv as PlacePerpsOrderRequest, bw as PlacePerpsOrderResult, bx as PlacePerpsOrderWithTpSlRequest, by as PlacePerpsOrderWithTpSlResult, bz as PlacePerpsPositionTpSlRequest, bA as PlacePerpsPositionTpSlResult, bB as PlanCollateralReturnError, bC as PostOrderError, bD as PostOrdersError, e$ as PostOrdersRequest, bE as PostPerpsOrdersRequest, f0 as PrepareCollateralReturnExecutionError, f1 as PrepareErc1155ApprovalForAllError, f2 as PrepareErc1155ApprovalForAllRequest, f3 as PrepareErc20ApprovalError, f4 as PrepareErc20ApprovalRequest, f5 as PrepareErc20TransferError, f6 as PrepareErc20TransferRequest, f7 as PrepareGaslessTransactionError, f8 as PrepareGaslessTransactionRequest, f9 as PrepareLimitOrderRequest, fa as PrepareMarketBuyOrderRequest, fb as PrepareMarketOrderRequest, fc as PrepareMarketSellOrderRequest, fd as PrepareMergeComboPositionError, fe as PrepareMergeComboPositionRequest, ff as PrepareMergeMarketPositionError, fg as PrepareMergeMarketPositionRequest, fh as PrepareMergePositionsError, fi as PrepareMergePositionsRequest, fj as PreparePerpsDepositError, fk as PrepareRedeemComboPositionError, fl as PrepareRedeemComboPositionRequest, fm as PrepareRedeemMarketPositionsByConditionIdRequest, fn as PrepareRedeemMarketPositionsByMarketIdRequest, fo as PrepareRedeemMarketPositionsError, fp as PrepareRedeemMarketPositionsRequest, fq as PrepareRedeemPositionsError, fr as PrepareRedeemPositionsRequest, fs as PrepareSplitComboPositionError, ft as PrepareSplitComboPositionRequest, fu as PrepareSplitMarketPositionError, fv as PrepareSplitMarketPositionRequest, fw as PrepareSplitPositionError, fx as PrepareSplitPositionRequest, fy as PrepareTradingApprovalsError, fz as PublicRealtimeEvent, fA as PublicRealtimeTopic, fB as PublicSubscriptionSpec, bN as RedeemPositionsError, fC as RedeemPositionsWorkflow, fD as RedeemPositionsWorkflowRequest, fE as ResolveConditionByTokenError, fF as ResolveConditionByTokenRequest, bR as ResumePerpsSessionRequest, bS as RevokePerpsCredentialsError, bT as RevokePerpsCredentialsRequest, bU as RfqCancelQuoteAck, bV as RfqCancelQuoteError, bW as RfqCancelQuoteRejectedError, bX as RfqCancelQuoteRejectedErrorOptions, bY as RfqConfirmationAck, bZ as RfqConfirmationError, b_ as RfqConfirmationRejectedError, fG as RfqConfirmationRejectedErrorOptions, b$ as RfqConfirmationRequestEvent, c0 as RfqEvent, fH as RfqExecutionUpdateEvent, c1 as RfqQuoteError, c2 as RfqQuoteReference, c3 as RfqQuoteRejectedError, c4 as RfqQuoteRejectedErrorOptions, c5 as RfqQuoteRequestEvent, c6 as RfqQuoteResponse, c7 as RfqQuoteSource, c8 as RfqSession, c9 as RfqTradeEvent, ca as SearchError, fI as SearchRequest, fJ as SearchResults, cb as SearchSort, fK as SecureRealtimeEvent, fL as SecureRealtimeTopic, fM as SecureSubscriptionSpec, cv as SetupTradingApprovalsError, fN as SignedOrder, fO as SplitComboPositionError, fP as SplitMarketPositionError, cy as SplitPositionError, fQ as SplitPositionWorkflow, fR as SplitPositionWorkflowRequest, fS as SportsEventType, fT as SportsSubscription, fU as SubscribeError, fV as SubscriptionHandle, fW as TradingApprovalsWorkflow, fX as TradingApprovalsWorkflowRequest, cD as TransferErc20Error, fY as UpdateBalanceAllowanceError, fZ as UpdateBalanceAllowanceRequest, cI as UpdatePerpsLeverageError, cJ as UpdatePerpsLeverageRequest, f_ as UserEventType, f$ as UserSubscription, g0 as WaitForGaslessTransactionError, cK as WaitForOrderFillSettlementError, g1 as WaitForOrderFillSettlementRequest, cQ as WithdrawFromPerpsError, cR as WithdrawFromPerpsRequest, g2 as approveErc1155ForAll, g3 as approveErc20, g4 as cancelAll, g5 as cancelMarketOrders, g6 as cancelOrder, g7 as cancelOrders, g8 as deployDepositWallet, g9 as depositToPerps, ga as downloadAccountingSnapshot, gb as dropNotifications, gc as estimateMarketPrice, gd as executeCollateralReturnPlan, ge as fetchBalanceAllowance, gf as fetchBuilderFeeRates, gg as fetchBuilderVolume, gh as fetchClosedOnlyMode, gi as fetchCommentsById, gj as fetchEvent, gk as fetchEventLiveVolume, gl as fetchEventTags, gm as fetchExecuteParams, gn as fetchLastTradePrice, go as fetchLastTradePrices, gp as fetchMarket, gq as fetchMarketInfo, gr as fetchMarketTags, gs as fetchMidpoint, gt as fetchMidpoints, gu as fetchNegRisk, gv as fetchNotifications, gw as fetchOrder, gx as fetchOrderBook, gy as fetchOrderBooks, gz as fetchOrderScoring, gA as fetchOrdersScoring, gB as fetchPerpsBook, gC as fetchPerpsFees, gD as fetchPerpsInstruments, gE as fetchPerpsTicker, gF as fetchPerpsTickers, gG as fetchPortfolioValue, gH as fetchPrice, gI as fetchPriceHistory, gJ as fetchPrices, gK as fetchPublicProfile, gL as fetchRelatedTagResources, gM as fetchRelatedTags, gN as fetchRewardPercentages, gO as fetchSeries, gP as fetchSpread, gQ as fetchSpreads, gR as fetchTag, gS as fetchTickSize, gT as fetchTotalEarningsForUserForDay, gU as fetchTradedMarketCount, gV as fetchTransaction, gW as isWalletDeployed, gX as listAccountTrades, gY as listActivity, gZ as listBuilderLeaderboard, g_ as listBuilderTrades, g$ as listClosedPositions, h0 as listComboActivity, h1 as listComboMarkets, h2 as listComboPositions, h3 as listComments, h4 as listCommentsByUserAddress, h5 as listCurrentRewards, h6 as listEvents, h7 as listMarketClarifications, h8 as listMarketHolders, h9 as listMarketPositions, ha as listMarketRewards, hb as listMarkets, hc as listOpenInterest, hd as listOpenOrders, he as listPerpsCandles, hf as listPerpsFundingHistory, hg as listPerpsTrades, hh as listPositions, hi as listSeries, hj as listTags, hk as listTeams, hl as listTraderLeaderboard, hm as listTrades, hn as listUserEarningsAndMarketsConfig, ho as listUserEarningsForDay, hp as mergeComboPosition, hq as mergeMarketPosition, hr as mergePositions, hs as openPerpsSession, ht as openRfqSession, hu as planCollateralReturn, hv as postOrder, hw as postOrders, hx as prepareCollateralReturnExecution, hy as prepareErc1155ApprovalForAll, hz as prepareErc20Approval, hA as prepareErc20Transfer, hB as prepareGaslessTransaction, hC as prepareMergeComboPosition, hD as prepareMergeMarketPosition, hE as prepareMergePositions, hF as preparePerpsDeposit, hG as prepareRedeemComboPosition, hH as prepareRedeemMarketPositions, hI as prepareRedeemPositions, hJ as prepareSplitComboPosition, hK as prepareSplitMarketPosition, hL as prepareSplitPosition, hM as prepareTradingApprovals, hN as redeemPositions, hO as resolveConditionByToken, hP as revokePerpsCredentials, hQ as search, hR as setupTradingApprovals, hS as splitComboPosition, hT as splitMarketPosition, hU as splitPosition, hV as subscribe, hW as transferErc20, hX as updateBalanceAllowance, hY as waitForOrderFillSettlement, hZ as withdrawFromPerps } from '../types-vvy5wT5V.js';
|
|
1
|
+
import { bP as RateLimitError, bS as RequestRejectedError, cJ as TransportError, cM as UnexpectedResponseError, cB as SigningError, B as BaseClient, h as BaseSecureClient } from '../types-BXOHrumK.js';
|
|
2
|
+
export { e as ApproveErc1155ForAllError, f as ApproveErc20Error, C as CancelAllError, j as CancelAllPerpsOrdersRequest, k as CancelMarketOrdersError, db as CancelMarketOrdersRequest, l as CancelOrderError, dc as CancelOrderRequest, m as CancelOrdersError, dd as CancelOrdersRequest, n as CancelPerpsOrderRequest, o as CancelPerpsOrdersRequest, de as CollateralReturnExecutionWorkflow, u as ComboPositionSort, df as CommentsEventType, dg as CommentsSubscription, y as CreatePerpsSessionRequest, D as CryptoPricesChainlinkTwapSubscription, dh as CryptoPricesEventType, di as CryptoPricesSubscription, dj as DeployDepositWalletError, F as DepositToPerpsError, G as DepositToPerpsRequest, I as DownloadAccountingSnapshotError, dk as DownloadAccountingSnapshotRequest, J as DropNotificationsError, dl as DropNotificationsRequest, dm as EquityPricesEventType, dn as EquityPricesSubscription, dp as Erc1155ApprovalForAllWorkflow, dq as Erc1155ApprovalForAllWorkflowRequest, dr as Erc20ApprovalWorkflow, ds as Erc20ApprovalWorkflowRequest, dt as Erc20TransferWorkflow, du as Erc20TransferWorkflowRequest, dv as EstimateMarketBuyPriceRequest, N as EstimateMarketPriceError, dw as EstimateMarketPriceRequest, dx as EstimateMarketSellPriceRequest, dy as EventForSubscriptionSpec, dz as EventForSubscriptionSpecs, O as ExecuteCollateralReturnPlanError, P as ExecuteCollateralReturnPlanRequest, dA as FetchBalanceAllowanceError, dB as FetchBalanceAllowanceRequest, dC as FetchBuilderFeeRatesError, dD as FetchBuilderFeeRatesRequest, Q as FetchClosedOnlyModeError, R as FetchCommentsByIdError, dE as FetchCommentsByIdRequest, V as FetchEventError, W as FetchEventLiveVolumeError, dF as FetchEventLiveVolumeRequest, dG as FetchEventRequest, X as FetchEventTagsError, dH as FetchEventTagsRequest, dI as FetchExecuteParamsError, dJ as FetchExecuteParamsRequest, dK as FetchGaslessTransactionRequest, Y as FetchLastTradePriceError, dL as FetchLastTradePriceRequest, Z as FetchLastTradePricesError, dM as FetchLastTradePricesRequest, _ as FetchMarketError, dN as FetchMarketInfoError, dO as FetchMarketInfoRequest, dP as FetchMarketRequest, $ as FetchMarketTagsError, dQ as FetchMarketTagsRequest, a0 as FetchMidpointError, dR as FetchMidpointRequest, a1 as FetchMidpointsError, dS as FetchMidpointsRequest, dT as FetchNegRiskError, dU as FetchNegRiskRequest, a2 as FetchNotificationsError, a3 as FetchOrderBookError, dV as FetchOrderBookRequest, a4 as FetchOrderBooksError, dW as FetchOrderBooksRequest, a5 as FetchOrderError, dX as FetchOrderRequest, a6 as FetchOrderScoringError, dY as FetchOrderScoringRequest, a7 as FetchOrdersScoringError, dZ as FetchOrdersScoringRequest, a8 as FetchPerpsAccountConfigRequest, a9 as FetchPerpsBookError, aa as FetchPerpsBookRequest, ab as FetchPerpsFeesError, ac as FetchPerpsInstrumentsError, ad as FetchPerpsInstrumentsRequest, ae as FetchPerpsOpenOrdersRequest, af as FetchPerpsOrdersRequest, ag as FetchPerpsTickerError, ah as FetchPerpsTickerRequest, ai as FetchPerpsTickersError, aj as FetchPerpsTickersRequest, ak as FetchPortfolioValueError, d_ as FetchPortfolioValueRequest, al as FetchPriceError, am as FetchPriceHistoryError, d$ as FetchPriceHistoryRequest, e0 as FetchPriceRequest, an as FetchPricesError, e1 as FetchPricesRequest, ao as FetchPublicProfileError, e2 as FetchPublicProfileRequest, ap as FetchRelatedTagResourcesError, e3 as FetchRelatedTagResourcesRequest, aq as FetchRelatedTagsError, e4 as FetchRelatedTagsRequest, ar as FetchRewardPercentagesError, as as FetchSeriesError, e5 as FetchSeriesRequest, at as FetchSpreadError, e6 as FetchSpreadRequest, au as FetchSpreadsError, e7 as FetchSpreadsRequest, av as FetchTagError, e8 as FetchTagRequest, e9 as FetchTickSizeError, ea as FetchTickSizeRequest, aw as FetchTotalEarningsForUserForDayError, eb as FetchTotalEarningsForUserForDayRequest, ax as FetchTradedMarketCountError, ec as FetchTradedMarketCountRequest, ed as GaslessTransactionMetadataSchema, ee as GaslessWorkflow, ef as GaslessWorkflowRequest, eg as IsWalletDeployedError, eh as IsWalletDeployedRequest, az as ListAccountTradesError, ei as ListAccountTradesRequest, aA as ListActivityError, ej as ListActivityRequest, aB as ListBuilderLeaderboardError, ek as ListBuilderLeaderboardRequest, aC as ListBuilderTradesError, el as ListBuilderTradesRequest, aD as ListBuilderVolumeError, em as ListBuilderVolumeRequest, aE as ListClosedPositionsError, en as ListClosedPositionsRequest, aF as ListComboActivityError, eo as ListComboActivityRequest, aG as ListComboMarketsError, ep as ListComboMarketsRequest, aH as ListComboPositionsError, eq as ListComboPositionsRequest, aI as ListCommentsByUserAddressError, er as ListCommentsByUserAddressRequest, aJ as ListCommentsError, es as ListCommentsRequest, aK as ListCurrentRewardsError, et as ListCurrentRewardsRequest, aL as ListEventsError, eu as ListEventsRequest, ev as ListMarketClarificationsError, ew as ListMarketClarificationsRequest, aM as ListMarketHoldersError, ex as ListMarketHoldersRequest, aN as ListMarketPositionsError, ey as ListMarketPositionsRequest, aO as ListMarketRewardsError, ez as ListMarketRewardsRequest, aP as ListMarketsError, eA as ListMarketsRequest, aQ as ListOpenInterestError, eB as ListOpenInterestRequest, aR as ListOpenOrdersError, eC as ListOpenOrdersRequest, aS as ListPerpsCandlesError, aT as ListPerpsCandlesRequest, aU as ListPerpsDepositsRequest, aV as ListPerpsEquityHistoryRequest, aW as ListPerpsFillsRequest, aX as ListPerpsFundingHistoryError, aY as ListPerpsFundingHistoryRequest, aZ as ListPerpsFundingPaymentsRequest, a_ as ListPerpsNotificationsRequest, a$ as ListPerpsPnlHistoryRequest, b0 as ListPerpsTradesError, b1 as ListPerpsTradesRequest, b2 as ListPerpsWithdrawalsRequest, b3 as ListPositionsError, eD as ListPositionsRequest, b4 as ListSeriesError, eE as ListSeriesRequest, b5 as ListTagsError, eF as ListTagsRequest, b6 as ListTeamsError, eG as ListTeamsRequest, b7 as ListTraderLeaderboardError, eH as ListTraderLeaderboardRequest, b8 as ListTradesError, eI as ListTradesRequest, b9 as ListUserEarningsAndMarketsConfigError, eJ as ListUserEarningsAndMarketsConfigRequest, ba as ListUserEarningsForDayError, eK as ListUserEarningsForDayRequest, bb as MarkPerpsNotificationsReadRequest, eL as MarketEventType, eM as MarketSubscription, eN as MergeComboPositionError, eO as MergeMarketPositionError, bc as MergePositionsError, eP as MergePositionsWorkflow, eQ as MergePositionsWorkflowRequest, bd as OpenPerpsSessionError, be as OpenPerpsSessionRequest, bf as OpenRfqSessionError, eR as OrderDraft, eS as OrderPostingWorkflow, eT as OrderWorkflow, eU as OrderWorkflowRequest, eV as PerpsBboSubscription, bk as PerpsBookDepth, eW as PerpsBookSubscription, eX as PerpsCandlesSubscription, eY as PerpsDepositWorkflow, eZ as PerpsDepositWorkflowRequest, e_ as PerpsMarketDataEventType, e$ as PerpsMarketDataSubscription, bm as PerpsOrderRequest, bn as PerpsPlaceFokOrderRequest, bo as PerpsPlaceGtcOrderRequest, bp as PerpsPlaceIocOrderRequest, bq as PerpsPlacedTpSlOrder, br as PerpsPlacedTpSlOrders, bs as PerpsPositionTpSlTrigger, bt as PerpsSession, bu as PerpsSessionAccountError, bv as PerpsSessionLifecycleError, bw as PerpsSessionTradingError, f0 as PerpsStatisticsSubscription, f1 as PerpsStreamingCandleInterval, f2 as PerpsTickersSubscription, bx as PerpsTpSlTrigger, f3 as PerpsTradesSubscription, by as PlacePerpsOrderRequest, bz as PlacePerpsOrderResult, bA as PlacePerpsOrderWithTpSlRequest, bB as PlacePerpsOrderWithTpSlResult, bC as PlacePerpsPositionTpSlRequest, bD as PlacePerpsPositionTpSlResult, bE as PlanCollateralReturnError, bF as PostOrderError, bG as PostOrdersError, f4 as PostOrdersRequest, bH as PostPerpsOrdersRequest, f5 as PrepareCollateralReturnExecutionError, f6 as PrepareErc1155ApprovalForAllError, f7 as PrepareErc1155ApprovalForAllRequest, f8 as PrepareErc20ApprovalError, f9 as PrepareErc20ApprovalRequest, fa as PrepareErc20TransferError, fb as PrepareErc20TransferRequest, fc as PrepareGaslessTransactionError, fd as PrepareGaslessTransactionRequest, fe as PrepareLimitOrderRequest, ff as PrepareMarketBuyOrderRequest, fg as PrepareMarketOrderRequest, fh as PrepareMarketSellOrderRequest, fi as PrepareMergeComboPositionError, fj as PrepareMergeComboPositionRequest, fk as PrepareMergeMarketPositionError, fl as PrepareMergeMarketPositionRequest, fm as PrepareMergePositionsError, fn as PrepareMergePositionsRequest, fo as PreparePerpsDepositError, fp as PrepareRedeemComboPositionError, fq as PrepareRedeemComboPositionRequest, fr as PrepareRedeemMarketPositionsByConditionIdRequest, fs as PrepareRedeemMarketPositionsByMarketIdRequest, ft as PrepareRedeemMarketPositionsError, fu as PrepareRedeemMarketPositionsRequest, fv as PrepareRedeemPositionsError, fw as PrepareRedeemPositionsRequest, fx as PrepareSplitComboPositionError, fy as PrepareSplitComboPositionRequest, fz as PrepareSplitMarketPositionError, fA as PrepareSplitMarketPositionRequest, fB as PrepareSplitPositionError, fC as PrepareSplitPositionRequest, fD as PrepareTradingApprovalsError, fE as PublicRealtimeEvent, fF as PublicRealtimeTopic, fG as PublicSubscriptionSpec, bR as RedeemPositionsError, fH as RedeemPositionsWorkflow, fI as RedeemPositionsWorkflowRequest, fJ as ResolveConditionByTokenError, fK as ResolveConditionByTokenRequest, bV as ResumePerpsSessionRequest, bW as RevokePerpsCredentialsError, bX as RevokePerpsCredentialsRequest, bY as RfqCancelQuoteAck, bZ as RfqCancelQuoteError, b_ as RfqCancelQuoteRejectedError, b$ as RfqCancelQuoteRejectedErrorOptions, c0 as RfqConfirmationAck, c1 as RfqConfirmationError, c2 as RfqConfirmationRejectedError, fL as RfqConfirmationRejectedErrorOptions, c3 as RfqConfirmationRequestEvent, c4 as RfqEvent, fM as RfqExecutionUpdateEvent, c5 as RfqQuoteError, c6 as RfqQuoteReference, c7 as RfqQuoteRejectedError, c8 as RfqQuoteRejectedErrorOptions, c9 as RfqQuoteRequestEvent, ca as RfqQuoteResponse, cb as RfqQuoteSource, cc as RfqSession, cd as RfqTradeEvent, ce as SearchError, fN as SearchRequest, fO as SearchResults, cf as SearchSort, fP as SecureRealtimeEvent, fQ as SecureRealtimeTopic, fR as SecureSubscriptionSpec, cz as SetupTradingApprovalsError, fS as SignedOrder, fT as SplitComboPositionError, fU as SplitMarketPositionError, cC as SplitPositionError, fV as SplitPositionWorkflow, fW as SplitPositionWorkflowRequest, fX as SportsEventType, fY as SportsSubscription, cD as SubscribeError, fZ as SubscriptionHandle, f_ as TradingApprovalsWorkflow, f$ as TradingApprovalsWorkflowRequest, cI as TransferErc20Error, g0 as UpdateBalanceAllowanceError, g1 as UpdateBalanceAllowanceRequest, cN as UpdatePerpsLeverageError, cO as UpdatePerpsLeverageRequest, g2 as UserEventType, g3 as UserSubscription, g4 as WaitForGaslessTransactionError, cP as WaitForOrderFillSettlementError, g5 as WaitForOrderFillSettlementRequest, cV as WithdrawFromPerpsError, cW as WithdrawFromPerpsRequest, g6 as approveErc1155ForAll, g7 as approveErc20, g8 as cancelAll, g9 as cancelMarketOrders, ga as cancelOrder, gb as cancelOrders, gc as deployDepositWallet, gd as depositToPerps, ge as downloadAccountingSnapshot, gf as dropNotifications, gg as estimateMarketPrice, gh as executeCollateralReturnPlan, gi as fetchBalanceAllowance, gj as fetchBuilderFeeRates, gk as fetchBuilderVolume, gl as fetchClosedOnlyMode, gm as fetchCommentsById, gn as fetchEvent, go as fetchEventLiveVolume, gp as fetchEventTags, gq as fetchExecuteParams, gr as fetchLastTradePrice, gs as fetchLastTradePrices, gt as fetchMarket, gu as fetchMarketInfo, gv as fetchMarketTags, gw as fetchMidpoint, gx as fetchMidpoints, gy as fetchNegRisk, gz as fetchNotifications, gA as fetchOrder, gB as fetchOrderBook, gC as fetchOrderBooks, gD as fetchOrderScoring, gE as fetchOrdersScoring, gF as fetchPerpsBook, gG as fetchPerpsFees, gH as fetchPerpsInstruments, gI as fetchPerpsTicker, gJ as fetchPerpsTickers, gK as fetchPortfolioValue, gL as fetchPrice, gM as fetchPriceHistory, gN as fetchPrices, gO as fetchPublicProfile, gP as fetchRelatedTagResources, gQ as fetchRelatedTags, gR as fetchRewardPercentages, gS as fetchSeries, gT as fetchSpread, gU as fetchSpreads, gV as fetchTag, gW as fetchTickSize, gX as fetchTotalEarningsForUserForDay, gY as fetchTradedMarketCount, gZ as fetchTransaction, g_ as isWalletDeployed, g$ as listAccountTrades, h0 as listActivity, h1 as listBuilderLeaderboard, h2 as listBuilderTrades, h3 as listClosedPositions, h4 as listComboActivity, h5 as listComboMarkets, h6 as listComboPositions, h7 as listComments, h8 as listCommentsByUserAddress, h9 as listCurrentRewards, ha as listEvents, hb as listMarketClarifications, hc as listMarketHolders, hd as listMarketPositions, he as listMarketRewards, hf as listMarkets, hg as listOpenInterest, hh as listOpenOrders, hi as listPerpsCandles, hj as listPerpsFundingHistory, hk as listPerpsTrades, hl as listPositions, hm as listSeries, hn as listTags, ho as listTeams, hp as listTraderLeaderboard, hq as listTrades, hr as listUserEarningsAndMarketsConfig, hs as listUserEarningsForDay, ht as mergeComboPosition, hu as mergeMarketPosition, hv as mergePositions, hw as openPerpsSession, hx as openRfqSession, hy as planCollateralReturn, hz as postOrder, hA as postOrders, hB as prepareCollateralReturnExecution, hC as prepareErc1155ApprovalForAll, hD as prepareErc20Approval, hE as prepareErc20Transfer, hF as prepareGaslessTransaction, hG as prepareMergeComboPosition, hH as prepareMergeMarketPosition, hI as prepareMergePositions, hJ as preparePerpsDeposit, hK as prepareRedeemComboPosition, hL as prepareRedeemMarketPositions, hM as prepareRedeemPositions, hN as prepareSplitComboPosition, hO as prepareSplitMarketPosition, hP as prepareSplitPosition, hQ as prepareTradingApprovals, hR as redeemPositions, hS as resolveConditionByToken, hT as revokePerpsCredentials, hU as search, hV as setupTradingApprovals, hW as splitComboPosition, hX as splitMarketPosition, hY as splitPosition, hZ as subscribe, h_ as transferErc20, h$ as updateBalanceAllowance, i0 as waitForOrderFillSettlement, i1 as withdrawFromPerps } from '../types-BXOHrumK.js';
|
|
3
3
|
import { ApiKey } from '@polymarket/bindings';
|
|
4
4
|
import { ApiKeyCreds, BuilderApiKeyCreds, BuilderApiKey } from '@polymarket/bindings/clob';
|
|
5
5
|
import { EvmAddress, EvmSignature } from '@polymarket/types';
|
|
6
|
-
export { C as CreateLimitOrderError, a as CreateMarketOrderError, F as FetchSportsMarketTypesError, L as ListSportsError, P as PlaceLimitOrderError, b as PlaceMarketOrderError, c as PrepareLimitOrderError, d as PrepareLimitOrderPostingError, e as PrepareMarketOrderError, f as PrepareMarketOrderPostingError, g as createLimitOrder, h as createMarketOrder, i as fetchSportsMarketTypes, l as listSports, p as placeLimitOrder, j as placeMarketOrder, k as prepareLimitOrder, m as prepareLimitOrderPosting, n as prepareMarketOrder, o as prepareMarketOrderPosting } from '../sports-
|
|
6
|
+
export { C as CreateLimitOrderError, a as CreateMarketOrderError, F as FetchSportsMarketTypesError, L as ListSportsError, P as PlaceLimitOrderError, b as PlaceMarketOrderError, c as PrepareLimitOrderError, d as PrepareLimitOrderPostingError, e as PrepareMarketOrderError, f as PrepareMarketOrderPostingError, g as createLimitOrder, h as createMarketOrder, i as fetchSportsMarketTypes, l as listSports, p as placeLimitOrder, j as placeMarketOrder, k as prepareLimitOrder, m as prepareLimitOrderPosting, n as prepareMarketOrder, o as prepareMarketOrderPosting } from '../sports-BrD6Dal5.js';
|
|
7
7
|
export { CollateralReturnKnownOperationKind, CollateralReturnOperation, CollateralReturnOperationKind, CollateralReturnPlanResponse, CollateralReturnPositionAmount, CollateralReturnPositionSummary, CollateralReturnRouterCall, RfqConfirmationDecision, RfqConfirmationRequest, RfqDirection, RfqErrorCode, RfqExecutionStatus, RfqExecutionUpdate, RfqId, RfqKnownErrorCode, RfqQuoteId, RfqQuoteRequest, RfqRequestedSize, RfqRequestedSizeUnit, RfqRequestorPublicId, RfqSide, RfqTrade } from '@polymarket/bindings/combos';
|
|
8
8
|
export { ComboActivityType, ComboPositionOutcome, ComboPositionStatus } from '@polymarket/bindings/data';
|
|
9
|
-
export { CommentsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, CryptoPricesEvent, CustomMarketEvent, EquityPricesEvent, MarketEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsMarketDataEvent, PerpsSessionEvent, PerpsStatisticEvent, PerpsTickerEvent, PerpsTradeEvent, SportsEvent, StandardMarketEvent, UserEvent } from '@polymarket/bindings/subscriptions';
|
|
9
|
+
export { CommentsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapWindowSeconds, CryptoPricesEvent, CustomMarketEvent, EquityPricesEvent, MarketEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsMarketDataEvent, PerpsSessionEvent, PerpsStatisticEvent, PerpsTickerEvent, PerpsTradeEvent, SportsEvent, StandardMarketEvent, UserEvent } from '@polymarket/bindings/subscriptions';
|
|
10
10
|
export { PerpsCancelOrderResult, PerpsPostOrderAck, PerpsUpdateLeverageResult } from '@polymarket/bindings/perps';
|
|
11
11
|
import '@polymarket/bindings/gamma';
|
|
12
12
|
import '@polymarket/bindings/relayer';
|
package/dist/actions/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Va as ApproveErc1155ForAllError,Ra as ApproveErc20Error,Uc as CancelAllError,Wc as CancelMarketOrdersError,Qc as CancelOrderError,Sc as CancelOrdersError,fc as CollateralReturnKnownOperationKind,sa as ComboActivityType,se as ComboPositionOutcome,fe as ComboPositionSort,te as ComboPositionStatus,$a as CreateApiKeyError,jb as CreateBuilderApiKeyError,ud as CreateLimitOrderError,qd as CreateMarketOrderError,db as CreateOrDeriveApiKeyError,hb as DeleteApiKeyError,Ca as DeployDepositWalletError,_d as DepositToPerpsError,bb as DeriveApiKeyError,qe as DownloadAccountingSnapshotError,W as DropNotificationsError,Yc as EstimateMarketPriceError,dc as ExecuteCollateralReturnPlanError,fb as FetchApiKeysError,Y as FetchBalanceAllowanceError,lb as FetchBuilderApiKeysError,Db as FetchBuilderFeeRatesError,M as FetchClosedOnlyModeError,ic as FetchCommentsByIdError,oc as FetchEventError,sc as FetchEventLiveVolumeError,qc as FetchEventTagsError,xa as FetchExecuteParamsError,Rb as FetchLastTradePriceError,Tb as FetchLastTradePricesError,Gc as FetchMarketError,Bb as FetchMarketInfoError,Ic as FetchMarketTagsError,rb as FetchMidpointError,tb as FetchMidpointsError,xb as FetchNegRiskError,U as FetchNotificationsError,Jb as FetchOrderBookError,Lb as FetchOrderBooksError,Q as FetchOrderError,aa as FetchOrderScoringError,ca as FetchOrdersScoringError,Nd as FetchPerpsBookError,Vd as FetchPerpsFeesError,Hd as FetchPerpsInstrumentsError,Jd as FetchPerpsTickerError,Ld as FetchPerpsTickersError,me as FetchPortfolioValueError,Fb as FetchPriceError,Vb as FetchPriceHistoryError,Hb as FetchPricesError,_e as FetchPublicProfileError,If as FetchRelatedTagResourcesError,Gf as FetchRelatedTagsError,ka as FetchRewardPercentagesError,tf as FetchSeriesError,xf as FetchSportsMarketTypesError,Nb as FetchSpreadError,Pb as FetchSpreadsError,Ef as FetchTagError,vb as FetchTickSizeError,ga as FetchTotalEarningsForUserForDayError,oe as FetchTradedMarketCountError,Oa as GaslessTransactionHandle,Ba as GaslessTransactionMetadataSchema,za as IsWalletDeployedError,S as ListAccountTradesError,oa as ListActivityError,uc as ListBuilderLeaderboardError,pb as ListBuilderTradesError,wc as ListBuilderVolumeError,ie as ListClosedPositionsError,qa as ListComboActivityError,Ec as ListComboMarketsError,ke as ListComboPositionsError,kc as ListCommentsByUserAddressError,gc as ListCommentsError,Xb as ListCurrentRewardsError,mc as ListEventsError,Ac as ListMarketClarificationsError,Kc as ListMarketHoldersError,Oc as ListMarketPositionsError,Zb as ListMarketRewardsError,Cc as ListMarketsError,Mc as ListOpenInterestError,O as ListOpenOrdersError,Pd as ListPerpsCandlesError,Rd as ListPerpsFundingHistoryError,Td as ListPerpsTradesError,ge as ListPositionsError,rf as ListSeriesError,vf as ListSportsError,Cf as ListTagsError,Kf as ListTeamsError,yc as ListTraderLeaderboardError,ma as ListTradesError,ia as ListUserEarningsAndMarketsConfigError,ea as ListUserEarningsForDayError,Re as MergeComboPositionError,Qe as MergeMarketPositionError,Pe as MergePositionsError,Xd as OpenPerpsSessionError,gf as OpenRfqSessionError,wd as PlaceLimitOrderError,sd as PlaceMarketOrderError,$b as PlanCollateralReturnError,$c as PostOrderError,ad as PostOrdersError,bc as PrepareCollateralReturnExecutionError,Ta as PrepareErc1155ApprovalForAllError,Pa as PrepareErc20ApprovalError,Mf as PrepareErc20TransferError,Fa as PrepareGaslessTransactionError,id as PrepareLimitOrderError,md as PrepareLimitOrderPostingError,gd as PrepareMarketOrderError,kd as PrepareMarketOrderPostingError,ze as PrepareMergeComboPositionError,ye as PrepareMergeMarketPositionError,xe as PrepareMergePositionsError,Zd as PreparePerpsDepositError,Ce as PrepareRedeemComboPositionError,Be as PrepareRedeemMarketPositionsError,Ae as PrepareRedeemPositionsError,we as PrepareSplitComboPositionError,ve as PrepareSplitMarketPositionError,ue as PrepareSplitPositionError,Xa as PrepareTradingApprovalsError,Ye as RedeemPositionsError,zb as ResolveConditionByTokenError,nb as RevokeBuilderApiKeyError,Yd as RevokePerpsCredentialsError,df as RfqCancelQuoteError,cf as RfqCancelQuoteRejectedError,if as RfqConfirmationDecision,ff as RfqConfirmationError,ef as RfqConfirmationRejectedError,jf as RfqDirection,kf as RfqExecutionStatus,lf as RfqKnownErrorCode,bf as RfqQuoteError,af as RfqQuoteRejectedError,mf as RfqRequestedSizeUnit,nf as RfqSide,pf as SearchError,of as SearchSort,Za as SetupTradingApprovalsError,Ie as SplitComboPositionError,He as SplitMarketPositionError,Ge as SplitPositionError,Af as SubscribeError,Of as TransferErc20Error,_ as UpdateBalanceAllowanceError,Fd as UpdatePerpsLeverageError,Na as WaitForGaslessTransactionError,od as WaitForOrderFillSettlementError,$d as WithdrawFromPerpsError,Wa as approveErc1155ForAll,Sa as approveErc20,Ja as buildDepositWalletExecuteRequest,Ha as buildProxyWalletExecuteRequest,La as buildSafeWalletExecuteRequest,Vc as cancelAll,Xc as cancelMarketOrders,Rc as cancelOrder,Tc as cancelOrders,ab as createApiKey,kb as createBuilderApiKey,vd as createLimitOrder,rd as createMarketOrder,eb as createOrDeriveApiKey,ib as deleteApiKey,Da as deployDepositWallet,de as depositToPerps,cb as deriveApiKey,re as downloadAccountingSnapshot,X as dropNotifications,Zc as estimateMarketPrice,ec as executeCollateralReturnPlan,Ia as extractOnChainNonceFromSubmitError,gb as fetchApiKeys,Z as fetchBalanceAllowance,mb as fetchBuilderApiKeys,Eb as fetchBuilderFeeRates,xc as fetchBuilderVolume,N as fetchClosedOnlyMode,jc as fetchCommentsById,pc as fetchEvent,tc as fetchEventLiveVolume,rc as fetchEventTags,ya as fetchExecuteParams,Sb as fetchLastTradePrice,Ub as fetchLastTradePrices,Hc as fetchMarket,Cb as fetchMarketInfo,Jc as fetchMarketTags,sb as fetchMidpoint,ub as fetchMidpoints,yb as fetchNegRisk,V as fetchNotifications,R as fetchOrder,Kb as fetchOrderBook,Mb as fetchOrderBooks,ba as fetchOrderScoring,da as fetchOrdersScoring,Od as fetchPerpsBook,Wd as fetchPerpsFees,Id as fetchPerpsInstruments,Kd as fetchPerpsTicker,Md as fetchPerpsTickers,ne as fetchPortfolioValue,Gb as fetchPrice,Wb as fetchPriceHistory,Ib as fetchPrices,$e as fetchPublicProfile,Jf as fetchRelatedTagResources,Hf as fetchRelatedTags,la as fetchRewardPercentages,uf as fetchSeries,yf as fetchSportsMarketTypes,Ob as fetchSpread,Qb as fetchSpreads,Ff as fetchTag,wb as fetchTickSize,ha as fetchTotalEarningsForUserForDay,pe as fetchTradedMarketCount,Ea as fetchTransaction,Ma as isRetryableGaslessSubmitError,Aa as isWalletDeployed,T as listAccountTrades,pa as listActivity,vc as listBuilderLeaderboard,qb as listBuilderTrades,je as listClosedPositions,ra as listComboActivity,Fc as listComboMarkets,le as listComboPositions,hc as listComments,lc as listCommentsByUserAddress,Yb as listCurrentRewards,nc as listEvents,Bc as listMarketClarifications,Lc as listMarketHolders,Pc as listMarketPositions,_b as listMarketRewards,Dc as listMarkets,Nc as listOpenInterest,P as listOpenOrders,Qd as listPerpsCandles,Sd as listPerpsFundingHistory,Ud as listPerpsTrades,he as listPositions,sf as listSeries,wf as listSports,Df as listTags,Lf as listTeams,zc as listTraderLeaderboard,na as listTrades,ja as listUserEarningsAndMarketsConfig,fa as listUserEarningsForDay,Te as mergeComboPosition,Se as mergeMarketPosition,Ue as mergePositions,ae as openPerpsSession,hf as openRfqSession,xd as placeLimitOrder,td as placeMarketOrder,ac as planCollateralReturn,bd as postOrder,cd as postOrders,cc as prepareCollateralReturnExecution,Ua as prepareErc1155ApprovalForAll,Qa as prepareErc20Approval,Nf as prepareErc20Transfer,Ga as prepareGaslessTransaction,jd as prepareLimitOrder,nd as prepareLimitOrderPosting,hd as prepareMarketOrder,ld as prepareMarketOrderPosting,Ne as prepareMergeComboPosition,Me as prepareMergeMarketPosition,Oe as prepareMergePositions,ce as preparePerpsDeposit,We as prepareRedeemComboPosition,Ve as prepareRedeemMarketPositions,Xe as prepareRedeemPositions,Ee as prepareSplitComboPosition,De as prepareSplitMarketPosition,Fe as prepareSplitPosition,Ya as prepareTradingApprovals,Ze as redeemPositions,Ka as resignDepositWalletExecuteRequest,Ab as resolveConditionByToken,_c as resolveEstimatedMarketPrice,ob as revokeBuilderApiKey,be as revokePerpsCredentials,qf as search,_a as setupTradingApprovals,fd as signOrder,Ke as splitComboPosition,Je as splitMarketPosition,Le as splitPosition,Bf as subscribe,Pf as transferErc20,$ as updateBalanceAllowance,pd as waitForOrderFillSettlement,ee as withdrawFromPerps}from'../chunk-NJ2FDU52.js';import'../chunk-4LDMO37Q.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {PolymarketError}from'@polymarket/types';var v=/^[$A-Z_a-z][$\w]*$/;function i(s){let r=c(s.issues);return r.length===0?"It was not possible to determine a more specific reason.":["Fix the following issues:",p(r)].join(`
|
|
2
|
+
`)}function u(s,r){let e=c(s.issues);return e.length===0?["Received an incompatible API response.",`Endpoint: ${r.endpoint}`,"This usually means the API response shape changed in a breaking way or the SDK is outdated.","It was not possible to determine a more specific reason."].join(`
|
|
3
|
+
`):["Received an incompatible API response.",`Endpoint: ${r.endpoint}`,"This usually means the API response shape changed in a breaking way or the SDK is outdated.","Fix the following issues:",p(e)].join(`
|
|
4
|
+
`)}function p(s){return s.map(e=>e.path===null?`- ${e.message}`:`- ${e.path}: ${e.message}`).join(`
|
|
5
|
+
`)}function c(s){return d(s).slice(0,99)}function d(s,r=[]){let e=s.flatMap(n=>{let a=[...r,...n.path];return n.code==="invalid_union"?n.errors.flatMap(A=>d(A,a)):[{code:n.code,message:n.message,path:a.length===0?null:U(a)}]});return O(e)}function O(s){let r=new Set,e=[];for(let n of s){let a=`${n.code}:${n.path??""}:${n.message}`;r.has(a)||(r.add(a),e.push(n));}return e.sort(Z)}function Z(s,r){return s.path===null&&r.path!==null?-1:s.path!==null&&r.path===null?1:(s.path??"").localeCompare(r.path??"")}function U(s){return s.reduce((r,e)=>typeof e=="number"?`${r}[${e.toString()}]`:typeof e!="string"?r:e.includes('"')?`${r}["${e.replaceAll('"','\\"')}"]`:v.test(e)?r.length===0?e:`${r}.${e}`:`${r}["${e}"]`,"")}var m=class s extends PolymarketError{name="UserInputError";constructor(r,e={}){super(r,e);}static fromZodError(r){return new s(i(r),{cause:r})}},l=class s extends PolymarketError{name="UnexpectedResponseError";constructor(r,e={}){super(r,e);}static fromZodError(r,e){return new s(u(r,e),{cause:r})}},f=class s extends PolymarketError{name="TransportError";constructor(r,e={}){super(r,e);}static fromError(r){return new s(r instanceof Error?r.message:"Request failed",{cause:r})}},P=(t=>(t[t.NormalClosure=1e3]="NormalClosure",t[t.GoingAway=1001]="GoingAway",t[t.ProtocolError=1002]="ProtocolError",t[t.UnsupportedData=1003]="UnsupportedData",t[t.NoStatusReceived=1005]="NoStatusReceived",t[t.AbnormalClosure=1006]="AbnormalClosure",t[t.InvalidFramePayload=1007]="InvalidFramePayload",t[t.PolicyViolation=1008]="PolicyViolation",t[t.MessageTooBig=1009]="MessageTooBig",t[t.InternalError=1011]="InternalError",t[t.ServiceRestart=1012]="ServiceRestart",t[t.TryAgainLater=1013]="TryAgainLater",t))(P||{}),g=class extends PolymarketError{name="ConnectionLostError";code;reason;constructor(r,e){super(r,e),this.code=e.code,this.reason=e.reason;}},y=class extends PolymarketError{name="RequestRejectedError";status;retryAfter;constructor(r,e){super(r,e),this.status=e.status,this.retryAfter=e.retryAfter;}},E=class extends PolymarketError{name="RateLimitError";retryAfter;constructor(r,e={}){super(r,e),this.retryAfter=e.retryAfter;}},I=class extends PolymarketError{name="TimeoutError";constructor(r,e={}){super(r,e);}},x=class extends PolymarketError{name="TransactionFailedError";constructor(r,e={}){super(r,e);}},h=class s extends PolymarketError{name="CancelledSigningError";constructor(r,e={}){super(r,e);}static fromError(r){return new s(r.message,{cause:r})}},$=class extends PolymarketError{name="InsufficientLiquidityError";constructor(r,e={}){super(r,e);}},R=class s extends PolymarketError{name="SigningError";constructor(r,e={}){super(r,e);}static fromError(r,e){let n=e??(r instanceof Error?r.message:"Signing failed");return new s(n,{cause:r})}};function M(...s){return {isError(r){return s.some(e=>r instanceof e)}}}export{m as a,l as b,f as c,P as d,g as e,y as f,E as g,I as h,x as i,h as j,$ as k,R as l,M as m};//# sourceMappingURL=chunk-4LDMO37Q.js.map
|
|
6
|
+
//# sourceMappingURL=chunk-4LDMO37Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/validation.ts","../src/errors.ts"],"names":["identifierRegex","formatInputZodError","error","issues","flattenIssues","formatIssues","formatResponseZodError","context","issue","flattenIssueBranches","pathPrefix","flattened","path","branch","formatPath","dedupeIssues","seen","deduped","key","compareIssues","left","right","result","segment","UserInputError","_UserInputError","PolymarketError","message","options","UnexpectedResponseError","_UnexpectedResponseError","TransportError","_TransportError","WebSocketKnownCloseCode","ConnectionLostError","RequestRejectedError","RateLimitError","TimeoutError","TransactionFailedError","CancelledSigningError","_CancelledSigningError","InsufficientLiquidityError","SigningError","_SigningError","msg","makeErrorGuard","classes","c"],"mappings":"gDAGA,IAAMA,CAAAA,CAAkB,oBAAA,CAejB,SAASC,CAAAA,CAAoBC,CAAAA,CAAyB,CAC3D,IAAMC,CAAAA,CAASC,CAAAA,CAAcF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AAO,EACxB,CACF,CAAA,CAKaW,CAAAA,CAAN,MAAMC,CAAAA,SAA8Bd,eAAgB,CAChD,IAAA,CAAO,uBAAA,CAEhB,YAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAU1B,CAAAA,CAAqC,CACpD,OAAO,IAAIsC,CAAAA,CAAsBtC,EAAM,OAAA,CAAS,CAC9C,KAAA,CAAOA,CACT,CAAC,CACH,CACF,CAAA,CAMauC,CAAAA,CAAN,cAAyCf,eAAgB,CACrD,IAAA,CAAO,4BAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,GAAI,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CACF,CAAA,CAMac,CAAAA,CAAN,MAAMC,CAAAA,SAAqBjB,eAAgB,CACvC,IAAA,CAAO,cAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAU1B,EAAgByB,CAAAA,CAAgC,CAC/D,IAAMiB,CAAAA,CACJjB,CAAAA,GAAYzB,CAAAA,YAAiB,KAAA,CAAQA,CAAAA,CAAM,QAAU,gBAAA,CAAA,CACvD,OAAO,IAAIyC,CAAAA,CAAaC,EAAK,CAAE,KAAA,CAAO1C,CAAM,CAAC,CAC/C,CACF,EAEO,SAAS2C,CAAAA,CAAAA,GAIXC,CAAAA,CACmE,CACtE,OAAO,CACL,QAAQ5C,CAAAA,CAAyD,CAC/D,OAAO4C,CAAAA,CAAQ,KAAMC,CAAAA,EAAM7C,CAAAA,YAAiB6C,CAAC,CAC/C,CACF,CACF","file":"chunk-4LDMO37Q.js","sourcesContent":["import type { core, ZodError } from 'zod';\n\nconst maxIssuesInMessage = 99;\nconst identifierRegex = /^[$A-Z_a-z][$\\w]*$/;\n\ntype UserInputIssue = {\n code: string;\n message: string;\n path: string | null;\n};\n\nexport type ResponseValidationContext = {\n endpoint: string;\n};\n\n/**\n * Formats a `ZodError` into an SDK-oriented input validation message.\n */\nexport function formatInputZodError(error: ZodError): string {\n const issues = flattenIssues(error.issues);\n\n if (issues.length === 0) {\n return 'It was not possible to determine a more specific reason.';\n }\n\n return ['Fix the following issues:', formatIssues(issues)].join('\\n');\n}\n\n/**\n * Formats a `ZodError` into an SDK-oriented response validation message.\n */\nexport function formatResponseZodError(\n error: ZodError,\n context: ResponseValidationContext,\n): string {\n const issues = flattenIssues(error.issues);\n\n if (issues.length === 0) {\n return [\n 'Received an incompatible API response.',\n `Endpoint: ${context.endpoint}`,\n 'This usually means the API response shape changed in a breaking way or the SDK is outdated.',\n 'It was not possible to determine a more specific reason.',\n ].join('\\n');\n }\n\n return [\n 'Received an incompatible API response.',\n `Endpoint: ${context.endpoint}`,\n 'This usually means the API response shape changed in a breaking way or the SDK is outdated.',\n 'Fix the following issues:',\n formatIssues(issues),\n ].join('\\n');\n}\n\nfunction formatIssues(issues: readonly UserInputIssue[]): string {\n const lines = issues.map((issue) => {\n if (issue.path === null) {\n return `- ${issue.message}`;\n }\n\n return `- ${issue.path}: ${issue.message}`;\n });\n\n return lines.join('\\n');\n}\n\nfunction flattenIssues(issues: readonly core.$ZodIssue[]): UserInputIssue[] {\n return flattenIssueBranches(issues).slice(0, maxIssuesInMessage);\n}\n\nfunction flattenIssueBranches(\n issues: readonly core.$ZodIssue[],\n pathPrefix: readonly PropertyKey[] = [],\n): UserInputIssue[] {\n const flattened = issues.flatMap((issue) => {\n const path = [...pathPrefix, ...issue.path];\n\n if (issue.code === 'invalid_union') {\n return issue.errors.flatMap((branch) =>\n flattenIssueBranches(branch, path),\n );\n }\n\n return [\n {\n code: issue.code,\n message: issue.message,\n path: path.length === 0 ? null : formatPath(path),\n } satisfies UserInputIssue,\n ];\n });\n\n return dedupeIssues(flattened);\n}\n\nfunction dedupeIssues(issues: readonly UserInputIssue[]): UserInputIssue[] {\n const seen = new Set<string>();\n const deduped: UserInputIssue[] = [];\n\n for (const issue of issues) {\n const key = `${issue.code}:${issue.path ?? ''}:${issue.message}`;\n\n if (seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n deduped.push(issue);\n }\n\n return deduped.sort(compareIssues);\n}\n\nfunction compareIssues(left: UserInputIssue, right: UserInputIssue): number {\n if (left.path === null && right.path !== null) {\n return -1;\n }\n\n if (left.path !== null && right.path === null) {\n return 1;\n }\n\n return (left.path ?? '').localeCompare(right.path ?? '');\n}\n\nfunction formatPath(path: readonly PropertyKey[]): string {\n return path.reduce<string>((result, segment) => {\n if (typeof segment === 'number') {\n return `${result}[${segment.toString()}]`;\n }\n\n if (typeof segment !== 'string') {\n return result;\n }\n\n if (segment.includes('\"')) {\n return `${result}[\"${segment.replaceAll('\"', '\\\\\"')}\"]`;\n }\n\n if (!identifierRegex.test(segment)) {\n return `${result}[\"${segment}\"]`;\n }\n\n if (result.length === 0) {\n return segment;\n }\n\n return `${result}.${segment}`;\n }, '');\n}\n","import { PolymarketError } from '@polymarket/types';\nimport type { ZodError } from 'zod';\nimport {\n formatInputZodError,\n formatResponseZodError,\n type ResponseValidationContext,\n} from './validation';\n\n/**\n * Error thrown when an action input fails SDK validation before a request is\n * sent.\n */\nexport class UserInputError extends PolymarketError {\n override name = 'UserInputError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromZodError(error: ZodError): UserInputError {\n return new UserInputError(formatInputZodError(error), {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when a service response does not match the action's expected\n * response shape.\n */\nexport class UnexpectedResponseError extends PolymarketError {\n override name = 'UnexpectedResponseError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromZodError(\n error: ZodError,\n context: ResponseValidationContext,\n ): UnexpectedResponseError {\n return new UnexpectedResponseError(formatResponseZodError(error, context), {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when the SDK cannot complete a request because of a network or\n * runtime transport failure.\n */\nexport class TransportError extends PolymarketError {\n override name = 'TransportError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: unknown): TransportError {\n return new TransportError(\n error instanceof Error ? error.message : 'Request failed',\n {\n cause: error,\n },\n );\n }\n}\n\n/**\n * WebSocket close codes defined by RFC 6455 and the IANA WebSocket Close Code\n * Number registry. Codes 4000-4999 are reserved for application use and are\n * intentionally not modeled here.\n */\nexport enum WebSocketKnownCloseCode {\n NormalClosure = 1000,\n GoingAway = 1001,\n ProtocolError = 1002,\n UnsupportedData = 1003,\n /** Synthesized locally when the peer closed without a status code. */\n NoStatusReceived = 1005,\n /** Synthesized locally when the connection dropped without a close frame. */\n AbnormalClosure = 1006,\n InvalidFramePayload = 1007,\n PolicyViolation = 1008,\n MessageTooBig = 1009,\n InternalError = 1011,\n ServiceRestart = 1012,\n TryAgainLater = 1013,\n}\n\n/**\n * A WebSocket close code. Codes enumerated in\n * {@link WebSocketKnownCloseCode} are defined by RFC 6455; other values, such\n * as application-defined 4000-4999 codes, flow through as plain numbers.\n */\nexport type WebSocketCloseCode = WebSocketKnownCloseCode | (number & {});\n\nexport type ConnectionLostErrorOptions = {\n /** WebSocket close code reported for the lost connection. */\n code: WebSocketCloseCode;\n /** Close reason provided by the peer. Empty when none was sent. */\n reason: string;\n};\n\n/**\n * Error thrown when a live connection ends without the SDK requesting it.\n */\nexport class ConnectionLostError extends PolymarketError {\n override name = 'ConnectionLostError' as const;\n\n readonly code: WebSocketCloseCode;\n readonly reason: string;\n\n constructor(\n message: string,\n options: ErrorOptions & ConnectionLostErrorOptions,\n ) {\n super(message, options);\n this.code = options.code;\n this.reason = options.reason;\n }\n}\n\nexport type RequestRejectedErrorOptions = {\n status: number;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n};\n\n/**\n * Error thrown when a service responds with a non-success status other than\n * rate limiting.\n */\nexport class RequestRejectedError extends PolymarketError {\n override name = 'RequestRejectedError' as const;\n\n readonly status: number;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n\n constructor(\n message: string,\n options: ErrorOptions & RequestRejectedErrorOptions,\n ) {\n super(message, options);\n this.status = options.status;\n this.retryAfter = options.retryAfter;\n }\n}\n\nexport type RateLimitErrorOptions = {\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n};\n\n/**\n * Error thrown when the service rejects a request because the rate limit has\n * been exceeded.\n */\nexport class RateLimitError extends PolymarketError {\n override name = 'RateLimitError' as const;\n\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n\n constructor(\n message: string,\n options: ErrorOptions & RateLimitErrorOptions = {},\n ) {\n super(message, options);\n this.retryAfter = options.retryAfter;\n }\n}\n\n/**\n * Error thrown when an async wait operation exceeds its allotted polling time.\n */\nexport class TimeoutError extends PolymarketError {\n override name = 'TimeoutError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when a submitted transaction reaches a terminal failure state.\n */\nexport class TransactionFailedError extends PolymarketError {\n override name = 'TransactionFailedError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when the user cancels a required wallet signing action.\n */\nexport class CancelledSigningError extends PolymarketError {\n override name = 'CancelledSigningError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: Error): CancelledSigningError {\n return new CancelledSigningError(error.message, {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when there is not enough resting market liquidity to satisfy the\n * requested execution semantics.\n */\nexport class InsufficientLiquidityError extends PolymarketError {\n override name = 'InsufficientLiquidityError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when the SDK cannot produce a required signature or\n * authentication payload.\n */\nexport class SigningError extends PolymarketError {\n override name = 'SigningError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: unknown, message?: string): SigningError {\n const msg =\n message ?? (error instanceof Error ? error.message : 'Signing failed');\n return new SigningError(msg, { cause: error });\n }\n}\n\nexport function makeErrorGuard<\n // biome-ignore lint/suspicious/noExplicitAny: constructor rest args require any[]\n TClasses extends ReadonlyArray<new (...args: any[]) => unknown>,\n>(\n ...classes: TClasses\n): { isError(error: unknown): error is InstanceType<TClasses[number]> } {\n return {\n isError(error: unknown): error is InstanceType<TClasses[number]> {\n return classes.some((c) => error instanceof c);\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {PolymarketError}from'@polymarket/types';var n=class s extends PolymarketError{name="TransportError";constructor(r,t={}){super(r,t);}static fromError(r){return new s(r instanceof Error?r.message:"Request failed",{cause:r})}};var a=class extends PolymarketError{name="TimeoutError";constructor(r,t={}){super(r,t);}},o=class extends PolymarketError{name="TransactionFailedError";constructor(r,t={}){super(r,t);}},i=class s extends PolymarketError{name="CancelledSigningError";constructor(r,t={}){super(r,t);}static fromError(r){return new s(r.message,{cause:r})}};var u=class s extends PolymarketError{name="SigningError";constructor(r,t={}){super(r,t);}static fromError(r,t){let p=t??(r instanceof Error?r.message:"Signing failed");return new s(p,{cause:r})}};export{n as a,a as b,o as c,i as d,u as e};//# sourceMappingURL=chunk-KZISI26J.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-KZISI26J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors.ts"],"names":["TransportError","_TransportError","PolymarketError","message","options","error","TimeoutError","TransactionFailedError","CancelledSigningError","_CancelledSigningError","SigningError","_SigningError","msg"],"mappings":"gDAmDO,IAAMA,EAAN,MAAMC,CAAAA,SAAuBC,eAAgB,CACzC,KAAO,gBAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAUC,EAAgC,CAC/C,OAAO,IAAIJ,CAAAA,CACTI,aAAiB,KAAA,CAAQA,CAAAA,CAAM,OAAA,CAAU,gBAAA,CACzC,CACE,KAAA,CAAOA,CACT,CACF,CACF,CACF,
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts"],"names":["TransportError","_TransportError","PolymarketError","message","options","error","TimeoutError","TransactionFailedError","CancelledSigningError","_CancelledSigningError","SigningError","_SigningError","msg"],"mappings":"gDAmDO,IAAMA,EAAN,MAAMC,CAAAA,SAAuBC,eAAgB,CACzC,KAAO,gBAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAUC,EAAgC,CAC/C,OAAO,IAAIJ,CAAAA,CACTI,aAAiB,KAAA,CAAQA,CAAAA,CAAM,OAAA,CAAU,gBAAA,CACzC,CACE,KAAA,CAAOA,CACT,CACF,CACF,CACF,EA2HO,IAAMC,CAAAA,CAAN,cAA2BJ,eAAgB,CACvC,IAAA,CAAO,cAAA,CAEhB,YAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CACF,CAAA,CAKaG,CAAAA,CAAN,cAAqCL,eAAgB,CACjD,IAAA,CAAO,wBAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,EAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,EAASC,CAAO,EACxB,CACF,CAAA,CAKaI,CAAAA,CAAN,MAAMC,CAAAA,SAA8BP,eAAgB,CAChD,IAAA,CAAO,uBAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,EAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,EAASC,CAAO,EACxB,CAEA,OAAO,UAAUC,CAAAA,CAAqC,CACpD,OAAO,IAAII,EAAsBJ,CAAAA,CAAM,OAAA,CAAS,CAC9C,KAAA,CAAOA,CACT,CAAC,CACH,CACF,MAkBaK,CAAAA,CAAN,MAAMC,CAAAA,SAAqBT,eAAgB,CACvC,IAAA,CAAO,cAAA,CAEhB,WAAA,CAAYC,CAAAA,CAAiBC,EAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,EAASC,CAAO,EACxB,CAEA,OAAO,UAAUC,CAAAA,CAAgBF,CAAAA,CAAgC,CAC/D,IAAMS,EACJT,CAAAA,GAAYE,CAAAA,YAAiB,KAAA,CAAQA,CAAAA,CAAM,QAAU,gBAAA,CAAA,CACvD,OAAO,IAAIM,CAAAA,CAAaC,EAAK,CAAE,KAAA,CAAOP,CAAM,CAAC,CAC/C,CACF","file":"chunk-KZISI26J.js","sourcesContent":["import { PolymarketError } from '@polymarket/types';\nimport type { ZodError } from 'zod';\nimport {\n formatInputZodError,\n formatResponseZodError,\n type ResponseValidationContext,\n} from './validation';\n\n/**\n * Error thrown when an action input fails SDK validation before a request is\n * sent.\n */\nexport class UserInputError extends PolymarketError {\n override name = 'UserInputError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromZodError(error: ZodError): UserInputError {\n return new UserInputError(formatInputZodError(error), {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when a service response does not match the action's expected\n * response shape.\n */\nexport class UnexpectedResponseError extends PolymarketError {\n override name = 'UnexpectedResponseError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromZodError(\n error: ZodError,\n context: ResponseValidationContext,\n ): UnexpectedResponseError {\n return new UnexpectedResponseError(formatResponseZodError(error, context), {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when the SDK cannot complete a request because of a network or\n * runtime transport failure.\n */\nexport class TransportError extends PolymarketError {\n override name = 'TransportError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: unknown): TransportError {\n return new TransportError(\n error instanceof Error ? error.message : 'Request failed',\n {\n cause: error,\n },\n );\n }\n}\n\n/**\n * WebSocket close codes defined by RFC 6455 and the IANA WebSocket Close Code\n * Number registry. Codes 4000-4999 are reserved for application use and are\n * intentionally not modeled here.\n */\nexport enum WebSocketKnownCloseCode {\n NormalClosure = 1000,\n GoingAway = 1001,\n ProtocolError = 1002,\n UnsupportedData = 1003,\n /** Synthesized locally when the peer closed without a status code. */\n NoStatusReceived = 1005,\n /** Synthesized locally when the connection dropped without a close frame. */\n AbnormalClosure = 1006,\n InvalidFramePayload = 1007,\n PolicyViolation = 1008,\n MessageTooBig = 1009,\n InternalError = 1011,\n ServiceRestart = 1012,\n TryAgainLater = 1013,\n}\n\n/**\n * A WebSocket close code. Codes enumerated in\n * {@link WebSocketKnownCloseCode} are defined by RFC 6455; other values, such\n * as application-defined 4000-4999 codes, flow through as plain numbers.\n */\nexport type WebSocketCloseCode = WebSocketKnownCloseCode | (number & {});\n\nexport type ConnectionLostErrorOptions = {\n /** WebSocket close code reported for the lost connection. */\n code: WebSocketCloseCode;\n /** Close reason provided by the peer. Empty when none was sent. */\n reason: string;\n};\n\n/**\n * Error thrown when a live connection ends without the SDK requesting it.\n */\nexport class ConnectionLostError extends PolymarketError {\n override name = 'ConnectionLostError' as const;\n\n readonly code: WebSocketCloseCode;\n readonly reason: string;\n\n constructor(\n message: string,\n options: ErrorOptions & ConnectionLostErrorOptions,\n ) {\n super(message, options);\n this.code = options.code;\n this.reason = options.reason;\n }\n}\n\nexport type RequestRejectedErrorOptions = {\n status: number;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n};\n\n/**\n * Error thrown when a service responds with a non-success status other than\n * rate limiting.\n */\nexport class RequestRejectedError extends PolymarketError {\n override name = 'RequestRejectedError' as const;\n\n readonly status: number;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n\n constructor(\n message: string,\n options: ErrorOptions & RequestRejectedErrorOptions,\n ) {\n super(message, options);\n this.status = options.status;\n this.retryAfter = options.retryAfter;\n }\n}\n\nexport type RateLimitErrorOptions = {\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n};\n\n/**\n * Error thrown when the service rejects a request because the rate limit has\n * been exceeded.\n */\nexport class RateLimitError extends PolymarketError {\n override name = 'RateLimitError' as const;\n\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n\n constructor(\n message: string,\n options: ErrorOptions & RateLimitErrorOptions = {},\n ) {\n super(message, options);\n this.retryAfter = options.retryAfter;\n }\n}\n\n/**\n * Error thrown when an async wait operation exceeds its allotted polling time.\n */\nexport class TimeoutError extends PolymarketError {\n override name = 'TimeoutError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when a submitted transaction reaches a terminal failure state.\n */\nexport class TransactionFailedError extends PolymarketError {\n override name = 'TransactionFailedError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when the user cancels a required wallet signing action.\n */\nexport class CancelledSigningError extends PolymarketError {\n override name = 'CancelledSigningError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: Error): CancelledSigningError {\n return new CancelledSigningError(error.message, {\n cause: error,\n });\n }\n}\n\n/**\n * Error thrown when there is not enough resting market liquidity to satisfy the\n * requested execution semantics.\n */\nexport class InsufficientLiquidityError extends PolymarketError {\n override name = 'InsufficientLiquidityError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n}\n\n/**\n * Error thrown when the SDK cannot produce a required signature or\n * authentication payload.\n */\nexport class SigningError extends PolymarketError {\n override name = 'SigningError' as const;\n\n constructor(message: string, options: ErrorOptions = {}) {\n super(message, options);\n }\n\n static fromError(error: unknown, message?: string): SigningError {\n const msg =\n message ?? (error instanceof Error ? error.message : 'Signing failed');\n return new SigningError(msg, { cause: error });\n }\n}\n\nexport function makeErrorGuard<\n // biome-ignore lint/suspicious/noExplicitAny: constructor rest args require any[]\n TClasses extends ReadonlyArray<new (...args: any[]) => unknown>,\n>(\n ...classes: TClasses\n): { isError(error: unknown): error is InstanceType<TClasses[number]> } {\n return {\n isError(error: unknown): error is InstanceType<TClasses[number]> {\n return classes.some((c) => error instanceof c);\n },\n };\n}\n"]}
|