@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.
- package/dist/index.d.mts +43 -3
- package/dist/index.d.ts +43 -3
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{server-DsjYCQiB.d.mts → server-DDzzly1V.d.mts} +41 -1
- package/dist/{server-DsjYCQiB.d.ts → server-DDzzly1V.d.ts} +41 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +23 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +23 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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,
|
|
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,
|
|
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);
|