@liberfi.io/react-predict 0.3.31 → 0.3.33

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.
@@ -230,6 +230,47 @@ interface ListTradesMultiParams {
230
230
  type?: string;
231
231
  side?: string;
232
232
  }
233
+ /** Public profile of a comment author. */
234
+ interface PredictCommentProfile {
235
+ /** Display name, when the author set one. */
236
+ name?: string;
237
+ /** Generated pseudonym, shown when `name` is empty. */
238
+ pseudonym?: string;
239
+ /** Avatar image URL. */
240
+ profile_image?: string;
241
+ /** Provider proxy wallet (e.g. Polymarket Safe). */
242
+ proxy_wallet?: string;
243
+ /** Author wallet address; falls back to the base address upstream. */
244
+ user_address?: string;
245
+ }
246
+ /** A single user comment on a prediction event (or its parent series). */
247
+ interface PredictComment {
248
+ id: string;
249
+ body: string;
250
+ /** Present when the comment is a reply to another comment. */
251
+ parent_comment_id?: string;
252
+ /** ISO-8601 timestamp. */
253
+ created_at: string;
254
+ reaction_count: number;
255
+ profile: PredictCommentProfile;
256
+ }
257
+ /**
258
+ * Query parameters for `GET /api/v1/events/{slug}/comments`.
259
+ * `slug` is passed positionally to {@link PredictClient.listEventComments}.
260
+ */
261
+ interface ListCommentsParams {
262
+ /** Provider source. Only `"polymarket"` is supported today. */
263
+ source: ProviderSource;
264
+ limit?: number;
265
+ /** Opaque pagination cursor (offset string) from the previous page. */
266
+ cursor?: string;
267
+ /** Order field, e.g. `"createdAt"` or `"reactionCount"`. */
268
+ order?: string;
269
+ /** When true, sort ascending (requires `order`). */
270
+ ascending?: boolean;
271
+ /** When true, only comments from position holders. */
272
+ holders_only?: boolean;
273
+ }
233
274
  /** A single price-history data point. */
234
275
  interface PricePoint {
235
276
  /** Unix seconds. */
@@ -950,6 +991,21 @@ declare class PredictClient {
950
991
  * Maps to `GET /api/v1/events/:slug/similar?source=...`.
951
992
  */
952
993
  getSimilarEvents(slug: string, source: ProviderSource, params?: SimilarEventsParams): Promise<PredictEvent[]>;
994
+ /**
995
+ * List comments for a prediction event.
996
+ *
997
+ * Maps to `GET /api/v1/events/:slug/comments`.
998
+ *
999
+ * The server resolves the event to its parent series when one exists
1000
+ * (Polymarket attaches discussion at the series level for grouped events such
1001
+ * as World Cup matches) and otherwise returns event-level comments. Callers
1002
+ * stay unaware of the event-vs-series distinction.
1003
+ *
1004
+ * @param slug - Canonical event slug.
1005
+ * @param params - Query parameters (source, pagination, sort, holders filter).
1006
+ * @returns A paginated page of comments.
1007
+ */
1008
+ listEventComments(slug: string, params: ListCommentsParams): Promise<PredictPage<PredictComment>>;
953
1009
  /**
954
1010
  * Fetch a single prediction market by its slug.
955
1011
  *
@@ -1740,4 +1796,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
1740
1796
  */
1741
1797
  declare function getPolymarketSharesPrecision(tickSize: string): number;
1742
1798
 
1743
- export { type WsPriceEvent as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type DFlowSubmitRequest as F, type DFlowKYCStatus as G, type PolymarketSetupStatus as H, type WithdrawBuildRequest as I, type WithdrawSubmitResponse as J, type WithdrawSubmitRequest as K, type ListEventsParams as L, type MatchesParams as M, type WithdrawStatusResponse as N, type Orderbook as O, PredictClient as P, type PolymarketDepositAddresses as Q, type PolymarketSupportedAsset as R, type SimilarEventsParams as S, type PolymarketWithdrawResponse as T, type PolymarketWithdrawRequest as U, type PolymarketRedeemResponse as V, type WithdrawBuildResponse as W, type TickSizeResponse as X, type FeeRateResponse as Y, type WsConnectionStatus as Z, type WsDataMessage as _, PredictWsClient as a, fetchMarket as a$, type WsOrderbookEvent as a0, type WsTradeEvent as a1, type CreateOrderInput as a2, createPredictClient as a3, createPredictWsClient as a4, type PredictWsClientConfig as a5, type ProviderMeta as a6, type PredictTag as a7, type SettlementSource as a8, type MarketStatus as a9, type MatchesStats as aA, type MatchConfidenceTier as aB, type SignalTag as aC, type MatchLeg as aD, type MatchMarketFlat as aE, type WsChannel as aF, type WsChannelEvent as aG, type WsClientMessage as aH, type WsSubscribeMessage as aI, type WsPingMessage as aJ, type WsServerMessage as aK, type WsPongMessage as aL, type WsSubscribedMessage as aM, type WsErrorCode as aN, type WsErrorMessage as aO, type PolymarketRedeemPrepareInput as aP, type PolymarketRedeemPrepareResponse as aQ, type PolymarketRedeemInput as aR, eventQueryKey as aS, fetchEvent as aT, resolveTagSlug as aU, resolveEventsParams as aV, infiniteEventsQueryKey as aW, fetchEventsPage as aX, type ResolveEventsParamsInput as aY, type TagSlugSelection as aZ, marketQueryKey as a_, type MarketResult as aa, type MarketOutcome as ab, type OrderbookLevel as ac, type TradeType as ad, type EventSummary as ae, type MarketSummary as af, type PricePoint as ag, type PredictPosition as ah, type OrderStatus as ai, type OrderSide as aj, type DFlowOrderContext as ak, type PolymarketOrderType as al, type DepositBuildRequest as am, type DepositBuildResponse as an, type DepositSubmitRequest as ao, type DepositSubmitResponse as ap, type DepositStatusResponse as aq, type UnsignedTx as ar, type PolymarketBridgeToken as as, type PolymarketSupportedAssetsResponse as at, type PolymarketWithdrawPrepareRequest as au, type PolymarketWithdrawPrepareResponse as av, type MatchStatus as aw, type MatchGroupEntry as ax, type MatchGroupMarket as ay, type MatchSortField as az, type PredictPage as b, matchesQueryKey as b0, matchQueryKey as b1, fetchMatchesPage as b2, matchMarketsQueryKey as b3, fetchMatchMarketsPage as b4, CLOB_AUTH_DOMAIN as b5, CLOB_AUTH_TYPES as b6, buildClobAuthMessage as b7, hmacSha256Base64 as b8, buildPolymarketL2Headers as b9, derivePolymarketApiKey as ba, type HttpMethod as bb, type PolymarketL2HeadersInput as bc, type PolymarketL2Headers as bd, type BuildClobAuthMessageInput as be, CTF_EXCHANGE_ADDRESS as bf, NEG_RISK_CTF_EXCHANGE_ADDRESS as bg, USDC_ADDRESS as bh, POLYGON_CHAIN_ID as bi, buildCtfExchangeDomain as bj, CTF_ORDER_TYPES as bk, ORDER_TYPE as bl, SIDE as bm, buildOrderMessage as bn, buildSignedOrder as bo, buildClobPayload as bp, getPolymarketSharesPrecision as bq, type ClobOrderPayload as br, type BuildOrderMessageInput as bs, type OrderMessage as bt, type SignedOrder as bu, DEFAULT_PAGE_SIZE as bv, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type PositionsResponse as m, type ListOrdersParams as n, type PredictOrder as o, type ListOrdersMultiParams as p, type PredictOrdersResponse as q, type CancelOrderResult as r, type MatchGroupPage as s, type MatchGroup as t, type MatchMarketParams as u, type MatchMarketPage as v, type ListTradesParams as w, type ListTradesMultiParams as x, type DFlowQuoteResponse as y, type DFlowSubmitResponse as z };
1799
+ export { type WsConnectionStatus as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type DFlowQuoteResponse as F, type DFlowSubmitResponse as G, type DFlowSubmitRequest as H, type DFlowKYCStatus as I, type PolymarketSetupStatus as J, type WithdrawBuildRequest as K, type ListEventsParams as L, type MatchesParams as M, type WithdrawSubmitResponse as N, type Orderbook as O, PredictClient as P, type WithdrawSubmitRequest as Q, type WithdrawStatusResponse as R, type SimilarEventsParams as S, type PolymarketDepositAddresses as T, type PolymarketSupportedAsset as U, type PolymarketWithdrawResponse as V, type WithdrawBuildResponse as W, type PolymarketWithdrawRequest as X, type PolymarketRedeemResponse as Y, type TickSizeResponse as Z, type FeeRateResponse as _, PredictWsClient as a, type ResolveEventsParamsInput as a$, type WsDataMessage as a0, type WsPriceEvent as a1, type WsOrderbookEvent as a2, type WsTradeEvent as a3, type CreateOrderInput as a4, createPredictClient as a5, createPredictWsClient as a6, type PredictWsClientConfig as a7, type ProviderMeta as a8, type PredictTag as a9, type MatchGroupEntry as aA, type MatchGroupMarket as aB, type MatchSortField as aC, type MatchesStats as aD, type MatchConfidenceTier as aE, type SignalTag as aF, type MatchLeg as aG, type MatchMarketFlat as aH, type WsChannel as aI, type WsChannelEvent as aJ, type WsClientMessage as aK, type WsSubscribeMessage as aL, type WsPingMessage as aM, type WsServerMessage as aN, type WsPongMessage as aO, type WsSubscribedMessage as aP, type WsErrorCode as aQ, type WsErrorMessage as aR, type PolymarketRedeemPrepareInput as aS, type PolymarketRedeemPrepareResponse as aT, type PolymarketRedeemInput as aU, eventQueryKey as aV, fetchEvent as aW, resolveTagSlug as aX, resolveEventsParams as aY, infiniteEventsQueryKey as aZ, fetchEventsPage as a_, type SettlementSource as aa, type MarketStatus as ab, type MarketResult as ac, type MarketOutcome as ad, type OrderbookLevel as ae, type TradeType as af, type EventSummary as ag, type MarketSummary as ah, type PredictCommentProfile as ai, type PricePoint as aj, type PredictPosition as ak, type OrderStatus as al, type OrderSide as am, type DFlowOrderContext as an, type PolymarketOrderType as ao, type DepositBuildRequest as ap, type DepositBuildResponse as aq, type DepositSubmitRequest as ar, type DepositSubmitResponse as as, type DepositStatusResponse as at, type UnsignedTx as au, type PolymarketBridgeToken as av, type PolymarketSupportedAssetsResponse as aw, type PolymarketWithdrawPrepareRequest as ax, type PolymarketWithdrawPrepareResponse as ay, type MatchStatus as az, type PredictPage as b, type TagSlugSelection as b0, marketQueryKey as b1, fetchMarket as b2, matchesQueryKey as b3, matchQueryKey as b4, fetchMatchesPage as b5, matchMarketsQueryKey as b6, fetchMatchMarketsPage as b7, CLOB_AUTH_DOMAIN as b8, CLOB_AUTH_TYPES as b9, buildClobAuthMessage as ba, hmacSha256Base64 as bb, buildPolymarketL2Headers as bc, derivePolymarketApiKey as bd, type HttpMethod as be, type PolymarketL2HeadersInput as bf, type PolymarketL2Headers as bg, type BuildClobAuthMessageInput as bh, CTF_EXCHANGE_ADDRESS as bi, NEG_RISK_CTF_EXCHANGE_ADDRESS as bj, USDC_ADDRESS as bk, POLYGON_CHAIN_ID as bl, buildCtfExchangeDomain as bm, CTF_ORDER_TYPES as bn, ORDER_TYPE as bo, SIDE as bp, buildOrderMessage as bq, buildSignedOrder as br, buildClobPayload as bs, getPolymarketSharesPrecision as bt, type ClobOrderPayload as bu, type BuildOrderMessageInput as bv, type OrderMessage as bw, type SignedOrder as bx, DEFAULT_PAGE_SIZE as by, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type ListCommentsParams as m, type PredictComment as n, type PositionsResponse as o, type ListOrdersParams as p, type PredictOrder as q, type ListOrdersMultiParams as r, type PredictOrdersResponse as s, type CancelOrderResult as t, type MatchGroupPage as u, type MatchGroup as v, type MatchMarketParams as w, type MatchMarketPage as x, type ListTradesParams as y, type ListTradesMultiParams as z };
@@ -230,6 +230,47 @@ interface ListTradesMultiParams {
230
230
  type?: string;
231
231
  side?: string;
232
232
  }
233
+ /** Public profile of a comment author. */
234
+ interface PredictCommentProfile {
235
+ /** Display name, when the author set one. */
236
+ name?: string;
237
+ /** Generated pseudonym, shown when `name` is empty. */
238
+ pseudonym?: string;
239
+ /** Avatar image URL. */
240
+ profile_image?: string;
241
+ /** Provider proxy wallet (e.g. Polymarket Safe). */
242
+ proxy_wallet?: string;
243
+ /** Author wallet address; falls back to the base address upstream. */
244
+ user_address?: string;
245
+ }
246
+ /** A single user comment on a prediction event (or its parent series). */
247
+ interface PredictComment {
248
+ id: string;
249
+ body: string;
250
+ /** Present when the comment is a reply to another comment. */
251
+ parent_comment_id?: string;
252
+ /** ISO-8601 timestamp. */
253
+ created_at: string;
254
+ reaction_count: number;
255
+ profile: PredictCommentProfile;
256
+ }
257
+ /**
258
+ * Query parameters for `GET /api/v1/events/{slug}/comments`.
259
+ * `slug` is passed positionally to {@link PredictClient.listEventComments}.
260
+ */
261
+ interface ListCommentsParams {
262
+ /** Provider source. Only `"polymarket"` is supported today. */
263
+ source: ProviderSource;
264
+ limit?: number;
265
+ /** Opaque pagination cursor (offset string) from the previous page. */
266
+ cursor?: string;
267
+ /** Order field, e.g. `"createdAt"` or `"reactionCount"`. */
268
+ order?: string;
269
+ /** When true, sort ascending (requires `order`). */
270
+ ascending?: boolean;
271
+ /** When true, only comments from position holders. */
272
+ holders_only?: boolean;
273
+ }
233
274
  /** A single price-history data point. */
234
275
  interface PricePoint {
235
276
  /** Unix seconds. */
@@ -950,6 +991,21 @@ declare class PredictClient {
950
991
  * Maps to `GET /api/v1/events/:slug/similar?source=...`.
951
992
  */
952
993
  getSimilarEvents(slug: string, source: ProviderSource, params?: SimilarEventsParams): Promise<PredictEvent[]>;
994
+ /**
995
+ * List comments for a prediction event.
996
+ *
997
+ * Maps to `GET /api/v1/events/:slug/comments`.
998
+ *
999
+ * The server resolves the event to its parent series when one exists
1000
+ * (Polymarket attaches discussion at the series level for grouped events such
1001
+ * as World Cup matches) and otherwise returns event-level comments. Callers
1002
+ * stay unaware of the event-vs-series distinction.
1003
+ *
1004
+ * @param slug - Canonical event slug.
1005
+ * @param params - Query parameters (source, pagination, sort, holders filter).
1006
+ * @returns A paginated page of comments.
1007
+ */
1008
+ listEventComments(slug: string, params: ListCommentsParams): Promise<PredictPage<PredictComment>>;
953
1009
  /**
954
1010
  * Fetch a single prediction market by its slug.
955
1011
  *
@@ -1740,4 +1796,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
1740
1796
  */
1741
1797
  declare function getPolymarketSharesPrecision(tickSize: string): number;
1742
1798
 
1743
- export { type WsPriceEvent as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type DFlowSubmitRequest as F, type DFlowKYCStatus as G, type PolymarketSetupStatus as H, type WithdrawBuildRequest as I, type WithdrawSubmitResponse as J, type WithdrawSubmitRequest as K, type ListEventsParams as L, type MatchesParams as M, type WithdrawStatusResponse as N, type Orderbook as O, PredictClient as P, type PolymarketDepositAddresses as Q, type PolymarketSupportedAsset as R, type SimilarEventsParams as S, type PolymarketWithdrawResponse as T, type PolymarketWithdrawRequest as U, type PolymarketRedeemResponse as V, type WithdrawBuildResponse as W, type TickSizeResponse as X, type FeeRateResponse as Y, type WsConnectionStatus as Z, type WsDataMessage as _, PredictWsClient as a, fetchMarket as a$, type WsOrderbookEvent as a0, type WsTradeEvent as a1, type CreateOrderInput as a2, createPredictClient as a3, createPredictWsClient as a4, type PredictWsClientConfig as a5, type ProviderMeta as a6, type PredictTag as a7, type SettlementSource as a8, type MarketStatus as a9, type MatchesStats as aA, type MatchConfidenceTier as aB, type SignalTag as aC, type MatchLeg as aD, type MatchMarketFlat as aE, type WsChannel as aF, type WsChannelEvent as aG, type WsClientMessage as aH, type WsSubscribeMessage as aI, type WsPingMessage as aJ, type WsServerMessage as aK, type WsPongMessage as aL, type WsSubscribedMessage as aM, type WsErrorCode as aN, type WsErrorMessage as aO, type PolymarketRedeemPrepareInput as aP, type PolymarketRedeemPrepareResponse as aQ, type PolymarketRedeemInput as aR, eventQueryKey as aS, fetchEvent as aT, resolveTagSlug as aU, resolveEventsParams as aV, infiniteEventsQueryKey as aW, fetchEventsPage as aX, type ResolveEventsParamsInput as aY, type TagSlugSelection as aZ, marketQueryKey as a_, type MarketResult as aa, type MarketOutcome as ab, type OrderbookLevel as ac, type TradeType as ad, type EventSummary as ae, type MarketSummary as af, type PricePoint as ag, type PredictPosition as ah, type OrderStatus as ai, type OrderSide as aj, type DFlowOrderContext as ak, type PolymarketOrderType as al, type DepositBuildRequest as am, type DepositBuildResponse as an, type DepositSubmitRequest as ao, type DepositSubmitResponse as ap, type DepositStatusResponse as aq, type UnsignedTx as ar, type PolymarketBridgeToken as as, type PolymarketSupportedAssetsResponse as at, type PolymarketWithdrawPrepareRequest as au, type PolymarketWithdrawPrepareResponse as av, type MatchStatus as aw, type MatchGroupEntry as ax, type MatchGroupMarket as ay, type MatchSortField as az, type PredictPage as b, matchesQueryKey as b0, matchQueryKey as b1, fetchMatchesPage as b2, matchMarketsQueryKey as b3, fetchMatchMarketsPage as b4, CLOB_AUTH_DOMAIN as b5, CLOB_AUTH_TYPES as b6, buildClobAuthMessage as b7, hmacSha256Base64 as b8, buildPolymarketL2Headers as b9, derivePolymarketApiKey as ba, type HttpMethod as bb, type PolymarketL2HeadersInput as bc, type PolymarketL2Headers as bd, type BuildClobAuthMessageInput as be, CTF_EXCHANGE_ADDRESS as bf, NEG_RISK_CTF_EXCHANGE_ADDRESS as bg, USDC_ADDRESS as bh, POLYGON_CHAIN_ID as bi, buildCtfExchangeDomain as bj, CTF_ORDER_TYPES as bk, ORDER_TYPE as bl, SIDE as bm, buildOrderMessage as bn, buildSignedOrder as bo, buildClobPayload as bp, getPolymarketSharesPrecision as bq, type ClobOrderPayload as br, type BuildOrderMessageInput as bs, type OrderMessage as bt, type SignedOrder as bu, DEFAULT_PAGE_SIZE as bv, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type PositionsResponse as m, type ListOrdersParams as n, type PredictOrder as o, type ListOrdersMultiParams as p, type PredictOrdersResponse as q, type CancelOrderResult as r, type MatchGroupPage as s, type MatchGroup as t, type MatchMarketParams as u, type MatchMarketPage as v, type ListTradesParams as w, type ListTradesMultiParams as x, type DFlowQuoteResponse as y, type DFlowSubmitResponse as z };
1799
+ export { type WsConnectionStatus as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type DFlowQuoteResponse as F, type DFlowSubmitResponse as G, type DFlowSubmitRequest as H, type DFlowKYCStatus as I, type PolymarketSetupStatus as J, type WithdrawBuildRequest as K, type ListEventsParams as L, type MatchesParams as M, type WithdrawSubmitResponse as N, type Orderbook as O, PredictClient as P, type WithdrawSubmitRequest as Q, type WithdrawStatusResponse as R, type SimilarEventsParams as S, type PolymarketDepositAddresses as T, type PolymarketSupportedAsset as U, type PolymarketWithdrawResponse as V, type WithdrawBuildResponse as W, type PolymarketWithdrawRequest as X, type PolymarketRedeemResponse as Y, type TickSizeResponse as Z, type FeeRateResponse as _, PredictWsClient as a, type ResolveEventsParamsInput as a$, type WsDataMessage as a0, type WsPriceEvent as a1, type WsOrderbookEvent as a2, type WsTradeEvent as a3, type CreateOrderInput as a4, createPredictClient as a5, createPredictWsClient as a6, type PredictWsClientConfig as a7, type ProviderMeta as a8, type PredictTag as a9, type MatchGroupEntry as aA, type MatchGroupMarket as aB, type MatchSortField as aC, type MatchesStats as aD, type MatchConfidenceTier as aE, type SignalTag as aF, type MatchLeg as aG, type MatchMarketFlat as aH, type WsChannel as aI, type WsChannelEvent as aJ, type WsClientMessage as aK, type WsSubscribeMessage as aL, type WsPingMessage as aM, type WsServerMessage as aN, type WsPongMessage as aO, type WsSubscribedMessage as aP, type WsErrorCode as aQ, type WsErrorMessage as aR, type PolymarketRedeemPrepareInput as aS, type PolymarketRedeemPrepareResponse as aT, type PolymarketRedeemInput as aU, eventQueryKey as aV, fetchEvent as aW, resolveTagSlug as aX, resolveEventsParams as aY, infiniteEventsQueryKey as aZ, fetchEventsPage as a_, type SettlementSource as aa, type MarketStatus as ab, type MarketResult as ac, type MarketOutcome as ad, type OrderbookLevel as ae, type TradeType as af, type EventSummary as ag, type MarketSummary as ah, type PredictCommentProfile as ai, type PricePoint as aj, type PredictPosition as ak, type OrderStatus as al, type OrderSide as am, type DFlowOrderContext as an, type PolymarketOrderType as ao, type DepositBuildRequest as ap, type DepositBuildResponse as aq, type DepositSubmitRequest as ar, type DepositSubmitResponse as as, type DepositStatusResponse as at, type UnsignedTx as au, type PolymarketBridgeToken as av, type PolymarketSupportedAssetsResponse as aw, type PolymarketWithdrawPrepareRequest as ax, type PolymarketWithdrawPrepareResponse as ay, type MatchStatus as az, type PredictPage as b, type TagSlugSelection as b0, marketQueryKey as b1, fetchMarket as b2, matchesQueryKey as b3, matchQueryKey as b4, fetchMatchesPage as b5, matchMarketsQueryKey as b6, fetchMatchMarketsPage as b7, CLOB_AUTH_DOMAIN as b8, CLOB_AUTH_TYPES as b9, buildClobAuthMessage as ba, hmacSha256Base64 as bb, buildPolymarketL2Headers as bc, derivePolymarketApiKey as bd, type HttpMethod as be, type PolymarketL2HeadersInput as bf, type PolymarketL2Headers as bg, type BuildClobAuthMessageInput as bh, CTF_EXCHANGE_ADDRESS as bi, NEG_RISK_CTF_EXCHANGE_ADDRESS as bj, USDC_ADDRESS as bk, POLYGON_CHAIN_ID as bl, buildCtfExchangeDomain as bm, CTF_ORDER_TYPES as bn, ORDER_TYPE as bo, SIDE as bp, buildOrderMessage as bq, buildSignedOrder as br, buildClobPayload as bs, getPolymarketSharesPrecision as bt, type ClobOrderPayload as bu, type BuildOrderMessageInput as bv, type OrderMessage as bw, type SignedOrder as bx, DEFAULT_PAGE_SIZE as by, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type ListCommentsParams as m, type PredictComment as n, type PositionsResponse as o, type ListOrdersParams as p, type PredictOrder as q, type ListOrdersMultiParams as r, type PredictOrdersResponse as s, type CancelOrderResult as t, type MatchGroupPage as u, type MatchGroup as v, type MatchMarketParams as w, type MatchMarketPage as x, type ListTradesParams as y, type ListTradesMultiParams as z };
package/dist/server.d.mts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, be as BuildClobAuthMessageInput, bs as BuildOrderMessageInput, b5 as CLOB_AUTH_DOMAIN, b6 as CLOB_AUTH_TYPES, bf as CTF_EXCHANGE_ADDRESS, bk as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, br as ClobOrderPayload, a2 as CreateOrderInput, bv as DEFAULT_PAGE_SIZE, ak as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, am as DepositBuildRequest, an as DepositBuildResponse, aq as DepositStatusResponse, ao as DepositSubmitRequest, ap as DepositSubmitResponse, f as EventSortField, e as EventStatus, ae as EventSummary, bb as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, ab as MarketOutcome, aa as MarketResult, a9 as MarketStatus, af as MarketSummary, aB as MatchConfidenceTier, t as MatchGroup, ax as MatchGroupEntry, ay as MatchGroupMarket, s as MatchGroupPage, aD as MatchLeg, aE as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, az as MatchSortField, aw as MatchStatus, M as MatchesParams, aA as MatchesStats, bg as NEG_RISK_CTF_EXCHANGE_ADDRESS, bl as ORDER_TYPE, bt as OrderMessage, aj as OrderSide, ai as OrderStatus, O as Orderbook, ac as OrderbookLevel, bi as POLYGON_CHAIN_ID, bd as PolymarketL2Headers, bc as PolymarketL2HeadersInput, al as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, ah as PredictPosition, a7 as PredictTag, i as PredictTrade, a as PredictWsClient, a5 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, ag as PricePoint, a6 as ProviderMeta, d as ProviderSource, aY as ResolveEventsParamsInput, bm as SIDE, a8 as SettlementSource, aC as SignalTag, bu as SignedOrder, S as SimilarEventsParams, aZ as TagSlugSelection, ad as TradeType, bh as USDC_ADDRESS, ar as UnsignedTx, aF as WsChannel, aG as WsChannelEvent, aH as WsClientMessage, Z as WsConnectionStatus, _ as WsDataMessage, aN as WsErrorCode, aO as WsErrorMessage, a0 as WsOrderbookEvent, aJ as WsPingMessage, aL as WsPongMessage, $ as WsPriceEvent, aK as WsServerMessage, aI as WsSubscribeMessage, aM as WsSubscribedMessage, a1 as WsTradeEvent, b7 as buildClobAuthMessage, bp as buildClobPayload, bj as buildCtfExchangeDomain, bn as buildOrderMessage, b9 as buildPolymarketL2Headers, bo as buildSignedOrder, a3 as createPredictClient, a4 as createPredictWsClient, ba as derivePolymarketApiKey, aS as eventQueryKey, aT as fetchEvent, aX as fetchEventsPage, a$ as fetchMarket, b4 as fetchMatchMarketsPage, b2 as fetchMatchesPage, b8 as hmacSha256Base64, aW as infiniteEventsQueryKey, a_ as marketQueryKey, b3 as matchMarketsQueryKey, b1 as matchQueryKey, b0 as matchesQueryKey, aV as resolveEventsParams, aU as resolveTagSlug } from './server-D2N-KDxj.mjs';
1
+ export { B as BalanceResponse, bh as BuildClobAuthMessageInput, bv as BuildOrderMessageInput, b8 as CLOB_AUTH_DOMAIN, b9 as CLOB_AUTH_TYPES, bi as CTF_EXCHANGE_ADDRESS, bn as CTF_ORDER_TYPES, t as CancelOrderResult, C as Candlestick, bu as ClobOrderPayload, a4 as CreateOrderInput, by as DEFAULT_PAGE_SIZE, an as DFlowOrderContext, D as DFlowQuoteRequest, F as DFlowQuoteResponse, H as DFlowSubmitRequest, G as DFlowSubmitResponse, ap as DepositBuildRequest, aq as DepositBuildResponse, at as DepositStatusResponse, ar as DepositSubmitRequest, as as DepositSubmitResponse, f as EventSortField, e as EventStatus, ag as EventSummary, be as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, p as ListOrdersParams, y as ListTradesParams, ad as MarketOutcome, ac as MarketResult, ab as MarketStatus, ah as MarketSummary, aE as MatchConfidenceTier, v as MatchGroup, aA as MatchGroupEntry, aB as MatchGroupMarket, u as MatchGroupPage, aG as MatchLeg, aH as MatchMarketFlat, x as MatchMarketPage, w as MatchMarketParams, aC as MatchSortField, az as MatchStatus, M as MatchesParams, aD as MatchesStats, bj as NEG_RISK_CTF_EXCHANGE_ADDRESS, bo as ORDER_TYPE, bw as OrderMessage, am as OrderSide, al as OrderStatus, O as Orderbook, ae as OrderbookLevel, bl as POLYGON_CHAIN_ID, bg as PolymarketL2Headers, bf as PolymarketL2HeadersInput, ao as PolymarketOrderType, o as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, q as PredictOrder, b as PredictPage, ak as PredictPosition, a9 as PredictTag, i as PredictTrade, a as PredictWsClient, a7 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, aj as PricePoint, a8 as ProviderMeta, d as ProviderSource, a$ as ResolveEventsParamsInput, bp as SIDE, aa as SettlementSource, aF as SignalTag, bx as SignedOrder, S as SimilarEventsParams, b0 as TagSlugSelection, af as TradeType, bk as USDC_ADDRESS, au as UnsignedTx, aI as WsChannel, aJ as WsChannelEvent, aK as WsClientMessage, $ as WsConnectionStatus, a0 as WsDataMessage, aQ as WsErrorCode, aR as WsErrorMessage, a2 as WsOrderbookEvent, aM as WsPingMessage, aO as WsPongMessage, a1 as WsPriceEvent, aN as WsServerMessage, aL as WsSubscribeMessage, aP as WsSubscribedMessage, a3 as WsTradeEvent, ba as buildClobAuthMessage, bs as buildClobPayload, bm as buildCtfExchangeDomain, bq as buildOrderMessage, bc as buildPolymarketL2Headers, br as buildSignedOrder, a5 as createPredictClient, a6 as createPredictWsClient, bd as derivePolymarketApiKey, aV as eventQueryKey, aW as fetchEvent, a_ as fetchEventsPage, b2 as fetchMarket, b7 as fetchMatchMarketsPage, b5 as fetchMatchesPage, bb as hmacSha256Base64, aZ as infiniteEventsQueryKey, b1 as marketQueryKey, b6 as matchMarketsQueryKey, b4 as matchQueryKey, b3 as matchesQueryKey, aY as resolveEventsParams, aX as resolveTagSlug } from './server-FZwoxwxh.mjs';
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, be as BuildClobAuthMessageInput, bs as BuildOrderMessageInput, b5 as CLOB_AUTH_DOMAIN, b6 as CLOB_AUTH_TYPES, bf as CTF_EXCHANGE_ADDRESS, bk as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, br as ClobOrderPayload, a2 as CreateOrderInput, bv as DEFAULT_PAGE_SIZE, ak as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, am as DepositBuildRequest, an as DepositBuildResponse, aq as DepositStatusResponse, ao as DepositSubmitRequest, ap as DepositSubmitResponse, f as EventSortField, e as EventStatus, ae as EventSummary, bb as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, ab as MarketOutcome, aa as MarketResult, a9 as MarketStatus, af as MarketSummary, aB as MatchConfidenceTier, t as MatchGroup, ax as MatchGroupEntry, ay as MatchGroupMarket, s as MatchGroupPage, aD as MatchLeg, aE as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, az as MatchSortField, aw as MatchStatus, M as MatchesParams, aA as MatchesStats, bg as NEG_RISK_CTF_EXCHANGE_ADDRESS, bl as ORDER_TYPE, bt as OrderMessage, aj as OrderSide, ai as OrderStatus, O as Orderbook, ac as OrderbookLevel, bi as POLYGON_CHAIN_ID, bd as PolymarketL2Headers, bc as PolymarketL2HeadersInput, al as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, ah as PredictPosition, a7 as PredictTag, i as PredictTrade, a as PredictWsClient, a5 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, ag as PricePoint, a6 as ProviderMeta, d as ProviderSource, aY as ResolveEventsParamsInput, bm as SIDE, a8 as SettlementSource, aC as SignalTag, bu as SignedOrder, S as SimilarEventsParams, aZ as TagSlugSelection, ad as TradeType, bh as USDC_ADDRESS, ar as UnsignedTx, aF as WsChannel, aG as WsChannelEvent, aH as WsClientMessage, Z as WsConnectionStatus, _ as WsDataMessage, aN as WsErrorCode, aO as WsErrorMessage, a0 as WsOrderbookEvent, aJ as WsPingMessage, aL as WsPongMessage, $ as WsPriceEvent, aK as WsServerMessage, aI as WsSubscribeMessage, aM as WsSubscribedMessage, a1 as WsTradeEvent, b7 as buildClobAuthMessage, bp as buildClobPayload, bj as buildCtfExchangeDomain, bn as buildOrderMessage, b9 as buildPolymarketL2Headers, bo as buildSignedOrder, a3 as createPredictClient, a4 as createPredictWsClient, ba as derivePolymarketApiKey, aS as eventQueryKey, aT as fetchEvent, aX as fetchEventsPage, a$ as fetchMarket, b4 as fetchMatchMarketsPage, b2 as fetchMatchesPage, b8 as hmacSha256Base64, aW as infiniteEventsQueryKey, a_ as marketQueryKey, b3 as matchMarketsQueryKey, b1 as matchQueryKey, b0 as matchesQueryKey, aV as resolveEventsParams, aU as resolveTagSlug } from './server-D2N-KDxj.js';
1
+ export { B as BalanceResponse, bh as BuildClobAuthMessageInput, bv as BuildOrderMessageInput, b8 as CLOB_AUTH_DOMAIN, b9 as CLOB_AUTH_TYPES, bi as CTF_EXCHANGE_ADDRESS, bn as CTF_ORDER_TYPES, t as CancelOrderResult, C as Candlestick, bu as ClobOrderPayload, a4 as CreateOrderInput, by as DEFAULT_PAGE_SIZE, an as DFlowOrderContext, D as DFlowQuoteRequest, F as DFlowQuoteResponse, H as DFlowSubmitRequest, G as DFlowSubmitResponse, ap as DepositBuildRequest, aq as DepositBuildResponse, at as DepositStatusResponse, ar as DepositSubmitRequest, as as DepositSubmitResponse, f as EventSortField, e as EventStatus, ag as EventSummary, be as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, p as ListOrdersParams, y as ListTradesParams, ad as MarketOutcome, ac as MarketResult, ab as MarketStatus, ah as MarketSummary, aE as MatchConfidenceTier, v as MatchGroup, aA as MatchGroupEntry, aB as MatchGroupMarket, u as MatchGroupPage, aG as MatchLeg, aH as MatchMarketFlat, x as MatchMarketPage, w as MatchMarketParams, aC as MatchSortField, az as MatchStatus, M as MatchesParams, aD as MatchesStats, bj as NEG_RISK_CTF_EXCHANGE_ADDRESS, bo as ORDER_TYPE, bw as OrderMessage, am as OrderSide, al as OrderStatus, O as Orderbook, ae as OrderbookLevel, bl as POLYGON_CHAIN_ID, bg as PolymarketL2Headers, bf as PolymarketL2HeadersInput, ao as PolymarketOrderType, o as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, q as PredictOrder, b as PredictPage, ak as PredictPosition, a9 as PredictTag, i as PredictTrade, a as PredictWsClient, a7 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, aj as PricePoint, a8 as ProviderMeta, d as ProviderSource, a$ as ResolveEventsParamsInput, bp as SIDE, aa as SettlementSource, aF as SignalTag, bx as SignedOrder, S as SimilarEventsParams, b0 as TagSlugSelection, af as TradeType, bk as USDC_ADDRESS, au as UnsignedTx, aI as WsChannel, aJ as WsChannelEvent, aK as WsClientMessage, $ as WsConnectionStatus, a0 as WsDataMessage, aQ as WsErrorCode, aR as WsErrorMessage, a2 as WsOrderbookEvent, aM as WsPingMessage, aO as WsPongMessage, a1 as WsPriceEvent, aN as WsServerMessage, aL as WsSubscribeMessage, aP as WsSubscribedMessage, a3 as WsTradeEvent, ba as buildClobAuthMessage, bs as buildClobPayload, bm as buildCtfExchangeDomain, bq as buildOrderMessage, bc as buildPolymarketL2Headers, br as buildSignedOrder, a5 as createPredictClient, a6 as createPredictWsClient, bd as derivePolymarketApiKey, aV as eventQueryKey, aW as fetchEvent, a_ as fetchEventsPage, b2 as fetchMarket, b7 as fetchMatchMarketsPage, b5 as fetchMatchesPage, bb as hmacSha256Base64, aZ as infiniteEventsQueryKey, b1 as marketQueryKey, b6 as matchMarketsQueryKey, b4 as matchQueryKey, b3 as matchesQueryKey, aY as resolveEventsParams, aX as resolveTagSlug } from './server-FZwoxwxh.js';
package/dist/server.js CHANGED
@@ -149,6 +149,25 @@ var PredictClient = class {
149
149
  const url = `${this.endpoint}/api/v1/events/${encodeURIComponent(slug)}/similar${query}`;
150
150
  return await utils.httpGet(url);
151
151
  }
152
+ /**
153
+ * List comments for a prediction event.
154
+ *
155
+ * Maps to `GET /api/v1/events/:slug/comments`.
156
+ *
157
+ * The server resolves the event to its parent series when one exists
158
+ * (Polymarket attaches discussion at the series level for grouped events such
159
+ * as World Cup matches) and otherwise returns event-level comments. Callers
160
+ * stay unaware of the event-vs-series distinction.
161
+ *
162
+ * @param slug - Canonical event slug.
163
+ * @param params - Query parameters (source, pagination, sort, holders filter).
164
+ * @returns A paginated page of comments.
165
+ */
166
+ async listEventComments(slug, params) {
167
+ const query = buildQuery(params);
168
+ const url = `${this.endpoint}/api/v1/events/${encodeURIComponent(slug)}/comments${query}`;
169
+ return await utils.httpGet(url);
170
+ }
152
171
  // -------------------------------------------------------------------------
153
172
  // Markets
154
173
  // -------------------------------------------------------------------------