@polymarket/client 0.9.0 → 0.11.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.
@@ -1,13 +1,13 @@
1
- import { c9 as RateLimitError, ch as RequestRejectedError, dk as TransportError, dn as UnexpectedResponseError, d9 as SigningError, B as BaseClient, q as BaseSecureClient } from '../types-MSQcyDVD.js';
2
- export { c as AcceptComboQuoteError, d as AcceptComboQuoteParams, e as AcceptComboQuoteResult, h as ApproveErc1155ForAllError, i as ApproveErc20Error, j as ArmPerpsAutoCancelError, k as ArmPerpsAutoCancelRequest, l as AuthorizeSessionKeyError, m as AuthorizeSessionKeyRequest, n as AuthorizeSessionKeyResult, C as CancelAllError, s as CancelAllPerpsOrdersRequest, t as CancelMarketOrdersError, dV as CancelMarketOrdersRequest, u as CancelOrderError, dW as CancelOrderRequest, v as CancelOrdersError, dX as CancelOrdersRequest, w as CancelPerpsOrderRequest, x as CancelPerpsOrdersRequest, dY as CollateralReturnExecutionWorkflow, G as ComboPositionSort, H as ComboPositionStatusFilter, I as ComboQuote, dZ as CommentsEventType, d_ as CommentsSubscription, M as CreatePerpsSessionRequest, O as CryptoPricesChainlinkTwapSubscription, d$ as CryptoPricesEventType, e0 as CryptoPricesSubscription, e1 as DeployDepositWalletError, Q as DepositToPerpsError, R as DepositToPerpsRequest, V as DisarmPerpsAutoCancelRequest, X as DownloadAccountingSnapshotError, e2 as DownloadAccountingSnapshotRequest, Y as DropNotificationsError, e3 as DropNotificationsRequest, e4 as EquityPricesEventType, e5 as EquityPricesSubscription, e6 as Erc1155ApprovalForAllWorkflow, e7 as Erc1155ApprovalForAllWorkflowRequest, a0 as Erc1155TradingApproval, e8 as Erc20ApprovalWorkflow, e9 as Erc20ApprovalWorkflowRequest, a1 as Erc20TradingApproval, ea as Erc20TransferWorkflow, eb as Erc20TransferWorkflowRequest, ec as EstimateMarketBuyPriceRequest, a2 as EstimateMarketPriceError, ed as EstimateMarketPriceRequest, ee as EstimateMarketSellPriceRequest, ef as EventForSubscriptionSpec, eg as EventForSubscriptionSpecs, a3 as ExecuteCollateralReturnPlanError, a4 as ExecuteCollateralReturnPlanRequest, eh as FetchBalanceAllowanceError, ei as FetchBalanceAllowanceRequest, ej as FetchBuilderFeeRatesError, ek as FetchBuilderFeeRatesRequest, a5 as FetchClosedOnlyModeError, a6 as FetchCommentsByIdError, el as FetchCommentsByIdRequest, a7 as FetchEventError, a8 as FetchEventLiveVolumeError, em as FetchEventLiveVolumeRequest, en as FetchEventRequest, a9 as FetchEventTagsError, eo as FetchEventTagsRequest, ep as FetchExecuteParamsError, eq as FetchExecuteParamsRequest, er as FetchGaslessTransactionRequest, aa as FetchLastTradePriceError, es as FetchLastTradePriceRequest, ab as FetchLastTradePricesError, et as FetchLastTradePricesRequest, ac as FetchMarketError, eu as FetchMarketInfoError, ev as FetchMarketInfoRequest, ew as FetchMarketRequest, ad as FetchMarketTagsError, ex as FetchMarketTagsRequest, ae as FetchMidpointError, ey as FetchMidpointRequest, af as FetchMidpointsError, ez as FetchMidpointsRequest, eA as FetchNegRiskError, eB as FetchNegRiskRequest, ag as FetchNotificationsError, ah as FetchOrderBookError, eC as FetchOrderBookRequest, ai as FetchOrderBooksError, eD as FetchOrderBooksRequest, aj as FetchOrderError, eE as FetchOrderRequest, ak as FetchOrderScoringError, eF as FetchOrderScoringRequest, al as FetchOrdersScoringError, eG as FetchOrdersScoringRequest, am as FetchPerpsAccountConfigRequest, an as FetchPerpsBookError, ao as FetchPerpsBookRequest, ap as FetchPerpsFeesError, aq as FetchPerpsInstrumentsError, ar as FetchPerpsInstrumentsRequest, as as FetchPerpsOpenOrdersRequest, at as FetchPerpsOrdersRequest, au as FetchPerpsTickerError, av as FetchPerpsTickerRequest, aw as FetchPerpsTickersError, ax as FetchPerpsTickersRequest, ay as FetchPortfolioValueError, eH as FetchPortfolioValueRequest, az as FetchPriceError, aA as FetchPriceHistoryError, eI as FetchPriceHistoryRequest, eJ as FetchPriceRequest, aB as FetchPricesError, eK as FetchPricesRequest, aC as FetchPublicProfileError, eL as FetchPublicProfileRequest, aD as FetchRelatedTagResourcesError, eM as FetchRelatedTagResourcesRequest, aE as FetchRelatedTagsError, eN as FetchRelatedTagsRequest, aF as FetchRewardPercentagesError, aG as FetchRfqStatusError, aH as FetchRfqStatusParams, aI as FetchSeriesError, eO as FetchSeriesRequest, aJ as FetchSessionKeysError, aK as FetchSpreadError, eP as FetchSpreadRequest, aL as FetchSpreadsError, eQ as FetchSpreadsRequest, aM as FetchTagError, eR as FetchTagRequest, eS as FetchTickSizeError, eT as FetchTickSizeRequest, aN as FetchTotalEarningsForUserForDayError, eU as FetchTotalEarningsForUserForDayRequest, aO as FetchTradedMarketCountError, eV as FetchTradedMarketCountRequest, aP as FetchTradingApprovalsStateError, aQ as FetchTradingApprovalsStateRequest, eW as GaslessTransactionMetadataSchema, eX as GaslessWorkflow, eY as GaslessWorkflowRequest, eZ as IsWalletDeployedError, e_ as IsWalletDeployedRequest, aS as ListAccountTradesError, e$ as ListAccountTradesRequest, aT as ListActivityError, f0 as ListActivityRequest, aU as ListBuilderLeaderboardError, f1 as ListBuilderLeaderboardRequest, aV as ListBuilderTradesError, f2 as ListBuilderTradesRequest, aW as ListBuilderVolumeError, f3 as ListBuilderVolumeRequest, aX as ListClosedPositionsError, f4 as ListClosedPositionsRequest, aY as ListComboActivityError, f5 as ListComboActivityRequest, aZ as ListComboMarketsError, f6 as ListComboMarketsRequest, a_ as ListComboPositionsError, f7 as ListComboPositionsRequest, a$ as ListCommentsByUserAddressError, f8 as ListCommentsByUserAddressRequest, b0 as ListCommentsError, f9 as ListCommentsRequest, b1 as ListCurrentRewardsError, fa as ListCurrentRewardsRequest, b2 as ListEventsError, fb as ListEventsRequest, fc as ListMarketClarificationsError, fd as ListMarketClarificationsRequest, b3 as ListMarketHoldersError, fe as ListMarketHoldersRequest, b4 as ListMarketPositionsError, ff as ListMarketPositionsRequest, b5 as ListMarketRewardsError, fg as ListMarketRewardsRequest, b6 as ListMarketsError, fh as ListMarketsRequest, b7 as ListOpenInterestError, fi as ListOpenInterestRequest, b8 as ListOpenOrdersError, fj as ListOpenOrdersRequest, b9 as ListPerpsCandlesError, ba as ListPerpsCandlesRequest, bb as ListPerpsDepositsRequest, bc as ListPerpsEquityHistoryRequest, bd as ListPerpsFillsRequest, be as ListPerpsFundingHistoryError, bf as ListPerpsFundingHistoryRequest, bg as ListPerpsFundingPaymentsRequest, bh as ListPerpsNotificationsRequest, bi as ListPerpsPnlHistoryRequest, bj as ListPerpsTradesError, bk as ListPerpsTradesRequest, bl as ListPerpsWithdrawalsRequest, bm as ListPositionsError, fk as ListPositionsRequest, bn as ListSeriesError, fl as ListSeriesRequest, bo as ListTagsError, fm as ListTagsRequest, bp as ListTeamsError, fn as ListTeamsRequest, bq as ListTraderLeaderboardError, fo as ListTraderLeaderboardRequest, br as ListTradesError, fp as ListTradesRequest, bs as ListUserEarningsAndMarketsConfigError, fq as ListUserEarningsAndMarketsConfigRequest, bt as ListUserEarningsForDayError, fr as ListUserEarningsForDayRequest, bu as MarkPerpsNotificationsReadRequest, fs as MarketEventType, ft as MarketSubscription, fu as MergeComboPositionError, fv as MergeMarketPositionError, bv as MergePositionsError, fw as MergePositionsWorkflow, fx as MergePositionsWorkflowRequest, bw as OpenPerpsSessionError, bx as OpenPerpsSessionRequest, by as OpenRfqSessionError, fy as OrderPostingWorkflow, bz as OrderSignature, fz as OrderWorkflow, fA as OrderWorkflowRequest, fB as PerpsBboSubscription, bE as PerpsBookDepth, fC as PerpsBookSubscription, fD as PerpsCandlesSubscription, fE as PerpsDepositWorkflow, fF as PerpsDepositWorkflowRequest, fG as PerpsMarketDataEventType, fH as PerpsMarketDataSubscription, bG as PerpsOrderRequest, bH as PerpsPlaceFokOrderRequest, bI as PerpsPlaceGtcOrderRequest, bJ as PerpsPlaceIocOrderRequest, bK as PerpsPlacedTpSlOrder, bL as PerpsPlacedTpSlOrders, bM as PerpsPositionTpSlTrigger, bN as PerpsSession, bO as PerpsSessionAccountError, bP as PerpsSessionLifecycleError, bQ as PerpsSessionTradingError, fI as PerpsStatisticsSubscription, fJ as PerpsStreamingCandleInterval, fK as PerpsTickersSubscription, bR as PerpsTpSlTrigger, fL as PerpsTradesSubscription, bS as PlacePerpsOrderRequest, bT as PlacePerpsOrderResult, bU as PlacePerpsOrderWithTpSlRequest, bV as PlacePerpsOrderWithTpSlResult, bW as PlacePerpsPositionTpSlRequest, bX as PlacePerpsPositionTpSlResult, bY as PlanCollateralReturnError, bZ as PostOrderError, b_ as PostOrdersError, fM as PostOrdersRequest, b$ as PostPerpsOrdersRequest, fN as PrepareCollateralReturnExecutionError, fO as PrepareErc1155ApprovalForAllError, fP as PrepareErc1155ApprovalForAllRequest, fQ as PrepareErc20ApprovalError, fR as PrepareErc20ApprovalRequest, fS as PrepareErc20TransferError, fT as PrepareErc20TransferRequest, fU as PrepareGaslessTransactionError, fV as PrepareGaslessTransactionRequest, fW as PrepareLimitOrderRequest, fX as PrepareMarketBuyOrderRequest, fY as PrepareMarketOrderRequest, fZ as PrepareMarketSellOrderRequest, f_ as PrepareMergeComboPositionError, f$ as PrepareMergeComboPositionRequest, g0 as PrepareMergeMarketPositionError, g1 as PrepareMergeMarketPositionRequest, g2 as PrepareMergePositionsError, g3 as PrepareMergePositionsRequest, g4 as PreparePerpsDepositError, g5 as PrepareRedeemComboPositionError, g6 as PrepareRedeemComboPositionRequest, g7 as PrepareRedeemMarketPositionsByConditionIdRequest, g8 as PrepareRedeemMarketPositionsByMarketIdRequest, g9 as PrepareRedeemMarketPositionsError, ga as PrepareRedeemMarketPositionsRequest, gb as PrepareRedeemPositionRequest, gc as PrepareRedeemPositionsError, gd as PrepareRedeemPositionsRequest, ge as PrepareSplitComboPositionError, gf as PrepareSplitComboPositionRequest, gg as PrepareSplitMarketPositionError, gh as PrepareSplitMarketPositionRequest, gi as PrepareSplitPositionError, gj as PrepareSplitPositionRequest, gk as PrepareTradingApprovalsError, gl as PublicRealtimeEvent, gm as PublicRealtimeTopic, gn as PublicSubscriptionSpec, cd as RedeemPositionsError, go as RedeemPositionsWorkflow, gp as RedeemPositionsWorkflowRequest, ce as RequestComboQuoteError, cf as RequestComboQuoteParams, cg as RequestComboQuoteResult, gq as ResolveConditionByTokenError, gr as ResolveConditionByTokenRequest, ck as ResumePerpsSessionRequest, cl as RevokePerpsCredentialsError, cm as RevokePerpsCredentialsRequest, cn as RevokeSessionKeyError, co as RevokeSessionKeyRequest, cp as RfqCancelQuoteAck, cq as RfqCancelQuoteError, cr as RfqCancelQuoteRejectedError, cs as RfqCancelQuoteRejectedErrorOptions, ct as RfqConfirmationAck, cu as RfqConfirmationError, cv as RfqConfirmationRejectedError, gs as RfqConfirmationRejectedErrorOptions, cw as RfqConfirmationRequestEvent, cx as RfqEvent, gt as RfqExecutionUpdateEvent, cy as RfqQuoteError, cz as RfqQuoteReference, cA as RfqQuoteRejectedError, cB as RfqQuoteRejectedErrorOptions, cC as RfqQuoteRequestEvent, cD as RfqQuoteResponse, cE as RfqQuoteSource, cF as RfqRequestRejectedError, cG as RfqRequestRejectedErrorOptions, cH as RfqSession, cI as RfqStatusResult, cJ as RfqTradeEvent, cK as SearchError, gu as SearchRequest, gv as SearchResults, cL as SearchSort, gw as SecureRealtimeEvent, gx as SecureRealtimeTopic, gy as SecureSubscriptionSpec, d2 as SessionKey, d5 as SetupTradingApprovalsError, d6 as SignedOrder, gz as SplitComboPositionError, gA as SplitMarketPositionError, da as SplitPositionError, gB as SplitPositionWorkflow, gC as SplitPositionWorkflowRequest, gD as SportsEventType, gE as SportsSubscription, db as SubscribeError, gF as SubscriptionHandle, dd as TradingApprovalRequirements, de as TradingApprovalsState, gG as TradingApprovalsWorkflow, gH as TradingApprovalsWorkflowRequest, dj as TransferErc20Error, gI as UpdateBalanceAllowanceError, gJ as UpdateBalanceAllowanceRequest, dp as UpdatePerpsLeverageError, dq as UpdatePerpsLeverageRequest, dr as UpdatePerpsMarginError, ds as UpdatePerpsMarginRequest, gK as UserEventType, gL as UserSubscription, dt as WaitForComboFillError, du as WaitForComboFillParams, dv as WaitForComboFillResult, gM as WaitForGaslessTransactionError, dw as WaitForOrderFillSettlementError, gN as WaitForOrderFillSettlementRequest, dC as WithdrawFromPerpsError, dD as WithdrawFromPerpsRequest, gO as acceptComboQuote, gP as approveErc1155ForAll, gQ as approveErc20, gR as authorizeSessionKey, gS as cancelAll, gT as cancelMarketOrders, gU as cancelOrder, gV as cancelOrders, gW as deployDepositWallet, gX as depositToPerps, gY as downloadAccountingSnapshot, gZ as dropNotifications, g_ as estimateMarketPrice, g$ as executeCollateralReturnPlan, h0 as fetchBalanceAllowance, h1 as fetchBuilderFeeRates, h2 as fetchBuilderVolume, h3 as fetchClosedOnlyMode, h4 as fetchCommentsById, h5 as fetchEvent, h6 as fetchEventLiveVolume, h7 as fetchEventTags, h8 as fetchExecuteParams, h9 as fetchLastTradePrice, ha as fetchLastTradePrices, hb as fetchMarket, hc as fetchMarketInfo, hd as fetchMarketTags, he as fetchMidpoint, hf as fetchMidpoints, hg as fetchNegRisk, hh as fetchNotifications, hi as fetchOrder, hj as fetchOrderBook, hk as fetchOrderBooks, hl as fetchOrderScoring, hm as fetchOrdersScoring, hn as fetchPerpsBook, ho as fetchPerpsFees, hp as fetchPerpsInstruments, hq as fetchPerpsTicker, hr as fetchPerpsTickers, hs as fetchPortfolioValue, ht as fetchPrice, hu as fetchPriceHistory, hv as fetchPrices, hw as fetchPublicProfile, hx as fetchRelatedTagResources, hy as fetchRelatedTags, hz as fetchRewardPercentages, hA as fetchRfqStatus, hB as fetchSeries, hC as fetchSessionKeys, hD as fetchSpread, hE as fetchSpreads, hF as fetchTag, hG as fetchTickSize, hH as fetchTotalEarningsForUserForDay, hI as fetchTradedMarketCount, hJ as fetchTradingApprovalsState, hK as fetchTransaction, hL as isWalletDeployed, hM as listAccountTrades, hN as listActivity, hO as listBuilderLeaderboard, hP as listBuilderTrades, hQ as listClosedPositions, hR as listComboActivity, hS as listComboMarkets, hT as listComboPositions, hU as listComments, hV as listCommentsByUserAddress, hW as listCurrentRewards, hX as listEvents, hY as listMarketClarifications, hZ as listMarketHolders, h_ as listMarketPositions, h$ as listMarketRewards, i0 as listMarkets, i1 as listOpenInterest, i2 as listOpenOrders, i3 as listPerpsCandles, i4 as listPerpsFundingHistory, i5 as listPerpsTrades, i6 as listPositions, i7 as listSeries, i8 as listTags, i9 as listTeams, ia as listTraderLeaderboard, ib as listTrades, ic as listUserEarningsAndMarketsConfig, id as listUserEarningsForDay, ie as mergeComboPosition, ig as mergeMarketPosition, ih as mergePositions, ii as openPerpsSession, ij as openRfqSession, ik as planCollateralReturn, il as postOrder, im as postOrders, io as prepareCollateralReturnExecution, ip as prepareErc1155ApprovalForAll, iq as prepareErc20Approval, ir as prepareErc20Transfer, is as prepareGaslessTransaction, it as prepareMergeComboPosition, iu as prepareMergeMarketPosition, iv as prepareMergePositions, iw as preparePerpsDeposit, ix as prepareRedeemComboPosition, iy as prepareRedeemMarketPositions, iz as prepareRedeemPosition, iA as prepareRedeemPositions, iB as prepareSplitComboPosition, iC as prepareSplitMarketPosition, iD as prepareSplitPosition, iE as prepareTradingApprovals, iF as redeemPositions, iG as requestComboQuote, iH as resolveConditionByToken, iI as revokePerpsCredentials, iJ as revokeSessionKey, iK as search, iL as setupTradingApprovals, iM as splitComboPosition, iN as splitMarketPosition, iO as splitPosition, iP as subscribe, iQ as transferErc20, iR as updateBalanceAllowance, iS as waitForComboFill, iT as waitForOrderFillSettlement, iU as withdrawFromPerps } from '../types-MSQcyDVD.js';
1
+ import { ci as RateLimitError, cq as RequestRejectedError, dw as TransportError, dz as UnexpectedResponseError, dk as SigningError, B as BaseClient, q as BaseSecureClient } from '../types-BE9qerqa.js';
2
+ export { c as AcceptComboQuoteError, d as AcceptComboQuoteParams, e as AcceptComboQuoteResult, h as ApproveErc1155ForAllError, i as ApproveErc20Error, j as ArmPerpsAutoCancelError, k as ArmPerpsAutoCancelRequest, l as AuthorizeSessionKeyError, m as AuthorizeSessionKeyRequest, n as AuthorizeSessionKeyResult, C as CancelAllError, s as CancelAllPerpsOrdersRequest, t as CancelMarketOrdersError, e4 as CancelMarketOrdersRequest, u as CancelOrderError, e5 as CancelOrderRequest, v as CancelOrdersError, e6 as CancelOrdersRequest, w as CancelPerpsOrderRequest, x as CancelPerpsOrdersRequest, e7 as CollateralReturnExecutionWorkflow, G as ComboPositionStatusFilter, H as ComboQuote, e8 as CommentsEventType, J as CommentsSubscription, M as CreatePerpsSessionRequest, O as CryptoPriceSubscription, P as CryptoPricesChainlinkTwapSubscription, e9 as CryptoPricesEventType, Q as CryptoPricesSubscription, R as CryptoTwapPriceSubscription, ea as DeployDepositWalletError, W as DepositToPerpsError, X as DepositToPerpsRequest, Y as DisarmPerpsAutoCancelRequest, _ as DownloadAccountingSnapshotError, eb as DownloadAccountingSnapshotRequest, $ as DropNotificationsError, ec as DropNotificationsRequest, a3 as EquityPriceSubscription, ed as EquityPricesEventType, a4 as EquityPricesSubscription, ee as Erc1155ApprovalForAllWorkflow, ef as Erc1155ApprovalForAllWorkflowRequest, a5 as Erc1155TradingApproval, eg as Erc20ApprovalWorkflow, eh as Erc20ApprovalWorkflowRequest, a6 as Erc20TradingApproval, ei as Erc20TransferWorkflow, ej as Erc20TransferWorkflowRequest, ek as EstimateMarketBuyPriceRequest, a7 as EstimateMarketPriceError, el as EstimateMarketPriceRequest, em as EstimateMarketSellPriceRequest, en as EventForSubscriptionSpec, eo as EventForSubscriptionSpecs, a8 as ExecuteCollateralReturnPlanError, a9 as ExecuteCollateralReturnPlanRequest, ep as FetchBalanceAllowanceError, eq as FetchBalanceAllowanceRequest, er as FetchBuilderFeeRatesError, es as FetchBuilderFeeRatesRequest, aa as FetchBuilderVolumeError, et as FetchBuilderVolumeRequest, ab as FetchClosedOnlyModeError, ac as FetchCommentsByIdError, eu as FetchCommentsByIdRequest, ad as FetchEventError, ae as FetchEventLiveVolumeError, ev as FetchEventLiveVolumeRequest, ew as FetchEventRequest, af as FetchEventTagsError, ex as FetchEventTagsRequest, ey as FetchExecuteParamsError, ez as FetchExecuteParamsRequest, eA as FetchGaslessTransactionRequest, ag as FetchLastTradePriceError, eB as FetchLastTradePriceRequest, ah as FetchLastTradePricesError, eC as FetchLastTradePricesRequest, ai as FetchMarketError, eD as FetchMarketInfoError, eE as FetchMarketInfoRequest, eF as FetchMarketRequest, aj as FetchMarketTagsError, eG as FetchMarketTagsRequest, ak as FetchMidpointError, eH as FetchMidpointRequest, al as FetchMidpointsError, eI as FetchMidpointsRequest, eJ as FetchNegRiskError, eK as FetchNegRiskRequest, am as FetchNotificationsError, an as FetchOpenInterestError, eL as FetchOpenInterestRequest, ao as FetchOrderBookError, eM as FetchOrderBookRequest, ap as FetchOrderBooksError, eN as FetchOrderBooksRequest, aq as FetchOrderError, eO as FetchOrderRequest, ar as FetchOrderScoringError, eP as FetchOrderScoringRequest, as as FetchOrdersScoringError, eQ as FetchOrdersScoringRequest, at as FetchPerpsAccountConfigRequest, au as FetchPerpsBookError, av as FetchPerpsBookRequest, aw as FetchPerpsFeesError, ax as FetchPerpsInstrumentsError, ay as FetchPerpsInstrumentsRequest, az as FetchPerpsOpenOrdersRequest, aA as FetchPerpsOrdersRequest, aB as FetchPerpsTickerError, aC as FetchPerpsTickerRequest, aD as FetchPerpsTickersError, aE as FetchPerpsTickersRequest, aF as FetchPortfolioValueError, eR as FetchPortfolioValueRequest, aG as FetchPriceError, eS as FetchPriceRequest, aH as FetchPricesError, eT as FetchPricesRequest, aI as FetchPublicProfileError, eU as FetchPublicProfileRequest, aJ as FetchRelatedTagResourcesError, eV as FetchRelatedTagResourcesRequest, aK as FetchRelatedTagsError, eW as FetchRelatedTagsRequest, eX as FetchResolutionsByConditionRequest, eY as FetchResolutionsByEventRequest, eZ as FetchResolutionsByQuestionRequest, aL as FetchResolutionsError, e_ as FetchResolutionsRequest, aM as FetchRewardPercentagesError, aN as FetchRfqStatusError, aO as FetchRfqStatusParams, aP as FetchSeriesError, e$ as FetchSeriesRequest, aQ as FetchSessionKeysError, aR as FetchSpreadError, f0 as FetchSpreadRequest, aS as FetchSpreadsError, f1 as FetchSpreadsRequest, aT as FetchTagError, f2 as FetchTagRequest, f3 as FetchTickSizeError, f4 as FetchTickSizeRequest, aU as FetchTotalEarningsForUserForDayError, f5 as FetchTotalEarningsForUserForDayRequest, aV as FetchTraderLeaderboardStandingError, f6 as FetchTraderLeaderboardStandingRequest, aW as FetchTradingApprovalsStateError, aX as FetchTradingApprovalsStateRequest, aY as FetchUserPnlError, f7 as FetchUserPnlRequest, aZ as FetchUserStatsError, f8 as FetchUserStatsRequest, a_ as FetchUserVolumeError, f9 as FetchUserVolumeRequest, fa as GaslessTransactionMetadataSchema, fb as GaslessWorkflow, fc as GaslessWorkflowRequest, fd as IsWalletDeployedError, fe as IsWalletDeployedRequest, b0 as ListAccountTradesError, ff as ListAccountTradesRequest, b1 as ListActivityError, fg as ListActivityRequest, b2 as ListBiggestWinnersError, fh as ListBiggestWinnersRequest, b3 as ListBuilderLeaderboardError, fi as ListBuilderLeaderboardRequest, b4 as ListBuilderTradesError, fj as ListBuilderTradesRequest, b5 as ListComboActivityError, fk as ListComboActivityRequest, b6 as ListComboMarketsError, fl as ListComboMarketsRequest, b7 as ListComboPositionsError, fm as ListComboPositionsRequest, b8 as ListCommentsByUserAddressError, fn as ListCommentsByUserAddressRequest, b9 as ListCommentsError, fo as ListCommentsRequest, ba as ListCurrentRewardsError, fp as ListCurrentRewardsRequest, bb as ListEventsError, fq as ListEventsRequest, fr as ListMarketClarificationsError, fs as ListMarketClarificationsRequest, bc as ListMarketHoldersError, ft as ListMarketHoldersRequest, bd as ListMarketRewardsError, fu as ListMarketRewardsRequest, be as ListMarketsError, fv as ListMarketsRequest, bf as ListOpenOrdersError, fw as ListOpenOrdersRequest, bg as ListPerpsCandlesError, bh as ListPerpsCandlesRequest, bi as ListPerpsDepositsRequest, bj as ListPerpsEquityHistoryRequest, bk as ListPerpsFillsRequest, bl as ListPerpsFundingHistoryError, bm as ListPerpsFundingHistoryRequest, bn as ListPerpsFundingPaymentsRequest, bo as ListPerpsNotificationsRequest, bp as ListPerpsPnlHistoryRequest, bq as ListPerpsTradesError, br as ListPerpsTradesRequest, bs as ListPerpsWithdrawalsRequest, bt as ListPositionsError, fx as ListPositionsRequest, bu as ListPriceHistoryError, fy as ListPriceHistoryRequest, bv as ListSeriesError, fz as ListSeriesRequest, bw as ListTagsError, fA as ListTagsRequest, bx as ListTeamsError, fB as ListTeamsRequest, by as ListTraderLeaderboardError, fC as ListTraderLeaderboardRequest, bz as ListTradesError, fD as ListTradesRequest, bA as ListUserEarningsAndMarketsConfigError, fE as ListUserEarningsAndMarketsConfigRequest, bB as ListUserEarningsForDayError, fF as ListUserEarningsForDayRequest, bC as MarkPerpsNotificationsReadRequest, fG as MarketEventType, fH as MarketSubscription, fI as MergeComboPositionError, fJ as MergeMarketPositionError, bD as MergePositionsError, fK as MergePositionsWorkflow, fL as MergePositionsWorkflowRequest, bE as OpenPerpsSessionError, bF as OpenPerpsSessionRequest, bG as OpenRfqSessionError, fM as OrderPostingWorkflow, bH as OrderSignature, fN as OrderWorkflow, fO as OrderWorkflowRequest, fP as PerpsBboSubscription, bM as PerpsBookDepth, fQ as PerpsBookSubscription, fR as PerpsCandlesSubscription, fS as PerpsDepositWorkflow, fT as PerpsDepositWorkflowRequest, fU as PerpsMarketDataEventType, fV as PerpsMarketDataSubscription, bO as PerpsOrderRequest, bP as PerpsPlaceFokOrderRequest, bQ as PerpsPlaceGtcOrderRequest, bR as PerpsPlaceIocOrderRequest, bS as PerpsPlacedTpSlOrder, bT as PerpsPlacedTpSlOrders, bU as PerpsPositionTpSlTrigger, bV as PerpsSession, bW as PerpsSessionAccountError, bX as PerpsSessionLifecycleError, bY as PerpsSessionTradingError, fW as PerpsStatisticsSubscription, fX as PerpsStreamingCandleInterval, fY as PerpsTickersSubscription, bZ as PerpsTpSlTrigger, fZ as PerpsTradesSubscription, b_ as PlacePerpsOrderRequest, b$ as PlacePerpsOrderResult, c0 as PlacePerpsOrderWithTpSlRequest, c1 as PlacePerpsOrderWithTpSlResult, c2 as PlacePerpsPositionTpSlRequest, c3 as PlacePerpsPositionTpSlResult, c4 as PlanCollateralReturnError, c5 as PostOrderError, c6 as PostOrdersError, f_ as PostOrdersRequest, c7 as PostPerpsOrdersRequest, f$ as PrepareCollateralReturnExecutionError, g0 as PrepareErc1155ApprovalForAllError, g1 as PrepareErc1155ApprovalForAllRequest, g2 as PrepareErc20ApprovalError, g3 as PrepareErc20ApprovalRequest, g4 as PrepareErc20TransferError, g5 as PrepareErc20TransferRequest, g6 as PrepareGaslessTransactionError, g7 as PrepareGaslessTransactionRequest, g8 as PrepareLimitOrderRequest, g9 as PrepareMarketBuyOrderRequest, ga as PrepareMarketOrderRequest, gb as PrepareMarketSellOrderRequest, gc as PrepareMergeComboPositionError, gd as PrepareMergeComboPositionRequest, ge as PrepareMergeMarketPositionError, gf as PrepareMergeMarketPositionRequest, gg as PrepareMergePositionsError, gh as PrepareMergePositionsRequest, gi as PreparePerpsDepositError, gj as PrepareRedeemComboPositionError, gk as PrepareRedeemComboPositionRequest, gl as PrepareRedeemMarketPositionsByConditionIdRequest, gm as PrepareRedeemMarketPositionsByMarketIdRequest, gn as PrepareRedeemMarketPositionsError, go as PrepareRedeemMarketPositionsRequest, gp as PrepareRedeemPositionRequest, gq as PrepareRedeemPositionsError, gr as PrepareRedeemPositionsRequest, gs as PrepareSplitComboPositionError, gt as PrepareSplitComboPositionRequest, gu as PrepareSplitMarketPositionError, gv as PrepareSplitMarketPositionRequest, gw as PrepareSplitPositionError, gx as PrepareSplitPositionRequest, gy as PrepareTradingApprovalsError, c8 as PriceSubscription, gz as PublicRealtimeEvent, gA as PublicRealtimeTopic, gB as PublicSubscriptionSpec, cm as RedeemPositionsError, gC as RedeemPositionsWorkflow, gD as RedeemPositionsWorkflowRequest, cn as RequestComboQuoteError, co as RequestComboQuoteParams, cp as RequestComboQuoteResult, gE as ResolveConditionByTokenError, gF as ResolveConditionByTokenRequest, ct as ResumePerpsSessionRequest, cu as RevokePerpsCredentialsError, cv as RevokePerpsCredentialsRequest, cw as RevokeSessionKeyError, cx as RevokeSessionKeyRequest, cy as RfqCancelQuoteAck, cz as RfqCancelQuoteError, cA as RfqCancelQuoteRejectedError, cB as RfqCancelQuoteRejectedErrorOptions, cC as RfqConfirmationAck, cD as RfqConfirmationError, cE as RfqConfirmationRejectedError, gG as RfqConfirmationRejectedErrorOptions, cF as RfqConfirmationRequestEvent, cG as RfqEvent, gH as RfqExecutionUpdateEvent, cH as RfqQuoteError, cI as RfqQuoteReference, cJ as RfqQuoteRejectedError, cK as RfqQuoteRejectedErrorOptions, cL as RfqQuoteRequestEvent, cM as RfqQuoteResponse, cN as RfqQuoteSource, cO as RfqRequestRejectedError, cP as RfqRequestRejectedErrorOptions, cQ as RfqSession, cR as RfqStatusResult, cS as RfqTradeEvent, cT as SearchError, gI as SearchRequest, gJ as SearchResults, cU as SearchSort, gK as SecureRealtimeEvent, gL as SecureRealtimeTopic, gM as SecureSubscriptionSpec, dd as SessionKey, dg as SetupTradingApprovalsError, dh as SignedOrder, gN as SplitComboPositionError, gO as SplitMarketPositionError, dl as SplitPositionError, gP as SplitPositionWorkflow, gQ as SplitPositionWorkflowRequest, gR as SportsEventType, gS as SportsSubscription, dm as SubscribeError, gT as SubscriptionHandle, dp as TradingApprovalRequirements, dq as TradingApprovalsState, gU as TradingApprovalsWorkflow, gV as TradingApprovalsWorkflowRequest, dv as TransferErc20Error, gW as UpdateBalanceAllowanceError, gX as UpdateBalanceAllowanceRequest, dA as UpdatePerpsLeverageError, dB as UpdatePerpsLeverageRequest, dC as UpdatePerpsMarginError, dD as UpdatePerpsMarginRequest, gY as UserEventType, gZ as UserSubscription, dE as WaitForComboFillError, dF as WaitForComboFillParams, dG as WaitForComboFillResult, g_ as WaitForGaslessTransactionError, dH as WaitForOrderFillSettlementError, g$ as WaitForOrderFillSettlementRequest, dN as WithdrawFromPerpsError, dO as WithdrawFromPerpsRequest, h0 as acceptComboQuote, h1 as approveErc1155ForAll, h2 as approveErc20, h3 as authorizeSessionKey, h4 as cancelAll, h5 as cancelMarketOrders, h6 as cancelOrder, h7 as cancelOrders, h8 as deployDepositWallet, h9 as depositToPerps, ha as downloadAccountingSnapshot, hb as dropNotifications, hc as estimateMarketPrice, hd as executeCollateralReturnPlan, he as fetchBalanceAllowance, hf as fetchBuilderFeeRates, hg as fetchBuilderVolume, hh as fetchClosedOnlyMode, hi as fetchCommentsById, hj as fetchEvent, hk as fetchEventLiveVolume, hl as fetchEventTags, hm as fetchExecuteParams, hn as fetchLastTradePrice, ho as fetchLastTradePrices, hp as fetchMarket, hq as fetchMarketInfo, hr as fetchMarketTags, hs as fetchMidpoint, ht as fetchMidpoints, hu as fetchNegRisk, hv as fetchNotifications, hw as fetchOpenInterest, hx as fetchOrder, hy as fetchOrderBook, hz as fetchOrderBooks, hA as fetchOrderScoring, hB as fetchOrdersScoring, hC as fetchPerpsBook, hD as fetchPerpsFees, hE as fetchPerpsInstruments, hF as fetchPerpsTicker, hG as fetchPerpsTickers, hH as fetchPortfolioValue, hI as fetchPrice, hJ as fetchPrices, hK as fetchPublicProfile, hL as fetchRelatedTagResources, hM as fetchRelatedTags, hN as fetchResolutions, hO as fetchRewardPercentages, hP as fetchRfqStatus, hQ as fetchSeries, hR as fetchSessionKeys, hS as fetchSpread, hT as fetchSpreads, hU as fetchTag, hV as fetchTickSize, hW as fetchTotalEarningsForUserForDay, hX as fetchTraderLeaderboardStanding, hY as fetchTradingApprovalsState, hZ as fetchTransaction, h_ as fetchUserPnl, h$ as fetchUserStats, i0 as fetchUserVolume, i1 as isWalletDeployed, i2 as listAccountTrades, i3 as listActivity, i4 as listBiggestWinners, i5 as listBuilderLeaderboard, i6 as listBuilderTrades, i7 as listComboActivity, i8 as listComboMarkets, i9 as listComboPositions, ia as listComments, ib as listCommentsByUserAddress, ic as listCurrentRewards, id as listEvents, ie as listMarketClarifications, ig as listMarketHolders, ih as listMarketRewards, ii as listMarkets, ij as listOpenOrders, ik as listPerpsCandles, il as listPerpsFundingHistory, im as listPerpsTrades, io as listPositions, ip as listPriceHistory, iq as listSeries, ir as listTags, is as listTeams, it as listTraderLeaderboard, iu as listTrades, iv as listUserEarningsAndMarketsConfig, iw as listUserEarningsForDay, ix as mergeComboPosition, iy as mergeMarketPosition, iz as mergePositions, iA as openPerpsSession, iB as openRfqSession, iC as planCollateralReturn, iD as postOrder, iE as postOrders, iF as prepareCollateralReturnExecution, iG as prepareErc1155ApprovalForAll, iH as prepareErc20Approval, iI as prepareErc20Transfer, iJ as prepareGaslessTransaction, iK as prepareMergeComboPosition, iL as prepareMergeMarketPosition, iM as prepareMergePositions, iN as preparePerpsDeposit, iO as prepareRedeemComboPosition, iP as prepareRedeemMarketPositions, iQ as prepareRedeemPosition, iR as prepareRedeemPositions, iS as prepareSplitComboPosition, iT as prepareSplitMarketPosition, iU as prepareSplitPosition, iV as prepareTradingApprovals, iW as redeemPositions, iX as requestComboQuote, iY as resolveConditionByToken, iZ as revokePerpsCredentials, i_ as revokeSessionKey, i$ as search, j0 as setupTradingApprovals, j1 as splitComboPosition, j2 as splitMarketPosition, j3 as splitPosition, j4 as subscribe, j5 as transferErc20, j6 as updateBalanceAllowance, j7 as waitForComboFill, j8 as waitForOrderFillSettlement, j9 as withdrawFromPerps } from '../types-BE9qerqa.js';
3
3
  import { ApiKey } from '@polymarket/bindings';
4
4
  export { SessionSignerKnownScope as SessionKeyKnownScope, SessionSignerScope as SessionKeyScope } from '@polymarket/bindings';
5
5
  import { ApiKeyCreds, BuilderApiKeyCreds, BuilderApiKey } from '@polymarket/bindings/clob';
6
6
  import { EvmAddress, EvmSignature } from '@polymarket/types';
7
- 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-B_JL_y8H.js';
7
+ 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-C7mI-H0Z.js';
8
+ export { BiggestWinnerKind, BuilderVolumeInterval, ComboActivityType, ComboPositionSortBy, ComboPositionStatus, LeaderboardWindow, PositionFilterType, PositionSortBy, PositionStatus, PriceHistoryInterval, ResolutionMarketType, ResolutionReporter, ResolutionSource, ResolutionStatus, SortDirection, TipSide, TradeFilterType, TraderLeaderboardSort, UserPnlFidelity, UserPnlInterval } from '@polymarket/bindings/data';
8
9
  export { BuilderRfqError, CollateralReturnKnownOperationKind, CollateralReturnOperation, CollateralReturnOperationKind, CollateralReturnPlanResponse, CollateralReturnPositionAmount, CollateralReturnPositionSummary, CollateralReturnRouterCall, ComboAcceptFailureReason, ComboQuoteUnavailableReason, RfqConfirmationDecision, RfqConfirmationRequest, RfqDirection, RfqErrorCode, RfqExecutionStatus, RfqExecutionUpdate, RfqId, RfqKnownErrorCode, RfqQuoteId, RfqQuoteRequest, RfqRejectionCode, RfqRequestedSize, RfqRequestedSizeUnit, RfqRequestorPublicId, RfqSide, RfqStatus, RfqTrade } from '@polymarket/bindings/combos';
9
- export { ComboActivityType, ComboPositionOutcome, ComboPositionStatus } from '@polymarket/bindings/data';
10
- 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
+ export { CommentsEvent, CryptoPriceEvent, CryptoPriceSnapshotEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapWindowSeconds, CryptoPricesEvent, CryptoTwapPriceEvent, CryptoTwapPriceSnapshotEvent, CustomMarketEvent, EquityPriceEvent, EquityPricesEvent, MarketEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsMarketDataEvent, PerpsSessionEvent, PerpsStatisticEvent, PerpsTickerEvent, PerpsTradeEvent, SportsEvent, StandardMarketEvent, UserEvent } from '@polymarket/bindings/subscriptions';
11
11
  export { PerpsAutoCancelStatus, PerpsCancelOrderResult, PerpsPostOrderAck, PerpsUpdateLeverageResult } from '@polymarket/bindings/perps';
12
12
  import '@polymarket/bindings/gamma';
13
13
  import '@polymarket/bindings/relayer';
@@ -22,7 +22,7 @@ type ApiKeyAuthRequest = {
22
22
  };
23
23
  type CreateApiKeyError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
24
24
  declare const CreateApiKeyError: {
25
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
25
+ isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
26
26
  };
27
27
  /**
28
28
  * Creates a new API key from a signed L1 auth payload.
@@ -41,7 +41,7 @@ declare const CreateApiKeyError: {
41
41
  declare function createApiKey(client: BaseClient, request: ApiKeyAuthRequest): Promise<ApiKeyCreds>;
42
42
  type DeriveApiKeyError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
43
43
  declare const DeriveApiKeyError: {
44
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
44
+ isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
45
45
  };
46
46
  /**
47
47
  * Derives an existing API key from a signed L1 auth payload.
@@ -60,7 +60,7 @@ declare const DeriveApiKeyError: {
60
60
  declare function deriveApiKey(client: BaseClient, request: ApiKeyAuthRequest): Promise<ApiKeyCreds>;
61
61
  type CreateOrDeriveApiKeyError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
62
62
  declare const CreateOrDeriveApiKeyError: {
63
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
63
+ isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
64
64
  };
65
65
  /**
66
66
  * Creates an API key and falls back to derivation when it already exists.
@@ -79,7 +79,7 @@ declare const CreateOrDeriveApiKeyError: {
79
79
  declare function createOrDeriveApiKey(client: BaseClient, request: ApiKeyAuthRequest): Promise<ApiKeyCreds>;
80
80
  type FetchApiKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
81
81
  declare const FetchApiKeysError: {
82
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError | SigningError;
82
+ isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
83
83
  };
84
84
  /**
85
85
  * Fetches all API keys associated with the authenticated client.
@@ -98,7 +98,7 @@ declare const FetchApiKeysError: {
98
98
  declare function fetchApiKeys(client: BaseSecureClient): Promise<ApiKey[]>;
99
99
  type DeleteApiKeyError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
100
100
  declare const DeleteApiKeyError: {
101
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError | SigningError;
101
+ isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
102
102
  };
103
103
  /**
104
104
  * Deletes the authenticated API key.
@@ -118,7 +118,7 @@ declare const DeleteApiKeyError: {
118
118
  declare function deleteApiKey(client: BaseSecureClient): Promise<void>;
119
119
  type CreateBuilderApiKeyError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
120
120
  declare const CreateBuilderApiKeyError: {
121
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError | SigningError;
121
+ isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
122
122
  };
123
123
  /**
124
124
  * Creates a new builder API key for the authenticated client.
@@ -138,7 +138,7 @@ declare const CreateBuilderApiKeyError: {
138
138
  declare function createBuilderApiKey(client: BaseSecureClient): Promise<BuilderApiKeyCreds>;
139
139
  type FetchBuilderApiKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
140
140
  declare const FetchBuilderApiKeysError: {
141
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError | SigningError;
141
+ isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
142
142
  };
143
143
  /**
144
144
  * Fetches builder API keys associated with the authenticated client.
@@ -158,7 +158,7 @@ declare const FetchBuilderApiKeysError: {
158
158
  declare function fetchBuilderApiKeys(client: BaseSecureClient): Promise<BuilderApiKey[]>;
159
159
  type RevokeBuilderApiKeyError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
160
160
  declare const RevokeBuilderApiKeyError: {
161
- isError(error: unknown): error is UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError | SigningError;
161
+ isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
162
162
  };
163
163
  /**
164
164
  * Revokes a builder API key.
@@ -1,2 +1,2 @@
1
- export{yf as AcceptComboQuoteError,Ya as ApproveErc1155ForAllError,Ua as ApproveErc20Error,Pd as ArmPerpsAutoCancelError,Yf as AuthorizeSessionKeyError,Zc as CancelAllError,$c as CancelMarketOrdersError,Vc as CancelOrderError,Xc as CancelOrdersError,kc as CollateralReturnKnownOperationKind,Ef as ComboAcceptFailureReason,va as ComboActivityType,Ee as ComboPositionOutcome,re as ComboPositionSort,Fe as ComboPositionStatus,Ff as ComboQuoteUnavailableReason,eb as CreateApiKeyError,ob as CreateBuilderApiKeyError,Ed as CreateLimitOrderError,Ad as CreateMarketOrderError,ib as CreateOrDeriveApiKeyError,mb as DeleteApiKeyError,Fa as DeployDepositWalletError,ke as DepositToPerpsError,gb as DeriveApiKeyError,Ce as DownloadAccountingSnapshotError,Z as DropNotificationsError,bd as EstimateMarketPriceError,ic as ExecuteCollateralReturnPlanError,kb as FetchApiKeysError,$ as FetchBalanceAllowanceError,qb as FetchBuilderApiKeysError,Ib as FetchBuilderFeeRatesError,P as FetchClosedOnlyModeError,nc as FetchCommentsByIdError,tc as FetchEventError,xc as FetchEventLiveVolumeError,vc as FetchEventTagsError,Aa as FetchExecuteParamsError,Wb as FetchLastTradePriceError,Yb as FetchLastTradePricesError,Lc as FetchMarketError,Gb as FetchMarketInfoError,Nc as FetchMarketTagsError,wb as FetchMidpointError,yb as FetchMidpointsError,Cb as FetchNegRiskError,X as FetchNotificationsError,Ob as FetchOrderBookError,Qb as FetchOrderBooksError,T as FetchOrderError,da as FetchOrderScoringError,fa as FetchOrdersScoringError,Zd as FetchPerpsBookError,fe as FetchPerpsFeesError,Td as FetchPerpsInstrumentsError,Vd as FetchPerpsTickerError,Xd as FetchPerpsTickersError,ye as FetchPortfolioValueError,Kb as FetchPriceError,_b as FetchPriceHistoryError,Mb as FetchPricesError,lf as FetchPublicProfileError,mg as FetchRelatedTagResourcesError,kg as FetchRelatedTagsError,na as FetchRewardPercentagesError,Cf as FetchRfqStatusError,Tf as FetchSeriesError,Wf as FetchSessionKeysError,cg as FetchSportsMarketTypesError,Sb as FetchSpreadError,Ub as FetchSpreadsError,ig as FetchTagError,Ab as FetchTickSizeError,ja as FetchTotalEarningsForUserForDayError,Ae as FetchTradedMarketCountError,$a as FetchTradingApprovalsStateError,Ra as GaslessTransactionHandle,Ea as GaslessTransactionMetadataSchema,Ca as IsWalletDeployedError,V as ListAccountTradesError,ra as ListActivityError,zc as ListBuilderLeaderboardError,ub as ListBuilderTradesError,Bc as ListBuilderVolumeError,ue as ListClosedPositionsError,ta as ListComboActivityError,Jc as ListComboMarketsError,we as ListComboPositionsError,pc as ListCommentsByUserAddressError,lc as ListCommentsError,ac as ListCurrentRewardsError,rc as ListEventsError,Fc as ListMarketClarificationsError,Pc as ListMarketHoldersError,Tc as ListMarketPositionsError,cc as ListMarketRewardsError,Hc as ListMarketsError,Rc as ListOpenInterestError,R as ListOpenOrdersError,$d as ListPerpsCandlesError,be as ListPerpsFundingHistoryError,de as ListPerpsTradesError,se as ListPositionsError,Rf as ListSeriesError,ag as ListSportsError,gg as ListTagsError,og as ListTeamsError,Dc as ListTraderLeaderboardError,pa as ListTradesError,la as ListUserEarningsAndMarketsConfigError,ha as ListUserEarningsForDayError,$e as MergeComboPositionError,Ze as MergeMarketPositionError,Ye as MergePositionsError,he as OpenPerpsSessionError,tf as OpenRfqSessionError,Gd as PlaceLimitOrderError,Cd as PlaceMarketOrderError,ec as PlanCollateralReturnError,fd as PostOrderError,gd as PostOrdersError,gc as PrepareCollateralReturnExecutionError,Wa as PrepareErc1155ApprovalForAllError,Sa as PrepareErc20ApprovalError,qg as PrepareErc20TransferError,Ia as PrepareGaslessTransactionError,sd as PrepareLimitOrderError,wd as PrepareLimitOrderPostingError,qd as PrepareMarketOrderError,ud as PrepareMarketOrderPostingError,Ve as PrepareMergeComboPositionError,Te as PrepareMergeMarketPositionError,Se as PrepareMergePositionsError,je as PreparePerpsDepositError,gf as PrepareRedeemComboPositionError,df as PrepareRedeemMarketPositionsError,cf as PrepareRedeemPositionsError,Je as PrepareSplitComboPositionError,He as PrepareSplitMarketPositionError,Ge as PrepareSplitPositionError,_a as PrepareTradingApprovalsError,jf as RedeemPositionsError,wf as RequestComboQuoteError,Eb as ResolveConditionByTokenError,sb as RevokeBuilderApiKeyError,ie as RevokePerpsCredentialsError,_f as RevokeSessionKeyError,qf as RfqCancelQuoteError,pf as RfqCancelQuoteRejectedError,Gf as RfqConfirmationDecision,sf as RfqConfirmationError,rf as RfqConfirmationRejectedError,Hf as RfqDirection,If as RfqExecutionStatus,Jf as RfqKnownErrorCode,of as RfqQuoteError,nf as RfqQuoteRejectedError,Kf as RfqRejectionCode,vf as RfqRequestRejectedError,Lf as RfqRequestedSizeUnit,Mf as RfqSide,Nf as RfqStatus,Pf as SearchError,Of as SearchSort,Vf as SessionKeyKnownScope,cb as SetupTradingApprovalsError,Pe as SplitComboPositionError,Ne as SplitMarketPositionError,Me as SplitPositionError,eg as SubscribeError,sg as TransferErc20Error,ba as UpdateBalanceAllowanceError,Qd as UpdatePerpsLeverageError,Rd as UpdatePerpsMarginError,Af as WaitForComboFillError,Qa as WaitForGaslessTransactionError,yd as WaitForOrderFillSettlementError,le as WithdrawFromPerpsError,zf as acceptComboQuote,Za as approveErc1155ForAll,Va as approveErc20,Zf as authorizeSessionKey,Ma as buildDepositWalletExecuteRequest,Ka as buildProxyWalletExecuteRequest,Oa as buildSafeWalletExecuteRequest,_c as cancelAll,ad as cancelMarketOrders,Wc as cancelOrder,Yc as cancelOrders,fb as createApiKey,pb as createBuilderApiKey,Fd as createLimitOrder,Bd as createMarketOrder,jb as createOrDeriveApiKey,nb as deleteApiKey,Ga as deployDepositWallet,pe as depositToPerps,hb as deriveApiKey,De as downloadAccountingSnapshot,_ as dropNotifications,cd as estimateMarketPrice,jc as executeCollateralReturnPlan,La as extractOnChainNonceFromSubmitError,lb as fetchApiKeys,aa as fetchBalanceAllowance,rb as fetchBuilderApiKeys,Jb as fetchBuilderFeeRates,Cc as fetchBuilderVolume,Q as fetchClosedOnlyMode,oc as fetchCommentsById,uc as fetchEvent,yc as fetchEventLiveVolume,wc as fetchEventTags,Ba as fetchExecuteParams,Xb as fetchLastTradePrice,Zb as fetchLastTradePrices,Mc as fetchMarket,Hb as fetchMarketInfo,Oc as fetchMarketTags,xb as fetchMidpoint,zb as fetchMidpoints,Db as fetchNegRisk,Y as fetchNotifications,U as fetchOrder,Pb as fetchOrderBook,Rb as fetchOrderBooks,ea as fetchOrderScoring,ga as fetchOrdersScoring,_d as fetchPerpsBook,ge as fetchPerpsFees,Ud as fetchPerpsInstruments,Wd as fetchPerpsTicker,Yd as fetchPerpsTickers,ze as fetchPortfolioValue,Lb as fetchPrice,$b as fetchPriceHistory,Nb as fetchPrices,mf as fetchPublicProfile,ng as fetchRelatedTagResources,lg as fetchRelatedTags,oa as fetchRewardPercentages,Df as fetchRfqStatus,Uf as fetchSeries,Xf as fetchSessionKeys,dg as fetchSportsMarketTypes,Tb as fetchSpread,Vb as fetchSpreads,jg as fetchTag,Bb as fetchTickSize,ka as fetchTotalEarningsForUserForDay,Be as fetchTradedMarketCount,ab as fetchTradingApprovalsState,Ha as fetchTransaction,Pa as isRetryableGaslessSubmitError,Da as isWalletDeployed,W as listAccountTrades,sa as listActivity,Ac as listBuilderLeaderboard,vb as listBuilderTrades,ve as listClosedPositions,ua as listComboActivity,Kc as listComboMarkets,xe as listComboPositions,mc as listComments,qc as listCommentsByUserAddress,bc as listCurrentRewards,sc as listEvents,Gc as listMarketClarifications,Qc as listMarketHolders,Uc as listMarketPositions,dc as listMarketRewards,Ic as listMarkets,Sc as listOpenInterest,S as listOpenOrders,ae as listPerpsCandles,ce as listPerpsFundingHistory,ee as listPerpsTrades,te as listPositions,Sf as listSeries,bg as listSports,hg as listTags,pg as listTeams,Ec as listTraderLeaderboard,qa as listTrades,ma as listUserEarningsAndMarketsConfig,ia as listUserEarningsForDay,af as mergeComboPosition,_e as mergeMarketPosition,bf as mergePositions,me as openPerpsSession,uf as openRfqSession,Hd as placeLimitOrder,Dd as placeMarketOrder,fc as planCollateralReturn,hd as postOrder,id as postOrders,hc as prepareCollateralReturnExecution,Xa as prepareErc1155ApprovalForAll,Ta as prepareErc20Approval,rg as prepareErc20Transfer,Ja as prepareGaslessTransaction,td as prepareLimitOrder,xd as prepareLimitOrderPosting,rd as prepareMarketOrder,vd as prepareMarketOrderPosting,We as prepareMergeComboPosition,Ue as prepareMergeMarketPosition,Xe as prepareMergePositions,oe as preparePerpsDeposit,hf as prepareRedeemComboPosition,ef as prepareRedeemMarketPositions,ff as prepareRedeemPosition,if as prepareRedeemPositions,Ke as prepareSplitComboPosition,Ie as prepareSplitMarketPosition,Le as prepareSplitPosition,bb as prepareTradingApprovals,kf as redeemPositions,xf as requestComboQuote,Na as resignDepositWalletExecuteRequest,Fb as resolveConditionByToken,dd as resolveEstimatedMarketPrice,ed as resolveMarketPriceFromOrderBook,tb as revokeBuilderApiKey,ne as revokePerpsCredentials,$f as revokeSessionKey,Qf as search,db as setupTradingApprovals,pd as signOrder,Qe as splitComboPosition,Oe as splitMarketPosition,Re as splitPosition,fg as subscribe,tg as transferErc20,ca as updateBalanceAllowance,Bf as waitForComboFill,zd as waitForOrderFillSettlement,qe as withdrawFromPerps}from'../chunk-VY7OIGFI.js';import'../chunk-DLZLJOGO.js';//# sourceMappingURL=index.js.map
1
+ export{Vf as AcceptComboQuoteError,$a as ApproveErc1155ForAllError,Xa as ApproveErc20Error,ee as ArmPerpsAutoCancelError,tg as AuthorizeSessionKeyError,Qc as BiggestWinnerKind,Rc as BuilderVolumeInterval,nd as CancelAllError,pd as CancelMarketOrdersError,jd as CancelOrderError,ld as CancelOrdersError,lc as CollateralReturnKnownOperationKind,$f as ComboAcceptFailureReason,va as ComboActivityType,We as ComboPositionSortBy,Xe as ComboPositionStatus,ag as ComboQuoteUnavailableReason,hb as CreateApiKeyError,rb as CreateBuilderApiKeyError,Ud as CreateLimitOrderError,Qd as CreateMarketOrderError,lb as CreateOrDeriveApiKeyError,pb as DeleteApiKeyError,Ia as DeployDepositWalletError,Be as DepositToPerpsError,jb as DeriveApiKeyError,Ue as DownloadAccountingSnapshotError,Z as DropNotificationsError,rd as EstimateMarketPriceError,jc as ExecuteCollateralReturnPlanError,nb as FetchApiKeysError,$ as FetchBalanceAllowanceError,tb as FetchBuilderApiKeysError,Lb as FetchBuilderFeeRatesError,Ic as FetchBuilderVolumeError,P as FetchClosedOnlyModeError,oc as FetchCommentsByIdError,uc as FetchEventError,Ac as FetchEventLiveVolumeError,wc as FetchEventTagsError,Da as FetchExecuteParamsError,Zb as FetchLastTradePriceError,$b as FetchLastTradePricesError,$c as FetchMarketError,Jb as FetchMarketInfoError,bd as FetchMarketTagsError,zb as FetchMidpointError,Bb as FetchMidpointsError,Fb as FetchNegRiskError,X as FetchNotificationsError,hd as FetchOpenInterestError,Rb as FetchOrderBookError,Tb as FetchOrderBooksError,T as FetchOrderError,da as FetchOrderScoringError,fa as FetchOrdersScoringError,oe as FetchPerpsBookError,we as FetchPerpsFeesError,ie as FetchPerpsInstrumentsError,ke as FetchPerpsTickerError,me as FetchPerpsTickersError,Me as FetchPortfolioValueError,Nb as FetchPriceError,Pb as FetchPricesError,If as FetchPublicProfileError,Jg as FetchRelatedTagResourcesError,Hg as FetchRelatedTagsError,yc as FetchResolutionsError,na as FetchRewardPercentagesError,Zf as FetchRfqStatusError,og as FetchSeriesError,rg as FetchSessionKeysError,zg as FetchSportsMarketTypesError,Vb as FetchSpreadError,Xb as FetchSpreadsError,Fg as FetchTagError,Db as FetchTickSizeError,ja as FetchTotalEarningsForUserForDayError,Mc as FetchTraderLeaderboardStandingError,cb as FetchTradingApprovalsStateError,Qe as FetchUserPnlError,Oe as FetchUserStatsError,Se as FetchUserVolumeError,Ua as GaslessTransactionHandle,Ha as GaslessTransactionMetadataSchema,Fa as IsWalletDeployedError,Sc as LeaderboardWindow,V as ListAccountTradesError,ra as ListActivityError,Oc as ListBiggestWinnersError,Gc as ListBuilderLeaderboardError,xb as ListBuilderTradesError,ta as ListComboActivityError,Zc as ListComboMarketsError,Ke as ListComboPositionsError,qc as ListCommentsByUserAddressError,mc as ListCommentsError,bc as ListCurrentRewardsError,sc as ListEventsError,Uc as ListMarketClarificationsError,dd as ListMarketHoldersError,dc as ListMarketRewardsError,Xc as ListMarketsError,R as ListOpenOrdersError,qe as ListPerpsCandlesError,se as ListPerpsFundingHistoryError,ue as ListPerpsTradesError,Ie as ListPositionsError,fd as ListPriceHistoryError,mg as ListSeriesError,xg as ListSportsError,Dg as ListTagsError,Lg as ListTeamsError,Kc as ListTraderLeaderboardError,pa as ListTradesError,la as ListUserEarningsAndMarketsConfigError,ha as ListUserEarningsForDayError,wf as MergeComboPositionError,uf as MergeMarketPositionError,tf as MergePositionsError,ye as OpenPerpsSessionError,Qf as OpenRfqSessionError,Wd as PlaceLimitOrderError,Sd as PlaceMarketOrderError,fc as PlanCollateralReturnError,Ye as PositionFilterType,Ze as PositionSortBy,_e as PositionStatus,vd as PostOrderError,wd as PostOrdersError,hc as PrepareCollateralReturnExecutionError,Za as PrepareErc1155ApprovalForAllError,Va as PrepareErc20ApprovalError,Ng as PrepareErc20TransferError,La as PrepareGaslessTransactionError,Id as PrepareLimitOrderError,Md as PrepareLimitOrderPostingError,Gd as PrepareMarketOrderError,Kd as PrepareMarketOrderPostingError,qf as PrepareMergeComboPositionError,of as PrepareMergeMarketPositionError,nf as PrepareMergePositionsError,Ae as PreparePerpsDepositError,Df as PrepareRedeemComboPositionError,Af as PrepareRedeemMarketPositionsError,zf as PrepareRedeemPositionsError,ef as PrepareSplitComboPositionError,cf as PrepareSplitMarketPositionError,bf as PrepareSplitPositionError,bb as PrepareTradingApprovalsError,Wc as PriceHistoryInterval,Gf as RedeemPositionsError,Tf as RequestComboQuoteError,Cc as ResolutionMarketType,Dc as ResolutionReporter,Ec as ResolutionSource,Fc as ResolutionStatus,Hb as ResolveConditionByTokenError,vb as RevokeBuilderApiKeyError,ze as RevokePerpsCredentialsError,vg as RevokeSessionKeyError,Nf as RfqCancelQuoteError,Mf as RfqCancelQuoteRejectedError,bg as RfqConfirmationDecision,Pf as RfqConfirmationError,Of as RfqConfirmationRejectedError,cg as RfqDirection,dg as RfqExecutionStatus,eg as RfqKnownErrorCode,Lf as RfqQuoteError,Kf as RfqQuoteRejectedError,fg as RfqRejectionCode,Sf as RfqRequestRejectedError,gg as RfqRequestedSizeUnit,hg as RfqSide,ig as RfqStatus,kg as SearchError,jg as SearchSort,qg as SessionKeyKnownScope,fb as SetupTradingApprovalsError,wa as SortDirection,kf as SplitComboPositionError,if as SplitMarketPositionError,hf as SplitPositionError,Bg as SubscribeError,xa as TipSide,ya as TradeFilterType,Tc as TraderLeaderboardSort,Pg as TransferErc20Error,ba as UpdateBalanceAllowanceError,fe as UpdatePerpsLeverageError,ge as UpdatePerpsMarginError,$e as UserPnlFidelity,af as UserPnlInterval,Xf as WaitForComboFillError,Ta as WaitForGaslessTransactionError,Od as WaitForOrderFillSettlementError,Ce as WithdrawFromPerpsError,Wf as acceptComboQuote,ab as approveErc1155ForAll,Ya as approveErc20,ug as authorizeSessionKey,Pa as buildDepositWalletExecuteRequest,Na as buildProxyWalletExecuteRequest,Ra as buildSafeWalletExecuteRequest,od as cancelAll,qd as cancelMarketOrders,kd as cancelOrder,md as cancelOrders,ib as createApiKey,sb as createBuilderApiKey,Vd as createLimitOrder,Rd as createMarketOrder,mb as createOrDeriveApiKey,qb as deleteApiKey,Ja as deployDepositWallet,Ge as depositToPerps,kb as deriveApiKey,Ve as downloadAccountingSnapshot,_ as dropNotifications,sd as estimateMarketPrice,kc as executeCollateralReturnPlan,Oa as extractOnChainNonceFromSubmitError,ob as fetchApiKeys,aa as fetchBalanceAllowance,ub as fetchBuilderApiKeys,Mb as fetchBuilderFeeRates,Jc as fetchBuilderVolume,Q as fetchClosedOnlyMode,pc as fetchCommentsById,vc as fetchEvent,Bc as fetchEventLiveVolume,xc as fetchEventTags,Ea as fetchExecuteParams,_b as fetchLastTradePrice,ac as fetchLastTradePrices,ad as fetchMarket,Kb as fetchMarketInfo,cd as fetchMarketTags,Ab as fetchMidpoint,Cb as fetchMidpoints,Gb as fetchNegRisk,Y as fetchNotifications,id as fetchOpenInterest,U as fetchOrder,Sb as fetchOrderBook,Ub as fetchOrderBooks,ea as fetchOrderScoring,ga as fetchOrdersScoring,pe as fetchPerpsBook,xe as fetchPerpsFees,je as fetchPerpsInstruments,le as fetchPerpsTicker,ne as fetchPerpsTickers,Ne as fetchPortfolioValue,Ob as fetchPrice,Qb as fetchPrices,Jf as fetchPublicProfile,Kg as fetchRelatedTagResources,Ig as fetchRelatedTags,zc as fetchResolutions,oa as fetchRewardPercentages,_f as fetchRfqStatus,pg as fetchSeries,sg as fetchSessionKeys,Ag as fetchSportsMarketTypes,Wb as fetchSpread,Yb as fetchSpreads,Gg as fetchTag,Eb as fetchTickSize,ka as fetchTotalEarningsForUserForDay,Nc as fetchTraderLeaderboardStanding,db as fetchTradingApprovalsState,Ka as fetchTransaction,Re as fetchUserPnl,Pe as fetchUserStats,Te as fetchUserVolume,Sa as isRetryableGaslessSubmitError,Ga as isWalletDeployed,W as listAccountTrades,sa as listActivity,Pc as listBiggestWinners,Hc as listBuilderLeaderboard,yb as listBuilderTrades,ua as listComboActivity,_c as listComboMarkets,Le as listComboPositions,nc as listComments,rc as listCommentsByUserAddress,cc as listCurrentRewards,tc as listEvents,Vc as listMarketClarifications,ed as listMarketHolders,ec as listMarketRewards,Yc as listMarkets,S as listOpenOrders,re as listPerpsCandles,te as listPerpsFundingHistory,ve as listPerpsTrades,Je as listPositions,gd as listPriceHistory,ng as listSeries,yg as listSports,Eg as listTags,Mg as listTeams,Lc as listTraderLeaderboard,qa as listTrades,ma as listUserEarningsAndMarketsConfig,ia as listUserEarningsForDay,xf as mergeComboPosition,vf as mergeMarketPosition,yf as mergePositions,De as openPerpsSession,Rf as openRfqSession,Xd as placeLimitOrder,Td as placeMarketOrder,gc as planCollateralReturn,xd as postOrder,yd as postOrders,ic as prepareCollateralReturnExecution,_a as prepareErc1155ApprovalForAll,Wa as prepareErc20Approval,Og as prepareErc20Transfer,Ma as prepareGaslessTransaction,Jd as prepareLimitOrder,Nd as prepareLimitOrderPosting,Hd as prepareMarketOrder,Ld as prepareMarketOrderPosting,rf as prepareMergeComboPosition,pf as prepareMergeMarketPosition,sf as prepareMergePositions,Fe as preparePerpsDeposit,Ef as prepareRedeemComboPosition,Bf as prepareRedeemMarketPositions,Cf as prepareRedeemPosition,Ff as prepareRedeemPositions,ff as prepareSplitComboPosition,df as prepareSplitMarketPosition,gf as prepareSplitPosition,eb as prepareTradingApprovals,Hf as redeemPositions,Uf as requestComboQuote,Qa as resignDepositWalletExecuteRequest,Ib as resolveConditionByToken,td as resolveEstimatedMarketPrice,ud as resolveMarketPriceFromOrderBook,wb as revokeBuilderApiKey,Ee as revokePerpsCredentials,wg as revokeSessionKey,lg as search,gb as setupTradingApprovals,Fd as signOrder,lf as splitComboPosition,jf as splitMarketPosition,mf as splitPosition,Cg as subscribe,Qg as transferErc20,ca as updateBalanceAllowance,Yf as waitForComboFill,Pd as waitForOrderFillSettlement,He as withdrawFromPerps}from'../chunk-WZQAMVAC.js';import'../chunk-IPPWXOOG.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import'@polymarket/bindings/subscriptions';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 o=class extends PolymarketError{name="TimeoutError";constructor(r,t={}){super(r,t);}},a=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 p=class s extends PolymarketError{name="SigningError";constructor(r,t={}){super(r,t);}static fromError(r,t){let c=t??(r instanceof Error?r.message:"Signing failed");return new s(c,{cause:r})}};export{n as a,o as b,a as c,i as d,p as e};//# sourceMappingURL=chunk-HWJ7BEKG.js.map
2
+ //# sourceMappingURL=chunk-HWJ7BEKG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts"],"names":["TransportError","_TransportError","PolymarketError","message","options","error","TimeoutError","TransactionFailedError","CancelledSigningError","_CancelledSigningError","SigningError","_SigningError","msg"],"mappings":"2FAyDO,IAAMA,CAAAA,CAAN,MAAMC,UAAuBC,eAAgB,CACzC,IAAA,CAAO,gBAAA,CAEhB,YAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAUC,CAAAA,CAAgC,CAC/C,OAAO,IAAIJ,CAAAA,CACTI,CAAAA,YAAiB,KAAA,CAAQA,EAAM,OAAA,CAAU,gBAAA,CACzC,CACE,KAAA,CAAOA,CACT,CACF,CACF,CACF,MAwKaC,CAAAA,CAAN,cAA2BJ,eAAgB,CACvC,KAAO,cAAA,CAEhB,WAAA,CAAYC,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,YAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CACF,CAAA,CAKaI,CAAAA,CAAN,MAAMC,CAAAA,SAA8BP,eAAgB,CAChD,IAAA,CAAO,uBAAA,CAEhB,WAAA,CAAYC,EAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,MAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAUC,CAAAA,CAAqC,CACpD,OAAO,IAAII,CAAAA,CAAsBJ,CAAAA,CAAM,OAAA,CAAS,CAC9C,MAAOA,CACT,CAAC,CACH,CACF,EAkCO,IAAMK,CAAAA,CAAN,MAAMC,CAAAA,SAAqBT,eAAgB,CACvC,IAAA,CAAO,cAAA,CAEhB,WAAA,CAAYC,EAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,MAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAUC,CAAAA,CAAgBF,CAAAA,CAAgC,CAC/D,IAAMS,CAAAA,CACJT,CAAAA,GAAYE,CAAAA,YAAiB,KAAA,CAAQA,EAAM,OAAA,CAAU,gBAAA,CAAA,CACvD,OAAO,IAAIM,EAAaC,CAAAA,CAAK,CAAE,MAAOP,CAAM,CAAC,CAC/C,CACF","file":"chunk-HWJ7BEKG.js","sourcesContent":["export {\n type RealtimeErrorCode,\n RealtimeKnownErrorCode,\n} from '@polymarket/bindings/subscriptions';\n\nimport { PolymarketError } from '@polymarket/types';\nimport type { ZodError } from 'zod';\nimport type { RateLimitUpdate } from './rate-limit';\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\n/**\n * Trading restriction reported by the venue while orders cannot be placed\n * normally. The SDK does not retry automatically; callers decide how to\n * react, honoring {@link RequestRejectedError.retryAfter} when provided.\n */\nexport enum TradingRestriction {\n /** The matching engine is restarting and rejects order requests until it is back. */\n RESTARTING = 'restarting',\n /** Cancels and post-only orders are accepted; other orders are rejected. */\n POST_ONLY = 'post_only',\n}\n\nexport type RequestRejectedErrorOptions = {\n status: number;\n /**\n * Machine-readable error code from the response body, when the service\n * provided one.\n */\n code?: string;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n /**\n * Trading restriction that caused the rejection, when the response\n * identified one.\n */\n restriction?: TradingRestriction;\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 * Machine-readable error code from the response body, when the service\n * provided one.\n */\n readonly code?: string;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n /**\n * Trading restriction that caused the rejection, when the response\n * identified one.\n */\n readonly restriction?: TradingRestriction;\n\n constructor(\n message: string,\n options: ErrorOptions & RequestRejectedErrorOptions,\n ) {\n super(message, options);\n this.status = options.status;\n this.code = options.code;\n this.retryAfter = options.retryAfter;\n this.restriction = options.restriction;\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 * Rate-limit state reported with the rejection, when the response provided\n * it.\n */\n rateLimit?: RateLimitUpdate;\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 * Rate-limit state reported with the rejection, when the response provided\n * it.\n */\n readonly rateLimit?: RateLimitUpdate;\n\n constructor(\n message: string,\n options: ErrorOptions & RateLimitErrorOptions = {},\n ) {\n super(message, options);\n this.retryAfter = options.retryAfter;\n this.rateLimit = options.rateLimit;\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 arming auto-cancel is rejected because the account has\n * reached its daily auto-cancel trigger limit. Arming is rejected until the\n * daily counter resets at the next UTC midnight; clearing an existing\n * schedule is always allowed.\n *\n * @experimental This API may change in a breaking way in any release, including patch releases.\n */\nexport class AutoCancelDailyLimitError extends PolymarketError {\n override name = 'AutoCancelDailyLimitError' 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,6 @@
1
+ export{RealtimeKnownErrorCode as p}from'@polymarket/bindings/subscriptions';import {PolymarketError}from'@polymarket/types';var v=/^[$A-Z_a-z][$\w]*$/;function i(t){let r=c(t.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(t,r){let e=c(t.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(t){return t.map(e=>e.path===null?`- ${e.message}`:`- ${e.path}: ${e.message}`).join(`
5
+ `)}function c(t){return d(t).slice(0,99)}function d(t,r=[]){let e=t.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:T(a)}]});return U(e)}function U(t){let r=new Set,e=[];for(let n of t){let a=`${n.code}:${n.path??""}:${n.message}`;r.has(a)||(r.add(a),e.push(n));}return e.sort(Z)}function Z(t,r){return t.path===null&&r.path!==null?-1:t.path!==null&&r.path===null?1:(t.path??"").localeCompare(r.path??"")}function T(t){return t.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 t extends PolymarketError{name="UserInputError";constructor(r,e={}){super(r,e);}static fromZodError(r){return new t(i(r),{cause:r})}},l=class t extends PolymarketError{name="UnexpectedResponseError";constructor(r,e={}){super(r,e);}static fromZodError(r,e){return new t(u(r,e),{cause:r})}},f=class t extends PolymarketError{name="TransportError";constructor(r,e={}){super(r,e);}static fromError(r){return new t(r instanceof Error?r.message:"Request failed",{cause:r})}},L=(s=>(s[s.NormalClosure=1e3]="NormalClosure",s[s.GoingAway=1001]="GoingAway",s[s.ProtocolError=1002]="ProtocolError",s[s.UnsupportedData=1003]="UnsupportedData",s[s.NoStatusReceived=1005]="NoStatusReceived",s[s.AbnormalClosure=1006]="AbnormalClosure",s[s.InvalidFramePayload=1007]="InvalidFramePayload",s[s.PolicyViolation=1008]="PolicyViolation",s[s.MessageTooBig=1009]="MessageTooBig",s[s.InternalError=1011]="InternalError",s[s.ServiceRestart=1012]="ServiceRestart",s[s.TryAgainLater=1013]="TryAgainLater",s))(L||{}),y=class extends PolymarketError{name="ConnectionLostError";code;reason;constructor(r,e){super(r,e),this.code=e.code,this.reason=e.reason;}},P=(e=>(e.RESTARTING="restarting",e.POST_ONLY="post_only",e))(P||{}),g=class extends PolymarketError{name="RequestRejectedError";status;code;retryAfter;restriction;constructor(r,e){super(r,e),this.status=e.status,this.code=e.code,this.retryAfter=e.retryAfter,this.restriction=e.restriction;}},E=class extends PolymarketError{name="RateLimitError";retryAfter;rateLimit;constructor(r,e={}){super(r,e),this.retryAfter=e.retryAfter,this.rateLimit=e.rateLimit;}},x=class extends PolymarketError{name="TimeoutError";constructor(r,e={}){super(r,e);}},I=class extends PolymarketError{name="TransactionFailedError";constructor(r,e={}){super(r,e);}},h=class t extends PolymarketError{name="CancelledSigningError";constructor(r,e={}){super(r,e);}static fromError(r){return new t(r.message,{cause:r})}},R=class extends PolymarketError{name="InsufficientLiquidityError";constructor(r,e={}){super(r,e);}},$=class extends PolymarketError{name="AutoCancelDailyLimitError";constructor(r,e={}){super(r,e);}},O=class t 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 t(n,{cause:r})}};function N(...t){return {isError(r){return t.some(e=>r instanceof e)}}}export{m as a,l as b,f as c,L as d,y as e,P as f,g,E as h,x as i,I as j,h as k,R as l,$ as m,O as n,N as o};//# sourceMappingURL=chunk-IPPWXOOG.js.map
6
+ //# sourceMappingURL=chunk-IPPWXOOG.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","TradingRestriction","RequestRejectedError","RateLimitError","TimeoutError","TransactionFailedError","CancelledSigningError","_CancelledSigningError","InsufficientLiquidityError","AutoCancelDailyLimitError","SigningError","_SigningError","msg","makeErrorGuard","classes","c"],"mappings":"4HAGA,IAAMA,CAAAA,CAAkB,oBAAA,CAejB,SAASC,CAAAA,CAAoBC,EAAyB,CAC3D,IAAMC,CAAAA,CAASC,CAAAA,CAAcF,CAAAA,CAAM,MAAM,CAAA,CAEzC,OAAIC,EAAO,MAAA,GAAW,CAAA,CACb,0DAAA,CAGF,CAAC,2BAAA,CAA6BE,CAAAA,CAAaF,CAAM,CAAC,EAAE,IAAA,CAAK;AAAA,CAAI,CACtE,CAKO,SAASG,CAAAA,CACdJ,CAAAA,CACAK,CAAAA,CACQ,CACR,IAAMJ,CAAAA,CAASC,CAAAA,CAAcF,CAAAA,CAAM,MAAM,CAAA,CAEzC,OAAIC,CAAAA,CAAO,MAAA,GAAW,CAAA,CACb,CACL,wCAAA,CACA,CAAA,UAAA,EAAaI,CAAAA,CAAQ,QAAQ,CAAA,CAAA,CAC7B,6FAAA,CACA,0DACF,CAAA,CAAE,IAAA,CAAK;AAAA,CAAI,CAAA,CAGN,CACL,wCAAA,CACA,CAAA,UAAA,EAAaA,CAAAA,CAAQ,QAAQ,CAAA,CAAA,CAC7B,6FAAA,CACA,2BAAA,CACAF,CAAAA,CAAaF,CAAM,C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AMD,CAAAA,CAASC,CAAO,EACxB,CACF,CAAA,CAUae,CAAAA,CAAN,cAAwCjB,eAAgB,CACpD,IAAA,CAAO,2BAAA,CAEhB,YAAYC,CAAAA,CAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,KAAA,CAAMD,CAAAA,CAASC,CAAO,EACxB,CACF,CAAA,CAMagB,CAAAA,CAAN,MAAMC,CAAAA,SAAqBnB,eAAgB,CACvC,IAAA,CAAO,cAAA,CAEhB,WAAA,CAAYC,EAAiBC,CAAAA,CAAwB,EAAC,CAAG,CACvD,MAAMD,CAAAA,CAASC,CAAO,EACxB,CAEA,OAAO,SAAA,CAAU1B,CAAAA,CAAgByB,CAAAA,CAAgC,CAC/D,IAAMmB,CAAAA,CACJnB,CAAAA,GAAYzB,CAAAA,YAAiB,KAAA,CAAQA,EAAM,OAAA,CAAU,gBAAA,CAAA,CACvD,OAAO,IAAI2C,EAAaC,CAAAA,CAAK,CAAE,KAAA,CAAO5C,CAAM,CAAC,CAC/C,CACF,EAEO,SAAS6C,KAIXC,CAAAA,CACmE,CACtE,OAAO,CACL,QAAQ9C,CAAAA,CAAyD,CAC/D,OAAO8C,CAAAA,CAAQ,KAAMC,CAAAA,EAAM/C,CAAAA,YAAiB+C,CAAC,CAC/C,CACF,CACF","file":"chunk-IPPWXOOG.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","export {\n type RealtimeErrorCode,\n RealtimeKnownErrorCode,\n} from '@polymarket/bindings/subscriptions';\n\nimport { PolymarketError } from '@polymarket/types';\nimport type { ZodError } from 'zod';\nimport type { RateLimitUpdate } from './rate-limit';\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\n/**\n * Trading restriction reported by the venue while orders cannot be placed\n * normally. The SDK does not retry automatically; callers decide how to\n * react, honoring {@link RequestRejectedError.retryAfter} when provided.\n */\nexport enum TradingRestriction {\n /** The matching engine is restarting and rejects order requests until it is back. */\n RESTARTING = 'restarting',\n /** Cancels and post-only orders are accepted; other orders are rejected. */\n POST_ONLY = 'post_only',\n}\n\nexport type RequestRejectedErrorOptions = {\n status: number;\n /**\n * Machine-readable error code from the response body, when the service\n * provided one.\n */\n code?: string;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n retryAfter?: number;\n /**\n * Trading restriction that caused the rejection, when the response\n * identified one.\n */\n restriction?: TradingRestriction;\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 * Machine-readable error code from the response body, when the service\n * provided one.\n */\n readonly code?: string;\n /**\n * Server-requested delay in seconds before retrying, when the response\n * provided one.\n */\n readonly retryAfter?: number;\n /**\n * Trading restriction that caused the rejection, when the response\n * identified one.\n */\n readonly restriction?: TradingRestriction;\n\n constructor(\n message: string,\n options: ErrorOptions & RequestRejectedErrorOptions,\n ) {\n super(message, options);\n this.status = options.status;\n this.code = options.code;\n this.retryAfter = options.retryAfter;\n this.restriction = options.restriction;\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 * Rate-limit state reported with the rejection, when the response provided\n * it.\n */\n rateLimit?: RateLimitUpdate;\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 * Rate-limit state reported with the rejection, when the response provided\n * it.\n */\n readonly rateLimit?: RateLimitUpdate;\n\n constructor(\n message: string,\n options: ErrorOptions & RateLimitErrorOptions = {},\n ) {\n super(message, options);\n this.retryAfter = options.retryAfter;\n this.rateLimit = options.rateLimit;\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 arming auto-cancel is rejected because the account has\n * reached its daily auto-cancel trigger limit. Arming is rejected until the\n * daily counter resets at the next UTC midnight; clearing an existing\n * schedule is always allowed.\n *\n * @experimental This API may change in a breaking way in any release, including patch releases.\n */\nexport class AutoCancelDailyLimitError extends PolymarketError {\n override name = 'AutoCancelDailyLimitError' 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"]}