@liberfi.io/react-predict 0.3.39 → 0.3.41

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/server.mjs CHANGED
@@ -330,22 +330,15 @@ var PredictClient = class {
330
330
  // Polymarket trading
331
331
  // -------------------------------------------------------------------------
332
332
  /**
333
- * Create a Polymarket limit order via the prediction-server proxy.
333
+ * Execute an already signed Polymarket CLOB order through prediction-server.
334
334
  *
335
- * Maps to `POST /api/v1/orders/polymarket`.
336
- *
337
- * The caller must attach Polymarket CLOB authentication headers:
338
- * - `POLY_ADDRESS` — the EVM wallet address.
339
- * - `POLY_SIGNATURE` — L1 signature or L2 API key.
340
- * - `POLY_TIMESTAMP` — Unix milliseconds string.
341
- * - `POLY_NONCE` — credential nonce (use `"0"` for in-session derived creds).
342
- *
343
- * @param input - Order parameters.
344
- * @param headers - Polymarket CLOB auth headers (`POLY_*`).
335
+ * Maps to `POST /api/v1/orders/polymarket/execute`. The server builds the
336
+ * CLOB HMAC headers from the provided L2 credentials, forwards `payload`
337
+ * unchanged to `/order`, and records rebate identity mappings.
345
338
  */
346
- async createPolymarketOrder(input, headers) {
347
- const url = `${this.endpoint}/api/v1/orders/polymarket`;
348
- return await httpPost(url, input, { headers });
339
+ async executePolymarketOrder(req) {
340
+ const url = `${this.endpoint}/api/v1/orders/polymarket/execute`;
341
+ return await httpPost(url, req);
349
342
  }
350
343
  /** Maps to `GET /api/v1/polymarket/tick-size?token_id=xxx`. */
351
344
  async getPolymarketTickSize(tokenId) {
@@ -549,6 +542,11 @@ var PredictClient = class {
549
542
  // -------------------------------------------------------------------------
550
543
  // Polymarket Relayer Withdraw
551
544
  // -------------------------------------------------------------------------
545
+ /** Maps to `POST /api/v1/withdraw/polymarket/quote`. */
546
+ async quotePolymarketWithdraw(body) {
547
+ const url = `${this.endpoint}/api/v1/withdraw/polymarket/quote`;
548
+ return await httpPost(url, body);
549
+ }
552
550
  /**
553
551
  * Prepare a Polymarket withdrawal by obtaining a Bridge deposit address.
554
552
  *
@@ -558,6 +556,22 @@ var PredictClient = class {
558
556
  const url = `${this.endpoint}/api/v1/withdraw/polymarket/prepare`;
559
557
  return await httpPost(url, body);
560
558
  }
559
+ /** Maps to `POST /api/v1/withdraw/polymarket/build-relay`. */
560
+ async buildPolymarketWithdrawRelay(body) {
561
+ const url = `${this.endpoint}/api/v1/withdraw/polymarket/build-relay`;
562
+ return await httpPost(url, body);
563
+ }
564
+ /** Maps to `POST /api/v1/withdraw/polymarket/submit-relay`. */
565
+ async submitPolymarketWithdrawRelay(body) {
566
+ const url = `${this.endpoint}/api/v1/withdraw/polymarket/submit-relay`;
567
+ return await httpPost(url, body);
568
+ }
569
+ /** Maps to `GET /api/v1/withdraw/polymarket/status`. */
570
+ async getPolymarketWithdrawStatus(params) {
571
+ const query = buildQuery(params);
572
+ const url = `${this.endpoint}/api/v1/withdraw/polymarket/status${query}`;
573
+ return await httpGet(url);
574
+ }
561
575
  /**
562
576
  * Execute a gasless USDC.e withdrawal from a Polymarket Safe wallet via Relayer.
563
577
  *