@liberfi.io/react-predict 0.1.66 → 0.1.67

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.
@@ -755,6 +755,32 @@ interface AvailableSharesResponse {
755
755
  available_shares: number;
756
756
  precision: number;
757
757
  }
758
+ /** Input for the redeem prepare endpoint — returns EIP-712 typed data to sign. */
759
+ interface PolymarketRedeemPrepareInput {
760
+ wallet_address: string;
761
+ condition_id: string;
762
+ neg_risk: boolean;
763
+ }
764
+ /** Response from the redeem prepare endpoint — EIP-712 SafeTx hash for signing. */
765
+ interface PolymarketRedeemPrepareResponse {
766
+ safe_address: string;
767
+ nonce: string;
768
+ /** EIP-712 domain-separated hash of the SafeTx (0x-prefixed). Sign with personal_sign. */
769
+ message_hash: string;
770
+ }
771
+ /** Input for redeeming tokens — includes the EIP-712 signature. */
772
+ interface PolymarketRedeemInput {
773
+ wallet_address: string;
774
+ condition_id: string;
775
+ neg_risk: boolean;
776
+ signature: string;
777
+ nonce: string;
778
+ }
779
+ /** Response from the Polymarket redeem endpoint. */
780
+ interface PolymarketRedeemResponse {
781
+ transaction_id: string;
782
+ status: string;
783
+ }
758
784
 
759
785
  /**
760
786
  * HTTP client for the prediction-server REST API.
@@ -988,6 +1014,20 @@ declare class PredictClient {
988
1014
  * Maps to `POST /api/v1/withdraw/polymarket/execute`.
989
1015
  */
990
1016
  executePolymarketWithdraw(body: PolymarketWithdrawRequest): Promise<PolymarketWithdrawResponse>;
1017
+ /**
1018
+ * Prepare EIP-712 SafeTx typed data for a Polymarket redeem transaction.
1019
+ * The frontend must sign this data and pass the signature to `redeemPolymarket`.
1020
+ *
1021
+ * Maps to `POST /api/v1/redeem/polymarket/prepare`.
1022
+ */
1023
+ prepareRedeemPolymarket(body: PolymarketRedeemPrepareInput): Promise<PolymarketRedeemPrepareResponse>;
1024
+ /**
1025
+ * Redeem tokens from a resolved Polymarket market via gasless Relayer.
1026
+ * Requires a valid EIP-712 signature from the prepare step.
1027
+ *
1028
+ * Maps to `POST /api/v1/redeem/polymarket`.
1029
+ */
1030
+ redeemPolymarket(body: PolymarketRedeemInput): Promise<PolymarketRedeemResponse>;
991
1031
  }
992
1032
  /**
993
1033
  * Factory function for `PredictClient`.
@@ -1572,4 +1612,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
1572
1612
  */
1573
1613
  declare function getPolymarketSharesPrecision(tickSize: string): number;
1574
1614
 
1575
- export { type WsTradeEvent 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 PolymarketWithdrawResponse as R, type SimilarEventsParams as S, type PolymarketWithdrawRequest as T, type TickSizeResponse as U, type FeeRateResponse as V, type WithdrawBuildResponse as W, type WsConnectionStatus as X, type WsDataMessage as Y, type WsPriceEvent as Z, type WsOrderbookEvent as _, PredictWsClient as a, hmacSha256Base64 as a$, type CreateOrderInput as a0, createPredictClient as a1, createPredictWsClient as a2, type PredictWsClientConfig as a3, type ProviderMeta as a4, type PredictTag as a5, type SettlementSource as a6, type MarketStatus as a7, type MarketResult as a8, type MarketOutcome as a9, type WsChannelEvent as aA, type WsClientMessage as aB, type WsSubscribeMessage as aC, type WsPingMessage as aD, type WsServerMessage as aE, type WsPongMessage as aF, type WsSubscribedMessage as aG, type WsErrorCode as aH, type WsErrorMessage as aI, eventQueryKey as aJ, fetchEvent as aK, resolveTagSlug as aL, resolveEventsParams as aM, infiniteEventsQueryKey as aN, fetchEventsPage as aO, type ResolveEventsParamsInput as aP, type TagSlugSelection as aQ, marketQueryKey as aR, fetchMarket as aS, matchesQueryKey as aT, matchQueryKey as aU, fetchMatchesPage as aV, matchMarketsQueryKey as aW, fetchMatchMarketsPage as aX, CLOB_AUTH_DOMAIN as aY, CLOB_AUTH_TYPES as aZ, buildClobAuthMessage as a_, type OrderbookLevel as aa, type TradeType as ab, type EventSummary as ac, type MarketSummary as ad, type PricePoint as ae, type PredictPosition as af, type OrderStatus as ag, type OrderSide as ah, type DFlowOrderContext as ai, type PolymarketOrderType as aj, type DepositBuildRequest as ak, type DepositBuildResponse as al, type DepositSubmitRequest as am, type DepositSubmitResponse as an, type DepositStatusResponse as ao, type UnsignedTx as ap, type PolymarketWithdrawPrepareRequest as aq, type PolymarketWithdrawPrepareResponse as ar, type MatchStatus as as, type MatchGroupEntry as at, type MatchGroupMarket as au, type MatchSortField as av, type MatchesStats as aw, type MatchConfidenceTier as ax, type MatchMarketFlat as ay, type WsChannel as az, type PredictPage as b, buildPolymarketL2Headers as b0, derivePolymarketApiKey as b1, type HttpMethod as b2, type PolymarketL2HeadersInput as b3, type PolymarketL2Headers as b4, type BuildClobAuthMessageInput as b5, CTF_EXCHANGE_ADDRESS as b6, NEG_RISK_CTF_EXCHANGE_ADDRESS as b7, USDC_ADDRESS as b8, POLYGON_CHAIN_ID as b9, buildCtfExchangeDomain as ba, CTF_ORDER_TYPES as bb, ORDER_TYPE as bc, SIDE as bd, buildOrderMessage as be, buildSignedOrder as bf, buildClobPayload as bg, getPolymarketSharesPrecision as bh, type ClobOrderPayload as bi, type BuildOrderMessageInput as bj, type OrderMessage as bk, type SignedOrder as bl, DEFAULT_PAGE_SIZE as bm, 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 };
1615
+ export { type WsOrderbookEvent 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 PolymarketWithdrawResponse as R, type SimilarEventsParams as S, type PolymarketWithdrawRequest as T, type PolymarketRedeemResponse as U, type TickSizeResponse as V, type WithdrawBuildResponse as W, type FeeRateResponse as X, type WsConnectionStatus as Y, type WsDataMessage as Z, type WsPriceEvent as _, PredictWsClient as a, fetchMatchMarketsPage as a$, type WsTradeEvent as a0, type CreateOrderInput as a1, createPredictClient as a2, createPredictWsClient as a3, type PredictWsClientConfig as a4, type ProviderMeta as a5, type PredictTag as a6, type SettlementSource as a7, type MarketStatus as a8, type MarketResult as a9, type WsChannel as aA, type WsChannelEvent as aB, type WsClientMessage as aC, type WsSubscribeMessage as aD, type WsPingMessage as aE, type WsServerMessage as aF, type WsPongMessage as aG, type WsSubscribedMessage as aH, type WsErrorCode as aI, type WsErrorMessage as aJ, type PolymarketRedeemPrepareInput as aK, type PolymarketRedeemPrepareResponse as aL, type PolymarketRedeemInput as aM, eventQueryKey as aN, fetchEvent as aO, resolveTagSlug as aP, resolveEventsParams as aQ, infiniteEventsQueryKey as aR, fetchEventsPage as aS, type ResolveEventsParamsInput as aT, type TagSlugSelection as aU, marketQueryKey as aV, fetchMarket as aW, matchesQueryKey as aX, matchQueryKey as aY, fetchMatchesPage as aZ, matchMarketsQueryKey as a_, type MarketOutcome as aa, type OrderbookLevel as ab, type TradeType as ac, type EventSummary as ad, type MarketSummary as ae, type PricePoint as af, type PredictPosition as ag, type OrderStatus as ah, type OrderSide as ai, type DFlowOrderContext as aj, type PolymarketOrderType as ak, type DepositBuildRequest as al, type DepositBuildResponse as am, type DepositSubmitRequest as an, type DepositSubmitResponse as ao, type DepositStatusResponse as ap, type UnsignedTx as aq, type PolymarketWithdrawPrepareRequest as ar, type PolymarketWithdrawPrepareResponse as as, type MatchStatus as at, type MatchGroupEntry as au, type MatchGroupMarket as av, type MatchSortField as aw, type MatchesStats as ax, type MatchConfidenceTier as ay, type MatchMarketFlat as az, type PredictPage as b, CLOB_AUTH_DOMAIN as b0, CLOB_AUTH_TYPES as b1, buildClobAuthMessage as b2, hmacSha256Base64 as b3, buildPolymarketL2Headers as b4, derivePolymarketApiKey as b5, type HttpMethod as b6, type PolymarketL2HeadersInput as b7, type PolymarketL2Headers as b8, type BuildClobAuthMessageInput as b9, CTF_EXCHANGE_ADDRESS as ba, NEG_RISK_CTF_EXCHANGE_ADDRESS as bb, USDC_ADDRESS as bc, POLYGON_CHAIN_ID as bd, buildCtfExchangeDomain as be, CTF_ORDER_TYPES as bf, ORDER_TYPE as bg, SIDE as bh, buildOrderMessage as bi, buildSignedOrder as bj, buildClobPayload as bk, getPolymarketSharesPrecision as bl, type ClobOrderPayload as bm, type BuildOrderMessageInput as bn, type OrderMessage as bo, type SignedOrder as bp, DEFAULT_PAGE_SIZE as bq, 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 };
@@ -755,6 +755,32 @@ interface AvailableSharesResponse {
755
755
  available_shares: number;
756
756
  precision: number;
757
757
  }
758
+ /** Input for the redeem prepare endpoint — returns EIP-712 typed data to sign. */
759
+ interface PolymarketRedeemPrepareInput {
760
+ wallet_address: string;
761
+ condition_id: string;
762
+ neg_risk: boolean;
763
+ }
764
+ /** Response from the redeem prepare endpoint — EIP-712 SafeTx hash for signing. */
765
+ interface PolymarketRedeemPrepareResponse {
766
+ safe_address: string;
767
+ nonce: string;
768
+ /** EIP-712 domain-separated hash of the SafeTx (0x-prefixed). Sign with personal_sign. */
769
+ message_hash: string;
770
+ }
771
+ /** Input for redeeming tokens — includes the EIP-712 signature. */
772
+ interface PolymarketRedeemInput {
773
+ wallet_address: string;
774
+ condition_id: string;
775
+ neg_risk: boolean;
776
+ signature: string;
777
+ nonce: string;
778
+ }
779
+ /** Response from the Polymarket redeem endpoint. */
780
+ interface PolymarketRedeemResponse {
781
+ transaction_id: string;
782
+ status: string;
783
+ }
758
784
 
759
785
  /**
760
786
  * HTTP client for the prediction-server REST API.
@@ -988,6 +1014,20 @@ declare class PredictClient {
988
1014
  * Maps to `POST /api/v1/withdraw/polymarket/execute`.
989
1015
  */
990
1016
  executePolymarketWithdraw(body: PolymarketWithdrawRequest): Promise<PolymarketWithdrawResponse>;
1017
+ /**
1018
+ * Prepare EIP-712 SafeTx typed data for a Polymarket redeem transaction.
1019
+ * The frontend must sign this data and pass the signature to `redeemPolymarket`.
1020
+ *
1021
+ * Maps to `POST /api/v1/redeem/polymarket/prepare`.
1022
+ */
1023
+ prepareRedeemPolymarket(body: PolymarketRedeemPrepareInput): Promise<PolymarketRedeemPrepareResponse>;
1024
+ /**
1025
+ * Redeem tokens from a resolved Polymarket market via gasless Relayer.
1026
+ * Requires a valid EIP-712 signature from the prepare step.
1027
+ *
1028
+ * Maps to `POST /api/v1/redeem/polymarket`.
1029
+ */
1030
+ redeemPolymarket(body: PolymarketRedeemInput): Promise<PolymarketRedeemResponse>;
991
1031
  }
992
1032
  /**
993
1033
  * Factory function for `PredictClient`.
@@ -1572,4 +1612,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
1572
1612
  */
1573
1613
  declare function getPolymarketSharesPrecision(tickSize: string): number;
1574
1614
 
1575
- export { type WsTradeEvent 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 PolymarketWithdrawResponse as R, type SimilarEventsParams as S, type PolymarketWithdrawRequest as T, type TickSizeResponse as U, type FeeRateResponse as V, type WithdrawBuildResponse as W, type WsConnectionStatus as X, type WsDataMessage as Y, type WsPriceEvent as Z, type WsOrderbookEvent as _, PredictWsClient as a, hmacSha256Base64 as a$, type CreateOrderInput as a0, createPredictClient as a1, createPredictWsClient as a2, type PredictWsClientConfig as a3, type ProviderMeta as a4, type PredictTag as a5, type SettlementSource as a6, type MarketStatus as a7, type MarketResult as a8, type MarketOutcome as a9, type WsChannelEvent as aA, type WsClientMessage as aB, type WsSubscribeMessage as aC, type WsPingMessage as aD, type WsServerMessage as aE, type WsPongMessage as aF, type WsSubscribedMessage as aG, type WsErrorCode as aH, type WsErrorMessage as aI, eventQueryKey as aJ, fetchEvent as aK, resolveTagSlug as aL, resolveEventsParams as aM, infiniteEventsQueryKey as aN, fetchEventsPage as aO, type ResolveEventsParamsInput as aP, type TagSlugSelection as aQ, marketQueryKey as aR, fetchMarket as aS, matchesQueryKey as aT, matchQueryKey as aU, fetchMatchesPage as aV, matchMarketsQueryKey as aW, fetchMatchMarketsPage as aX, CLOB_AUTH_DOMAIN as aY, CLOB_AUTH_TYPES as aZ, buildClobAuthMessage as a_, type OrderbookLevel as aa, type TradeType as ab, type EventSummary as ac, type MarketSummary as ad, type PricePoint as ae, type PredictPosition as af, type OrderStatus as ag, type OrderSide as ah, type DFlowOrderContext as ai, type PolymarketOrderType as aj, type DepositBuildRequest as ak, type DepositBuildResponse as al, type DepositSubmitRequest as am, type DepositSubmitResponse as an, type DepositStatusResponse as ao, type UnsignedTx as ap, type PolymarketWithdrawPrepareRequest as aq, type PolymarketWithdrawPrepareResponse as ar, type MatchStatus as as, type MatchGroupEntry as at, type MatchGroupMarket as au, type MatchSortField as av, type MatchesStats as aw, type MatchConfidenceTier as ax, type MatchMarketFlat as ay, type WsChannel as az, type PredictPage as b, buildPolymarketL2Headers as b0, derivePolymarketApiKey as b1, type HttpMethod as b2, type PolymarketL2HeadersInput as b3, type PolymarketL2Headers as b4, type BuildClobAuthMessageInput as b5, CTF_EXCHANGE_ADDRESS as b6, NEG_RISK_CTF_EXCHANGE_ADDRESS as b7, USDC_ADDRESS as b8, POLYGON_CHAIN_ID as b9, buildCtfExchangeDomain as ba, CTF_ORDER_TYPES as bb, ORDER_TYPE as bc, SIDE as bd, buildOrderMessage as be, buildSignedOrder as bf, buildClobPayload as bg, getPolymarketSharesPrecision as bh, type ClobOrderPayload as bi, type BuildOrderMessageInput as bj, type OrderMessage as bk, type SignedOrder as bl, DEFAULT_PAGE_SIZE as bm, 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 };
1615
+ export { type WsOrderbookEvent 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 PolymarketWithdrawResponse as R, type SimilarEventsParams as S, type PolymarketWithdrawRequest as T, type PolymarketRedeemResponse as U, type TickSizeResponse as V, type WithdrawBuildResponse as W, type FeeRateResponse as X, type WsConnectionStatus as Y, type WsDataMessage as Z, type WsPriceEvent as _, PredictWsClient as a, fetchMatchMarketsPage as a$, type WsTradeEvent as a0, type CreateOrderInput as a1, createPredictClient as a2, createPredictWsClient as a3, type PredictWsClientConfig as a4, type ProviderMeta as a5, type PredictTag as a6, type SettlementSource as a7, type MarketStatus as a8, type MarketResult as a9, type WsChannel as aA, type WsChannelEvent as aB, type WsClientMessage as aC, type WsSubscribeMessage as aD, type WsPingMessage as aE, type WsServerMessage as aF, type WsPongMessage as aG, type WsSubscribedMessage as aH, type WsErrorCode as aI, type WsErrorMessage as aJ, type PolymarketRedeemPrepareInput as aK, type PolymarketRedeemPrepareResponse as aL, type PolymarketRedeemInput as aM, eventQueryKey as aN, fetchEvent as aO, resolveTagSlug as aP, resolveEventsParams as aQ, infiniteEventsQueryKey as aR, fetchEventsPage as aS, type ResolveEventsParamsInput as aT, type TagSlugSelection as aU, marketQueryKey as aV, fetchMarket as aW, matchesQueryKey as aX, matchQueryKey as aY, fetchMatchesPage as aZ, matchMarketsQueryKey as a_, type MarketOutcome as aa, type OrderbookLevel as ab, type TradeType as ac, type EventSummary as ad, type MarketSummary as ae, type PricePoint as af, type PredictPosition as ag, type OrderStatus as ah, type OrderSide as ai, type DFlowOrderContext as aj, type PolymarketOrderType as ak, type DepositBuildRequest as al, type DepositBuildResponse as am, type DepositSubmitRequest as an, type DepositSubmitResponse as ao, type DepositStatusResponse as ap, type UnsignedTx as aq, type PolymarketWithdrawPrepareRequest as ar, type PolymarketWithdrawPrepareResponse as as, type MatchStatus as at, type MatchGroupEntry as au, type MatchGroupMarket as av, type MatchSortField as aw, type MatchesStats as ax, type MatchConfidenceTier as ay, type MatchMarketFlat as az, type PredictPage as b, CLOB_AUTH_DOMAIN as b0, CLOB_AUTH_TYPES as b1, buildClobAuthMessage as b2, hmacSha256Base64 as b3, buildPolymarketL2Headers as b4, derivePolymarketApiKey as b5, type HttpMethod as b6, type PolymarketL2HeadersInput as b7, type PolymarketL2Headers as b8, type BuildClobAuthMessageInput as b9, CTF_EXCHANGE_ADDRESS as ba, NEG_RISK_CTF_EXCHANGE_ADDRESS as bb, USDC_ADDRESS as bc, POLYGON_CHAIN_ID as bd, buildCtfExchangeDomain as be, CTF_ORDER_TYPES as bf, ORDER_TYPE as bg, SIDE as bh, buildOrderMessage as bi, buildSignedOrder as bj, buildClobPayload as bk, getPolymarketSharesPrecision as bl, type ClobOrderPayload as bm, type BuildOrderMessageInput as bn, type OrderMessage as bo, type SignedOrder as bp, DEFAULT_PAGE_SIZE as bq, 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 };
package/dist/server.d.mts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, b5 as BuildClobAuthMessageInput, bj as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, bi as ClobOrderPayload, a0 as CreateOrderInput, bm as DEFAULT_PAGE_SIZE, ai as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, f as EventSortField, e as EventStatus, ac as EventSummary, b2 as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, t as MatchGroup, at as MatchGroupEntry, au as MatchGroupMarket, s as MatchGroupPage, ay as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, av as MatchSortField, as as MatchStatus, M as MatchesParams, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bk as OrderMessage, ah as OrderSide, ag as OrderStatus, O as Orderbook, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, af as PredictPosition, a5 as PredictTag, i as PredictTrade, a as PredictWsClient, a3 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, ae as PricePoint, a4 as ProviderMeta, d as ProviderSource, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bl as SignedOrder, S as SimilarEventsParams, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, X as WsConnectionStatus, Y as WsDataMessage, aH as WsErrorCode, aI as WsErrorMessage, _ as WsOrderbookEvent, aD as WsPingMessage, aF as WsPongMessage, Z as WsPriceEvent, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, $ as WsTradeEvent, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-DsjYCQiB.mjs';
1
+ export { B as BalanceResponse, b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, bm as ClobOrderPayload, a1 as CreateOrderInput, bq as DEFAULT_PAGE_SIZE, aj as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, f as EventSortField, e as EventStatus, ad as EventSummary, b6 as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, t as MatchGroup, au as MatchGroupEntry, av as MatchGroupMarket, s as MatchGroupPage, az as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, aw as MatchSortField, at as MatchStatus, M as MatchesParams, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, O as Orderbook, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, ag as PredictPosition, a6 as PredictTag, i as PredictTrade, a as PredictWsClient, a4 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, af as PricePoint, a5 as ProviderMeta, d as ProviderSource, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, S as SimilarEventsParams, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, Y as WsConnectionStatus, Z as WsDataMessage, aI as WsErrorCode, aJ as WsErrorMessage, $ as WsOrderbookEvent, aE as WsPingMessage, aG as WsPongMessage, _ as WsPriceEvent, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, a0 as WsTradeEvent, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-DDzzly1V.mjs';
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, b5 as BuildClobAuthMessageInput, bj as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, bi as ClobOrderPayload, a0 as CreateOrderInput, bm as DEFAULT_PAGE_SIZE, ai as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, f as EventSortField, e as EventStatus, ac as EventSummary, b2 as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, t as MatchGroup, at as MatchGroupEntry, au as MatchGroupMarket, s as MatchGroupPage, ay as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, av as MatchSortField, as as MatchStatus, M as MatchesParams, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bk as OrderMessage, ah as OrderSide, ag as OrderStatus, O as Orderbook, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, af as PredictPosition, a5 as PredictTag, i as PredictTrade, a as PredictWsClient, a3 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, ae as PricePoint, a4 as ProviderMeta, d as ProviderSource, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bl as SignedOrder, S as SimilarEventsParams, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, X as WsConnectionStatus, Y as WsDataMessage, aH as WsErrorCode, aI as WsErrorMessage, _ as WsOrderbookEvent, aD as WsPingMessage, aF as WsPongMessage, Z as WsPriceEvent, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, $ as WsTradeEvent, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-DsjYCQiB.js';
1
+ export { B as BalanceResponse, b9 as BuildClobAuthMessageInput, bn as BuildOrderMessageInput, b0 as CLOB_AUTH_DOMAIN, b1 as CLOB_AUTH_TYPES, ba as CTF_EXCHANGE_ADDRESS, bf as CTF_ORDER_TYPES, r as CancelOrderResult, C as Candlestick, bm as ClobOrderPayload, a1 as CreateOrderInput, bq as DEFAULT_PAGE_SIZE, aj as DFlowOrderContext, D as DFlowQuoteRequest, y as DFlowQuoteResponse, F as DFlowSubmitRequest, z as DFlowSubmitResponse, al as DepositBuildRequest, am as DepositBuildResponse, ap as DepositStatusResponse, an as DepositSubmitRequest, ao as DepositSubmitResponse, f as EventSortField, e as EventStatus, ad as EventSummary, b6 as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, w as ListTradesParams, aa as MarketOutcome, a9 as MarketResult, a8 as MarketStatus, ae as MarketSummary, ay as MatchConfidenceTier, t as MatchGroup, au as MatchGroupEntry, av as MatchGroupMarket, s as MatchGroupPage, az as MatchMarketFlat, v as MatchMarketPage, u as MatchMarketParams, aw as MatchSortField, at as MatchStatus, M as MatchesParams, ax as MatchesStats, bb as NEG_RISK_CTF_EXCHANGE_ADDRESS, bg as ORDER_TYPE, bo as OrderMessage, ai as OrderSide, ah as OrderStatus, O as Orderbook, ab as OrderbookLevel, bd as POLYGON_CHAIN_ID, b8 as PolymarketL2Headers, b7 as PolymarketL2HeadersInput, ak as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, ag as PredictPosition, a6 as PredictTag, i as PredictTrade, a as PredictWsClient, a4 as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, af as PricePoint, a5 as ProviderMeta, d as ProviderSource, aT as ResolveEventsParamsInput, bh as SIDE, a7 as SettlementSource, bp as SignedOrder, S as SimilarEventsParams, aU as TagSlugSelection, ac as TradeType, bc as USDC_ADDRESS, aq as UnsignedTx, aA as WsChannel, aB as WsChannelEvent, aC as WsClientMessage, Y as WsConnectionStatus, Z as WsDataMessage, aI as WsErrorCode, aJ as WsErrorMessage, $ as WsOrderbookEvent, aE as WsPingMessage, aG as WsPongMessage, _ as WsPriceEvent, aF as WsServerMessage, aD as WsSubscribeMessage, aH as WsSubscribedMessage, a0 as WsTradeEvent, b2 as buildClobAuthMessage, bk as buildClobPayload, be as buildCtfExchangeDomain, bi as buildOrderMessage, b4 as buildPolymarketL2Headers, bj as buildSignedOrder, a2 as createPredictClient, a3 as createPredictWsClient, b5 as derivePolymarketApiKey, aN as eventQueryKey, aO as fetchEvent, aS as fetchEventsPage, aW as fetchMarket, a$ as fetchMatchMarketsPage, aZ as fetchMatchesPage, b3 as hmacSha256Base64, aR as infiniteEventsQueryKey, aV as marketQueryKey, a_ as matchMarketsQueryKey, aY as matchQueryKey, aX as matchesQueryKey, aQ as resolveEventsParams, aP as resolveTagSlug } from './server-DDzzly1V.js';
package/dist/server.js CHANGED
@@ -513,6 +513,29 @@ var PredictClient = class {
513
513
  const url = `${this.endpoint}/api/v1/withdraw/polymarket/execute`;
514
514
  return await utils.httpPost(url, body);
515
515
  }
516
+ // -------------------------------------------------------------------------
517
+ // Redeem (resolved market token redemption)
518
+ // -------------------------------------------------------------------------
519
+ /**
520
+ * Prepare EIP-712 SafeTx typed data for a Polymarket redeem transaction.
521
+ * The frontend must sign this data and pass the signature to `redeemPolymarket`.
522
+ *
523
+ * Maps to `POST /api/v1/redeem/polymarket/prepare`.
524
+ */
525
+ async prepareRedeemPolymarket(body) {
526
+ const url = `${this.endpoint}/api/v1/redeem/polymarket/prepare`;
527
+ return await utils.httpPost(url, body);
528
+ }
529
+ /**
530
+ * Redeem tokens from a resolved Polymarket market via gasless Relayer.
531
+ * Requires a valid EIP-712 signature from the prepare step.
532
+ *
533
+ * Maps to `POST /api/v1/redeem/polymarket`.
534
+ */
535
+ async redeemPolymarket(body) {
536
+ const url = `${this.endpoint}/api/v1/redeem/polymarket`;
537
+ return await utils.httpPost(url, body);
538
+ }
516
539
  };
517
540
  function createPredictClient(endpoint) {
518
541
  return new PredictClient(endpoint);