@liberfi.io/react-predict 0.1.20 → 0.1.22
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 +170 -21
- package/dist/index.d.ts +170 -21
- package/dist/index.js +478 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +462 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{server-CiGfmztS.d.mts → server-lP60FIU5.d.mts} +295 -27
- package/dist/{server-CiGfmztS.d.ts → server-lP60FIU5.d.ts} +295 -27
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +209 -40
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +208 -42
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -320,6 +320,45 @@ interface MatchGroupPage {
|
|
|
320
320
|
total?: number;
|
|
321
321
|
stats?: MatchesStats;
|
|
322
322
|
}
|
|
323
|
+
/** Confidence tier for match quality. */
|
|
324
|
+
type MatchConfidenceTier = "high" | "medium" | "low";
|
|
325
|
+
/** Flattened market pair from a match group (market-level granularity). */
|
|
326
|
+
interface MatchMarketFlat {
|
|
327
|
+
match_id: number;
|
|
328
|
+
similarity_score: number;
|
|
329
|
+
confidence_tier: MatchConfidenceTier;
|
|
330
|
+
status: MatchStatus;
|
|
331
|
+
source_a: ProviderSource;
|
|
332
|
+
event_a_title: string;
|
|
333
|
+
market_a: PredictMarket;
|
|
334
|
+
source_b: ProviderSource;
|
|
335
|
+
event_b_title: string;
|
|
336
|
+
market_b: PredictMarket;
|
|
337
|
+
spread?: number;
|
|
338
|
+
spread_percent?: number;
|
|
339
|
+
arb_profit?: number;
|
|
340
|
+
combined_volume?: number;
|
|
341
|
+
combined_volume_24h?: number;
|
|
342
|
+
}
|
|
343
|
+
/** Paginated result for flattened market pairs. */
|
|
344
|
+
interface MatchMarketPage {
|
|
345
|
+
items: MatchMarketFlat[];
|
|
346
|
+
total: number;
|
|
347
|
+
limit: number;
|
|
348
|
+
offset: number;
|
|
349
|
+
}
|
|
350
|
+
/** Query parameters for `GET /api/v1/matches/markets`. */
|
|
351
|
+
interface MatchMarketParams {
|
|
352
|
+
sort_by?: MatchSortField;
|
|
353
|
+
sort_asc?: boolean;
|
|
354
|
+
min_spread?: number;
|
|
355
|
+
min_volume?: number;
|
|
356
|
+
sources?: string;
|
|
357
|
+
status?: MatchStatus;
|
|
358
|
+
search?: string;
|
|
359
|
+
limit?: number;
|
|
360
|
+
offset?: number;
|
|
361
|
+
}
|
|
323
362
|
/** A single user position in a prediction market. */
|
|
324
363
|
interface PredictPosition {
|
|
325
364
|
source: ProviderSource;
|
|
@@ -335,11 +374,18 @@ interface PredictPosition {
|
|
|
335
374
|
redeemable: boolean;
|
|
336
375
|
event?: PredictEvent;
|
|
337
376
|
market?: PredictMarket;
|
|
377
|
+
/**
|
|
378
|
+
* Position-level provider metadata.
|
|
379
|
+
* DFlow positions carry `dflow.outcomeMint` and `dflow.collateralMint`.
|
|
380
|
+
*/
|
|
338
381
|
provider_meta?: ProviderMeta;
|
|
339
382
|
}
|
|
340
383
|
/** Response from `GET /api/v1/positions`. */
|
|
341
384
|
interface PositionsResponse {
|
|
342
|
-
|
|
385
|
+
/** Populated for single-source or legacy aggregate queries. */
|
|
386
|
+
user?: string;
|
|
387
|
+
/** Populated for multi-wallet queries (keys are external source names). */
|
|
388
|
+
wallets?: Record<string, string>;
|
|
343
389
|
positions: PredictPosition[];
|
|
344
390
|
}
|
|
345
391
|
/** Response from `GET /api/v1/balance`. */
|
|
@@ -355,6 +401,96 @@ interface BalanceResponse {
|
|
|
355
401
|
/** Token decimals (e.g. 6 for USDC). */
|
|
356
402
|
decimals: number;
|
|
357
403
|
}
|
|
404
|
+
/** Request body for `POST /api/v1/withdraw/build`. */
|
|
405
|
+
interface WithdrawBuildRequest {
|
|
406
|
+
source: ProviderSource;
|
|
407
|
+
from: string;
|
|
408
|
+
to: string;
|
|
409
|
+
/** Human-readable amount (e.g. "10.5"). */
|
|
410
|
+
amount: string;
|
|
411
|
+
}
|
|
412
|
+
/** Response from `POST /api/v1/withdraw/build`. */
|
|
413
|
+
interface WithdrawBuildResponse {
|
|
414
|
+
/** Base64 (Solana) or JSON tx params (Polygon). */
|
|
415
|
+
serialized_tx: string;
|
|
416
|
+
/** Unix timestamp; 0 means no expiry. */
|
|
417
|
+
expires_at: number;
|
|
418
|
+
}
|
|
419
|
+
/** Request body for `POST /api/v1/withdraw/submit`. */
|
|
420
|
+
interface WithdrawSubmitRequest {
|
|
421
|
+
source: ProviderSource;
|
|
422
|
+
signed_tx: string;
|
|
423
|
+
}
|
|
424
|
+
/** Response from `POST /api/v1/withdraw/submit`. */
|
|
425
|
+
interface WithdrawSubmitResponse {
|
|
426
|
+
tx_hash: string;
|
|
427
|
+
status: string;
|
|
428
|
+
}
|
|
429
|
+
/** Response from `GET /api/v1/withdraw/status`. */
|
|
430
|
+
interface WithdrawStatusResponse {
|
|
431
|
+
tx_hash: string;
|
|
432
|
+
/** "submitted" | "confirmed" | "failed" */
|
|
433
|
+
status: "submitted" | "confirmed" | "failed";
|
|
434
|
+
}
|
|
435
|
+
/** Request body for `POST /api/v1/deposit/polymarket/build`. */
|
|
436
|
+
interface DepositBuildRequest {
|
|
437
|
+
source: ProviderSource;
|
|
438
|
+
from: string;
|
|
439
|
+
safe_address: string;
|
|
440
|
+
/** Total USDC needed (human-readable, e.g. "50.0"). */
|
|
441
|
+
amount: string;
|
|
442
|
+
}
|
|
443
|
+
/** A single unsigned EVM transaction in the deposit build response. */
|
|
444
|
+
interface UnsignedTx {
|
|
445
|
+
/** "approve" or "swap" */
|
|
446
|
+
type: "approve" | "swap";
|
|
447
|
+
/** Transaction params: {from, to, data, value, chainId, gas} */
|
|
448
|
+
params: Record<string, string>;
|
|
449
|
+
}
|
|
450
|
+
/** Response from `POST /api/v1/deposit/polymarket/build`. */
|
|
451
|
+
interface DepositBuildResponse {
|
|
452
|
+
transactions: UnsignedTx[];
|
|
453
|
+
/** USDC amount that needs to be swapped (human-readable). */
|
|
454
|
+
shortfall: string;
|
|
455
|
+
/** Current Safe USDC.e balance (human-readable). */
|
|
456
|
+
safe_balance: string;
|
|
457
|
+
}
|
|
458
|
+
/** Request body for `POST /api/v1/deposit/polymarket/submit`. */
|
|
459
|
+
interface DepositSubmitRequest {
|
|
460
|
+
source: ProviderSource;
|
|
461
|
+
signed_tx: string;
|
|
462
|
+
}
|
|
463
|
+
/** Response from `POST /api/v1/deposit/polymarket/submit`. */
|
|
464
|
+
interface DepositSubmitResponse {
|
|
465
|
+
tx_hash: string;
|
|
466
|
+
status: string;
|
|
467
|
+
}
|
|
468
|
+
/** Response from `GET /api/v1/deposit/polymarket/status`. */
|
|
469
|
+
interface DepositStatusResponse {
|
|
470
|
+
tx_hash: string;
|
|
471
|
+
/** "submitted" | "confirmed" | "failed" */
|
|
472
|
+
status: "submitted" | "confirmed" | "failed";
|
|
473
|
+
}
|
|
474
|
+
/** Multi-chain deposit addresses from the Polymarket Bridge API. */
|
|
475
|
+
interface PolymarketDepositAddresses {
|
|
476
|
+
evm: string;
|
|
477
|
+
svm: string;
|
|
478
|
+
btc: string;
|
|
479
|
+
tvm?: string;
|
|
480
|
+
}
|
|
481
|
+
/** Request body for `POST /api/v1/withdraw/polymarket/execute`. */
|
|
482
|
+
interface PolymarketWithdrawRequest {
|
|
483
|
+
wallet_address: string;
|
|
484
|
+
safe_address: string;
|
|
485
|
+
to: string;
|
|
486
|
+
/** Human-readable amount (e.g. "10.5"). */
|
|
487
|
+
amount: string;
|
|
488
|
+
}
|
|
489
|
+
/** Response from `POST /api/v1/withdraw/polymarket/execute`. */
|
|
490
|
+
interface PolymarketWithdrawResponse {
|
|
491
|
+
transaction_id: string;
|
|
492
|
+
status: string;
|
|
493
|
+
}
|
|
358
494
|
/** Lifecycle status of a user order. */
|
|
359
495
|
type OrderStatus = "live" | "matched" | "cancelled" | "invalid" | "submitted" | "pending" | "open" | "pending_close" | "closed" | "failed" | "expired";
|
|
360
496
|
/** Order direction. */
|
|
@@ -456,6 +592,15 @@ interface DFlowKYCStatus {
|
|
|
456
592
|
/** URL to redirect the user to for KYC onboarding (provided by server config). */
|
|
457
593
|
kyc_url: string;
|
|
458
594
|
}
|
|
595
|
+
/** Response from `GET /api/v1/setup/polymarket?wallet_address=...`. */
|
|
596
|
+
interface PolymarketSetupStatus {
|
|
597
|
+
wallet_address: string;
|
|
598
|
+
safe_address?: string;
|
|
599
|
+
safe_deployed: boolean;
|
|
600
|
+
token_approved: boolean;
|
|
601
|
+
/** True when safe_deployed && token_approved. */
|
|
602
|
+
verified: boolean;
|
|
603
|
+
}
|
|
459
604
|
/** WebSocket subscription channel. */
|
|
460
605
|
type WsChannel = "orderbook" | "prices" | "trades";
|
|
461
606
|
/** WebSocket connection lifecycle status. */
|
|
@@ -593,12 +738,16 @@ declare class PredictClient {
|
|
|
593
738
|
/** Maps to `GET /api/v1/markets/:slug/candlesticks?interval=...&limit=...`. */
|
|
594
739
|
listCandlesticks(slug: string, params?: ListCandlesticksParams): Promise<Candlestick[]>;
|
|
595
740
|
/**
|
|
596
|
-
* Maps to `GET /api/v1/positions
|
|
741
|
+
* Maps to `GET /api/v1/positions`.
|
|
597
742
|
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
743
|
+
* Single-source: `getPositions("addr", "kalshi")`.
|
|
744
|
+
* Multi-wallet: `getPositions({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
|
|
745
|
+
* Legacy agg: `getPositions("addr")` (same address for all providers).
|
|
600
746
|
*/
|
|
601
|
-
getPositions(
|
|
747
|
+
getPositions(userOrWallets: string | {
|
|
748
|
+
kalshi_user?: string;
|
|
749
|
+
polymarket_user?: string;
|
|
750
|
+
}, source?: ProviderSource): Promise<PositionsResponse>;
|
|
602
751
|
/**
|
|
603
752
|
* Get the on-chain USDC balance for a wallet.
|
|
604
753
|
*
|
|
@@ -608,12 +757,29 @@ declare class PredictClient {
|
|
|
608
757
|
* @param user - Wallet address.
|
|
609
758
|
*/
|
|
610
759
|
getBalance(source: ProviderSource, user: string): Promise<BalanceResponse>;
|
|
611
|
-
/**
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
760
|
+
/**
|
|
761
|
+
* Maps to `GET /api/v1/orders?source=...&wallet_address=...`.
|
|
762
|
+
*
|
|
763
|
+
* @param params - Query parameters (source, wallet_address, etc.).
|
|
764
|
+
* @param headers - Optional extra headers (e.g. Polymarket POLY_* HMAC headers).
|
|
765
|
+
*/
|
|
766
|
+
listOrders(params: ListOrdersParams, headers?: Record<string, string>): Promise<PredictPage<PredictOrder>>;
|
|
767
|
+
/**
|
|
768
|
+
* Maps to `GET /api/v1/orders/:id?source=...`.
|
|
769
|
+
*
|
|
770
|
+
* @param id - Order ID.
|
|
771
|
+
* @param source - Provider source.
|
|
772
|
+
* @param headers - Optional extra headers (e.g. Polymarket POLY_* HMAC headers).
|
|
773
|
+
*/
|
|
774
|
+
getOrder(id: string, source: ProviderSource, headers?: Record<string, string>): Promise<PredictOrder>;
|
|
775
|
+
/**
|
|
776
|
+
* Maps to `DELETE /api/v1/orders/:id?source=...`.
|
|
777
|
+
*
|
|
778
|
+
* @param id - Order ID.
|
|
779
|
+
* @param source - Provider source.
|
|
780
|
+
* @param headers - Optional extra headers (e.g. Polymarket POLY_* HMAC headers).
|
|
781
|
+
*/
|
|
782
|
+
cancelOrder(id: string, source: ProviderSource, headers?: Record<string, string>): Promise<CancelOrderResult>;
|
|
617
783
|
/**
|
|
618
784
|
* Create a Polymarket limit order via the prediction-server proxy.
|
|
619
785
|
*
|
|
@@ -639,6 +805,18 @@ declare class PredictClient {
|
|
|
639
805
|
* Maps to `GET /api/v1/kyc/kalshi?wallet_address=...`.
|
|
640
806
|
*/
|
|
641
807
|
checkDFlowKYC(walletAddress: string): Promise<DFlowKYCStatus>;
|
|
808
|
+
/**
|
|
809
|
+
* Check Polymarket wallet setup status (Safe deployed + USDC.e approved).
|
|
810
|
+
*
|
|
811
|
+
* Maps to `GET /api/v1/setup/polymarket?wallet_address=...`.
|
|
812
|
+
*/
|
|
813
|
+
checkPolymarketSetup(walletAddress: string): Promise<PolymarketSetupStatus>;
|
|
814
|
+
/**
|
|
815
|
+
* Run Polymarket wallet setup (deploy Safe + approve USDC.e).
|
|
816
|
+
*
|
|
817
|
+
* Maps to `POST /api/v1/setup/polymarket`.
|
|
818
|
+
*/
|
|
819
|
+
runPolymarketSetup(walletAddress: string): Promise<PolymarketSetupStatus>;
|
|
642
820
|
/**
|
|
643
821
|
* List cross-platform matched event groups with inline aggregate stats.
|
|
644
822
|
*
|
|
@@ -651,8 +829,45 @@ declare class PredictClient {
|
|
|
651
829
|
* Maps to `GET /api/v1/matches/:id`.
|
|
652
830
|
*/
|
|
653
831
|
getMatch(id: number): Promise<MatchGroup>;
|
|
832
|
+
/**
|
|
833
|
+
* List flattened market pairs across match groups (market-level granularity).
|
|
834
|
+
*
|
|
835
|
+
* Maps to `GET /api/v1/matches/markets`.
|
|
836
|
+
*/
|
|
837
|
+
listMatchMarkets(params?: MatchMarketParams): Promise<MatchMarketPage>;
|
|
654
838
|
/** Maps to `GET /api/v1/trades?source=...&wallet=...`. */
|
|
655
839
|
listTrades(params: ListTradesParams): Promise<PredictPage<PredictTrade>>;
|
|
840
|
+
/** Maps to `POST /api/v1/withdraw/build`. */
|
|
841
|
+
withdrawBuild(body: WithdrawBuildRequest): Promise<WithdrawBuildResponse>;
|
|
842
|
+
/** Maps to `POST /api/v1/withdraw/submit`. */
|
|
843
|
+
withdrawSubmit(body: WithdrawSubmitRequest): Promise<WithdrawSubmitResponse>;
|
|
844
|
+
/** Maps to `GET /api/v1/withdraw/status?tx_hash=...&source=...`. */
|
|
845
|
+
withdrawStatus(txHash: string, source: ProviderSource): Promise<WithdrawStatusResponse>;
|
|
846
|
+
/**
|
|
847
|
+
* Build unsigned deposit transactions (approve + Uniswap V3 swap).
|
|
848
|
+
*
|
|
849
|
+
* The server checks the Safe's USDC.e balance and returns only
|
|
850
|
+
* the transactions needed to cover the shortfall.
|
|
851
|
+
*
|
|
852
|
+
* Maps to `POST /api/v1/deposit/polymarket/build`.
|
|
853
|
+
*/
|
|
854
|
+
depositBuild(body: DepositBuildRequest): Promise<DepositBuildResponse>;
|
|
855
|
+
/** Maps to `POST /api/v1/deposit/polymarket/submit`. */
|
|
856
|
+
depositSubmit(body: DepositSubmitRequest): Promise<DepositSubmitResponse>;
|
|
857
|
+
/** Maps to `GET /api/v1/deposit/polymarket/status?tx_hash=...&source=...`. */
|
|
858
|
+
depositStatus(txHash: string, source: ProviderSource): Promise<DepositStatusResponse>;
|
|
859
|
+
/**
|
|
860
|
+
* Get multi-chain deposit addresses for a Polymarket Safe wallet via Bridge API.
|
|
861
|
+
*
|
|
862
|
+
* Maps to `GET /api/v1/deposit/polymarket/addresses?safe_address=...`.
|
|
863
|
+
*/
|
|
864
|
+
getPolymarketDepositAddresses(safeAddress: string): Promise<PolymarketDepositAddresses>;
|
|
865
|
+
/**
|
|
866
|
+
* Execute a gasless USDC.e withdrawal from a Polymarket Safe wallet via Relayer.
|
|
867
|
+
*
|
|
868
|
+
* Maps to `POST /api/v1/withdraw/polymarket/execute`.
|
|
869
|
+
*/
|
|
870
|
+
executePolymarketWithdraw(body: PolymarketWithdrawRequest): Promise<PolymarketWithdrawResponse>;
|
|
656
871
|
}
|
|
657
872
|
/**
|
|
658
873
|
* Factory function for `PredictClient`.
|
|
@@ -899,6 +1114,18 @@ declare function matchQueryKey(id: number): unknown[];
|
|
|
899
1114
|
/** Fetch a page of matches (usable in both client and server contexts). */
|
|
900
1115
|
declare function fetchMatchesPage(client: PredictClient, params: MatchesParams): Promise<MatchGroupPage>;
|
|
901
1116
|
|
|
1117
|
+
/**
|
|
1118
|
+
* Server-safe pure functions for match markets query parameters.
|
|
1119
|
+
*
|
|
1120
|
+
* This module contains NO React imports and can be used in Server Components,
|
|
1121
|
+
* route handlers, or any non-browser context.
|
|
1122
|
+
*/
|
|
1123
|
+
|
|
1124
|
+
/** Query key for market-level match queries. */
|
|
1125
|
+
declare function matchMarketsQueryKey(params?: MatchMarketParams): unknown[];
|
|
1126
|
+
/** Fetch a page of match markets (usable in both client and server contexts). */
|
|
1127
|
+
declare function fetchMatchMarketsPage(client: PredictClient, params: MatchMarketParams): Promise<MatchMarketPage>;
|
|
1128
|
+
|
|
902
1129
|
/**
|
|
903
1130
|
* Polymarket L2 HMAC-SHA256 signing utilities.
|
|
904
1131
|
*
|
|
@@ -985,19 +1212,24 @@ interface BuildClobAuthMessageInput {
|
|
|
985
1212
|
* The resulting object is passed to `eth_signTypedData_v4`.
|
|
986
1213
|
*/
|
|
987
1214
|
declare function buildClobAuthMessage(input: BuildClobAuthMessageInput): Record<string, unknown>;
|
|
1215
|
+
type ApiKeyCreds = {
|
|
1216
|
+
apiKey: string;
|
|
1217
|
+
secret: string;
|
|
1218
|
+
passphrase: string;
|
|
1219
|
+
};
|
|
988
1220
|
/**
|
|
989
|
-
*
|
|
1221
|
+
* Create or derive Polymarket L2 API credentials from an L1 EIP-712 signature.
|
|
1222
|
+
*
|
|
1223
|
+
* Polymarket exposes two endpoints:
|
|
1224
|
+
* - `POST /auth/api-key` — create new credentials (required for first-time wallets)
|
|
1225
|
+
* - `GET /auth/derive-api-key` — derive existing credentials
|
|
990
1226
|
*
|
|
991
|
-
*
|
|
992
|
-
*
|
|
1227
|
+
* This function tries to derive first; on failure it creates, matching the
|
|
1228
|
+
* official `createOrDeriveApiKey()` behaviour from `@polymarket/clob-client`.
|
|
993
1229
|
*
|
|
994
|
-
* @returns
|
|
1230
|
+
* @returns `{ apiKey, secret, passphrase }`.
|
|
995
1231
|
*/
|
|
996
|
-
declare function derivePolymarketApiKey(address: string, signature: string, timestamp: string, nonce: number): Promise<
|
|
997
|
-
apiKey: string;
|
|
998
|
-
secret: string;
|
|
999
|
-
passphrase: string;
|
|
1000
|
-
}>;
|
|
1232
|
+
declare function derivePolymarketApiKey(address: string, signature: string, timestamp: string, nonce: number): Promise<ApiKeyCreds>;
|
|
1001
1233
|
|
|
1002
1234
|
/**
|
|
1003
1235
|
* Polymarket CTF Exchange order construction utilities.
|
|
@@ -1120,14 +1352,50 @@ interface SignedOrder extends OrderMessage {
|
|
|
1120
1352
|
signature: string;
|
|
1121
1353
|
orderType: string;
|
|
1122
1354
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1355
|
+
/**
|
|
1356
|
+
* Attach a signature (and optional orderType) to an already-built order message
|
|
1357
|
+
* to produce the final payload for the Polymarket CLOB.
|
|
1358
|
+
*
|
|
1359
|
+
* IMPORTANT: always pass the SAME `OrderMessage` that was used for EIP-712
|
|
1360
|
+
* signing. Do NOT rebuild it — `buildOrderMessage` generates a random salt
|
|
1361
|
+
* each time, so a second call would produce a different message and the
|
|
1362
|
+
* signature would be invalid.
|
|
1363
|
+
*/
|
|
1364
|
+
declare function buildSignedOrder(orderMessage: OrderMessage, signature: string, orderType?: string): SignedOrder;
|
|
1365
|
+
/**
|
|
1366
|
+
* CLOB order payload as expected by Polymarket's `POST /order` endpoint.
|
|
1367
|
+
*
|
|
1368
|
+
* Key format differences from the EIP-712 `OrderMessage`:
|
|
1369
|
+
* - `salt` is a **number** (not a string)
|
|
1370
|
+
* - `side` is `"BUY"` / `"SELL"` (not 0 / 1)
|
|
1371
|
+
* - `deferExec` is required (defaults to `false`)
|
|
1372
|
+
*
|
|
1373
|
+
* @see https://github.com/Polymarket/clob-client/blob/main/src/utilities.ts
|
|
1374
|
+
*/
|
|
1375
|
+
interface ClobOrderPayload {
|
|
1376
|
+
order: {
|
|
1377
|
+
salt: number;
|
|
1378
|
+
maker: string;
|
|
1379
|
+
signer: string;
|
|
1380
|
+
taker: string;
|
|
1381
|
+
tokenId: string;
|
|
1382
|
+
makerAmount: string;
|
|
1383
|
+
takerAmount: string;
|
|
1384
|
+
expiration: string;
|
|
1385
|
+
nonce: string;
|
|
1386
|
+
feeRateBps: string;
|
|
1387
|
+
side: "BUY" | "SELL";
|
|
1388
|
+
signatureType: number;
|
|
1389
|
+
signature: string;
|
|
1390
|
+
};
|
|
1391
|
+
owner: string;
|
|
1392
|
+
orderType: string;
|
|
1393
|
+
deferExec: boolean;
|
|
1126
1394
|
}
|
|
1127
1395
|
/**
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1396
|
+
* Convert a `SignedOrder` into the JSON payload format that Polymarket's
|
|
1397
|
+
* CLOB API expects. Mirrors the official `orderToJson()` utility.
|
|
1130
1398
|
*/
|
|
1131
|
-
declare function
|
|
1399
|
+
declare function buildClobPayload(signedOrder: SignedOrder, owner: string): ClobOrderPayload;
|
|
1132
1400
|
|
|
1133
|
-
export { type
|
|
1401
|
+
export { type MarketStatus as $, type WithdrawSubmitRequest as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStatus as E, type WithdrawStatusResponse as F, type PolymarketDepositAddresses as G, type PolymarketWithdrawResponse as H, type PolymarketWithdrawRequest as I, type WsConnectionStatus as J, type WsDataMessage as K, type ListEventsParams as L, type MatchesParams as M, type WsPriceEvent as N, type Orderbook as O, PredictClient as P, type WsOrderbookEvent as Q, type WsTradeEvent as R, type SimilarEventsParams as S, type CreateOrderInput as T, createPredictClient as U, createPredictWsClient as V, type WithdrawBuildResponse as W, type PredictWsClientConfig as X, type ProviderMeta as Y, type PredictTag as Z, type SettlementSource as _, PredictWsClient as a, USDC_ADDRESS as a$, type MarketResult as a0, type MarketOutcome as a1, type EventSortField as a2, type OrderbookLevel as a3, type TradeType as a4, type EventSummary as a5, type MarketSummary as a6, type PricePoint as a7, type PredictPosition as a8, type OrderStatus as a9, eventQueryKey as aA, fetchEvent as aB, resolveTagSlug as aC, resolveEventsParams as aD, infiniteEventsQueryKey as aE, fetchEventsPage as aF, type ResolveEventsParamsInput as aG, type TagSlugSelection as aH, marketQueryKey as aI, fetchMarket as aJ, matchesQueryKey as aK, matchQueryKey as aL, fetchMatchesPage as aM, matchMarketsQueryKey as aN, fetchMatchMarketsPage as aO, CLOB_AUTH_DOMAIN as aP, CLOB_AUTH_TYPES as aQ, buildClobAuthMessage as aR, hmacSha256Base64 as aS, buildPolymarketL2Headers as aT, derivePolymarketApiKey as aU, type HttpMethod as aV, type PolymarketL2HeadersInput as aW, type PolymarketL2Headers as aX, type BuildClobAuthMessageInput as aY, CTF_EXCHANGE_ADDRESS as aZ, NEG_RISK_CTF_EXCHANGE_ADDRESS as a_, type OrderSide as aa, type DFlowOrderContext as ab, type PolymarketOrderType as ac, type DepositBuildRequest as ad, type DepositBuildResponse as ae, type DepositSubmitRequest as af, type DepositSubmitResponse as ag, type DepositStatusResponse as ah, type UnsignedTx as ai, type MatchStatus as aj, type MatchGroupEntry as ak, type MatchGroupMarket as al, type MatchSortField as am, type MatchesStats as an, type MatchConfidenceTier as ao, type MatchMarketFlat as ap, type WsChannel as aq, type WsChannelEvent as ar, type WsClientMessage as as, type WsSubscribeMessage as at, type WsPingMessage as au, type WsServerMessage as av, type WsPongMessage as aw, type WsSubscribedMessage as ax, type WsErrorCode as ay, type WsErrorMessage as az, type PredictPage as b, POLYGON_CHAIN_ID as b0, buildCtfExchangeDomain as b1, CTF_ORDER_TYPES as b2, ORDER_TYPE as b3, SIDE as b4, buildOrderMessage as b5, buildSignedOrder as b6, buildClobPayload as b7, type ClobOrderPayload as b8, type BuildOrderMessageInput as b9, type OrderMessage as ba, type SignedOrder as bb, DEFAULT_PAGE_SIZE as bc, type PredictEvent as c, type ProviderSource as d, type PredictMarket as e, type ListMarketTradesParams as f, type PredictTrade as g, type PriceHistoryRange as h, type PriceHistoryResponse as i, type ListCandlesticksParams as j, type PositionsResponse as k, type ListOrdersParams as l, type PredictOrder as m, type CancelOrderResult as n, type MatchGroupPage as o, type MatchGroup as p, type MatchMarketParams as q, type MatchMarketPage as r, type ListTradesParams as s, type DFlowQuoteResponse as t, type DFlowSubmitResponse as u, type DFlowSubmitRequest as v, type DFlowKYCStatus as w, type PolymarketSetupStatus as x, type WithdrawBuildRequest as y, type WithdrawSubmitResponse as z };
|