@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.
- package/dist/index.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{server-D2N-KDxj.d.mts → server-FZwoxwxh.d.mts} +57 -1
- package/dist/{server-D2N-KDxj.d.ts → server-FZwoxwxh.d.ts} +57 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +19 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +19 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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,
|
|
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,
|
|
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
|
// -------------------------------------------------------------------------
|