@polymarket/client 0.0.0-canary-20260421120448

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.
@@ -0,0 +1,4754 @@
1
+ import * as _polymarket_bindings from '@polymarket/bindings';
2
+ import { PaginationCursor, EvmAddress as EvmAddress$1, TokenId, TickSizeValue, ConditionId, TransactionId } from '@polymarket/bindings';
3
+ import { EvmAddress, Prettify, PolymarketError, EvmSignature, HexString, NonEmptyArray, TxHash } from '@polymarket/types';
4
+ import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
5
+ import { z, ZodError } from 'zod';
6
+ import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
7
+ import { ClobTrade, NotificationsResponse, BuilderTrade, Prices, OrderBook, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, OrderSide, OrderType, SignatureType, OrderResponse, OrderResponses, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse } from '@polymarket/bindings/clob';
8
+ import { WalletType, Event, TagReference, Market, Series, Tag, RelatedTag, PublicSearchResponse, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment } from '@polymarket/bindings/gamma';
9
+ import { Position, ClosedPosition, Value, Traded, MetaMarketPositionV1, Activity, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder, Trade } from '@polymarket/bindings/data';
10
+ import { Hex } from 'ox';
11
+
12
+ type AccountIdentity = {
13
+ signer: EvmAddress;
14
+ wallet: EvmAddress;
15
+ walletType: WalletType;
16
+ };
17
+
18
+ declare const PageSizeSchema: z.ZodNumber;
19
+ type Page<T> = {
20
+ items: T[];
21
+ hasMore: boolean;
22
+ nextCursor?: PaginationCursor;
23
+ totalCount?: number;
24
+ };
25
+ type Paginated<T> = AsyncIterable<Page<T>> & {
26
+ firstPage(): Promise<Page<T>>;
27
+ from(cursor?: PaginationCursor): Paginated<T>;
28
+ };
29
+
30
+ type AccountPublicActions = {
31
+ /**
32
+ * Lists current positions for a wallet.
33
+ *
34
+ * @throws {@link ListPositionsError}
35
+ * Thrown on failure.
36
+ *
37
+ * @example
38
+ * Fetch the first page of results:
39
+ * ```ts
40
+ * const paginator = client.listPositions({
41
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
42
+ * pageSize: 10,
43
+ * });
44
+ *
45
+ * const firstPage = await paginator.firstPage();
46
+ *
47
+ * // Optionally, fetch additional pages:
48
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
49
+ * // page.items: Position[]
50
+ * }
51
+ * ```
52
+ *
53
+ * @example
54
+ * Loop through all pages with `for await`:
55
+ * ```ts
56
+ * const paginator = client.listPositions({
57
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
58
+ * pageSize: 10,
59
+ * });
60
+ *
61
+ * for await (const page of paginator) {
62
+ * // page.items: Position[]
63
+ * }
64
+ * ```
65
+ */
66
+ listPositions(request: ListPositionsRequest): Paginated<Position>;
67
+ /**
68
+ * Lists closed positions for a wallet.
69
+ *
70
+ * @throws {@link ListClosedPositionsError}
71
+ * Thrown on failure.
72
+ *
73
+ * @example
74
+ * Fetch the first page of results:
75
+ * ```ts
76
+ * const paginator = client.listClosedPositions({
77
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
78
+ * pageSize: 10,
79
+ * });
80
+ *
81
+ * const firstPage = await paginator.firstPage();
82
+ *
83
+ * // Optionally, fetch additional pages:
84
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
85
+ * // page.items: ClosedPosition[]
86
+ * }
87
+ * ```
88
+ *
89
+ * @example
90
+ * Loop through all pages with `for await`:
91
+ * ```ts
92
+ * const paginator = client.listClosedPositions({
93
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
94
+ * pageSize: 10,
95
+ * });
96
+ *
97
+ * for await (const page of paginator) {
98
+ * // page.items: ClosedPosition[]
99
+ * }
100
+ * ```
101
+ */
102
+ listClosedPositions(request: ListClosedPositionsRequest): Paginated<ClosedPosition>;
103
+ /**
104
+ * Fetches the total value for a wallet's positions.
105
+ *
106
+ * @throws {@link FetchPortfolioValueError}
107
+ * Thrown on failure.
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const value = await client.fetchPortfolioValue({
112
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
113
+ * });
114
+ * ```
115
+ */
116
+ fetchPortfolioValue(request: FetchPortfolioValueRequest): Promise<Value[]>;
117
+ /**
118
+ * Fetches the total number of markets a wallet has traded.
119
+ *
120
+ * @throws {@link FetchTradedMarketCountError}
121
+ * Thrown on failure.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * const traded = await client.fetchTradedMarketCount({
126
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
127
+ * });
128
+ * ```
129
+ */
130
+ fetchTradedMarketCount(request: FetchTradedMarketCountRequest): Promise<Traded>;
131
+ /**
132
+ * Downloads an accounting snapshot archive for a wallet.
133
+ *
134
+ * @throws {@link DownloadAccountingSnapshotError}
135
+ * Thrown on failure.
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * const snapshot = await client.downloadAccountingSnapshot({
140
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
141
+ * });
142
+ * ```
143
+ */
144
+ downloadAccountingSnapshot(request: DownloadAccountingSnapshotRequest): Promise<Blob>;
145
+ /**
146
+ * Lists positions for a market.
147
+ *
148
+ * @throws {@link ListMarketPositionsError}
149
+ * Thrown on failure.
150
+ *
151
+ * @example
152
+ * Fetch the first page of results:
153
+ * ```ts
154
+ * const paginator = client.listMarketPositions({
155
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
156
+ * pageSize: 10,
157
+ * });
158
+ *
159
+ * const firstPage = await paginator.firstPage();
160
+ *
161
+ * // Optionally, fetch additional pages:
162
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
163
+ * // page.items: MetaMarketPositionV1[]
164
+ * }
165
+ * ```
166
+ *
167
+ * @example
168
+ * Loop through all pages with `for await`:
169
+ * ```ts
170
+ * const paginator = client.listMarketPositions({
171
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
172
+ * pageSize: 10,
173
+ * });
174
+ *
175
+ * for await (const page of paginator) {
176
+ * // page.items: MetaMarketPositionV1[]
177
+ * }
178
+ * ```
179
+ */
180
+ listMarketPositions(request: ListMarketPositionsRequest): Paginated<MetaMarketPositionV1>;
181
+ /**
182
+ * Lists wallet activity.
183
+ *
184
+ * @throws {@link ListActivityError}
185
+ * Thrown on failure.
186
+ *
187
+ * @example
188
+ * Fetch the first page of results:
189
+ * ```ts
190
+ * const paginator = client.listActivity({
191
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
192
+ * pageSize: 10,
193
+ * });
194
+ *
195
+ * const firstPage = await paginator.firstPage();
196
+ *
197
+ * // Optionally, fetch additional pages:
198
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
199
+ * // page.items: Activity[]
200
+ * }
201
+ * ```
202
+ *
203
+ * @example
204
+ * Loop through all pages with `for await`:
205
+ * ```ts
206
+ * const paginator = client.listActivity({
207
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
208
+ * pageSize: 10,
209
+ * });
210
+ *
211
+ * for await (const page of paginator) {
212
+ * // page.items: Activity[]
213
+ * }
214
+ * ```
215
+ */
216
+ listActivity(request: ListActivityRequest): Paginated<Activity>;
217
+ };
218
+ type AccountActions = Prettify<AccountPublicActions & {
219
+ /**
220
+ * Lists trades for the authenticated account across all pages.
221
+ *
222
+ * @throws {@link ListAccountTradesError}
223
+ * Thrown on failure.
224
+ *
225
+ * @example
226
+ * Fetch the first page of results:
227
+ * ```ts
228
+ * const paginator = client.listAccountTrades({
229
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
230
+ * });
231
+ *
232
+ * const firstPage = await paginator.firstPage();
233
+ *
234
+ * // Optionally, fetch additional pages:
235
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
236
+ * // page.items: ClobTrade[]
237
+ * }
238
+ * ```
239
+ *
240
+ * @example
241
+ * Loop through all pages with `for await`:
242
+ * ```ts
243
+ * const paginator = client.listAccountTrades({
244
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
245
+ * });
246
+ *
247
+ * for await (const page of paginator) {
248
+ * // page.items: ClobTrade[]
249
+ * }
250
+ * ```
251
+ */
252
+ listAccountTrades(request?: ListAccountTradesRequest): Paginated<ClobTrade>;
253
+ /**
254
+ * Fetches notifications for the authenticated account.
255
+ *
256
+ * @throws {@link FetchNotificationsError}
257
+ * Thrown on failure.
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * const notifications = await client.fetchNotifications();
262
+ * ```
263
+ */
264
+ fetchNotifications(): Promise<NotificationsResponse>;
265
+ /**
266
+ * Drops notifications for the authenticated account.
267
+ *
268
+ * @throws {@link DropNotificationsError}
269
+ * Thrown on failure.
270
+ *
271
+ * @example
272
+ * ```ts
273
+ * await client.dropNotifications({
274
+ * ids: ['1', '2'],
275
+ * });
276
+ * ```
277
+ */
278
+ dropNotifications(request: DropNotificationsRequest): Promise<void>;
279
+ /**
280
+ * Fetches whether the account is restricted to closed-only trading.
281
+ *
282
+ * @throws {@link FetchClosedOnlyModeError}
283
+ * Thrown on failure.
284
+ *
285
+ * @example
286
+ * ```ts
287
+ * const closedOnly = await client.fetchClosedOnlyMode();
288
+ * ```
289
+ */
290
+ fetchClosedOnlyMode(): Promise<boolean>;
291
+ }>;
292
+ declare function accountActions(client: BasePublicClient): AccountPublicActions;
293
+ declare function accountActions(client: BaseSecureClient): AccountActions;
294
+
295
+ type AnalyticsActions = {
296
+ /**
297
+ * Lists builder-attributed trades.
298
+ *
299
+ * @throws {@link ListBuilderTradesError}
300
+ * Thrown on failure.
301
+ *
302
+ * @example
303
+ * Fetch the first page of results:
304
+ * ```ts
305
+ * const paginator = client.listBuilderTrades({
306
+ * pageSize: 10,
307
+ * });
308
+ *
309
+ * const firstPage = await paginator.firstPage();
310
+ *
311
+ * // Optionally, fetch additional pages:
312
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
313
+ * // page.items: BuilderTrade[]
314
+ * }
315
+ * ```
316
+ *
317
+ * @example
318
+ * Loop through all pages with `for await`:
319
+ * ```ts
320
+ * const paginator = client.listBuilderTrades({
321
+ * pageSize: 10,
322
+ * });
323
+ *
324
+ * for await (const page of paginator) {
325
+ * // page.items: BuilderTrade[]
326
+ * }
327
+ * ```
328
+ */
329
+ listBuilderTrades(request?: ListBuilderTradesRequest): Paginated<BuilderTrade>;
330
+ /**
331
+ * Lists builder leaderboard rankings.
332
+ *
333
+ * @throws {@link ListBuilderLeaderboardError}
334
+ * Thrown on failure.
335
+ *
336
+ * @example
337
+ * Fetch the first page of results:
338
+ * ```ts
339
+ * const paginator = client.listBuilderLeaderboard({
340
+ * pageSize: 10,
341
+ * timePeriod: 'DAY',
342
+ * });
343
+ *
344
+ * const firstPage = await paginator.firstPage();
345
+ *
346
+ * // Optionally, fetch additional pages:
347
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
348
+ * // page.items: LeaderboardEntry[]
349
+ * }
350
+ * ```
351
+ *
352
+ * @example
353
+ * Loop through all pages with `for await`:
354
+ * ```ts
355
+ * const paginator = client.listBuilderLeaderboard({
356
+ * pageSize: 10,
357
+ * timePeriod: 'DAY',
358
+ * });
359
+ *
360
+ * for await (const page of paginator) {
361
+ * // page.items: LeaderboardEntry[]
362
+ * }
363
+ * ```
364
+ */
365
+ listBuilderLeaderboard(request?: ListBuilderLeaderboardRequest): Paginated<LeaderboardEntry>;
366
+ /**
367
+ * Lists daily builder volume entries.
368
+ *
369
+ * @throws {@link ListBuilderVolumeError}
370
+ * Thrown on failure.
371
+ *
372
+ * @example
373
+ * ```ts
374
+ * const volume = await client.fetchBuilderVolume({
375
+ * timePeriod: 'DAY',
376
+ * });
377
+ * ```
378
+ */
379
+ fetchBuilderVolume(request?: ListBuilderVolumeRequest): Promise<BuilderVolumeEntry[]>;
380
+ /**
381
+ * Lists trader leaderboard rankings.
382
+ *
383
+ * @throws {@link ListTraderLeaderboardError}
384
+ * Thrown on failure.
385
+ *
386
+ * @example
387
+ * Fetch the first page of results:
388
+ * ```ts
389
+ * const paginator = client.listTraderLeaderboard({
390
+ * orderBy: 'PNL',
391
+ * pageSize: 10,
392
+ * timePeriod: 'DAY',
393
+ * });
394
+ *
395
+ * const firstPage = await paginator.firstPage();
396
+ *
397
+ * // Optionally, fetch additional pages:
398
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
399
+ * // page.items: TraderLeaderboardEntry[]
400
+ * }
401
+ * ```
402
+ *
403
+ * @example
404
+ * Loop through all pages with `for await`:
405
+ * ```ts
406
+ * const paginator = client.listTraderLeaderboard({
407
+ * orderBy: 'PNL',
408
+ * pageSize: 10,
409
+ * timePeriod: 'DAY',
410
+ * });
411
+ *
412
+ * for await (const page of paginator) {
413
+ * // page.items: TraderLeaderboardEntry[]
414
+ * }
415
+ * ```
416
+ */
417
+ listTraderLeaderboard(request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry>;
418
+ };
419
+ declare function analyticsActions(client: BasePublicClient): AnalyticsActions;
420
+ declare function analyticsActions(client: BaseSecureClient): AnalyticsActions;
421
+
422
+ type DataActions = {
423
+ /**
424
+ * Fetches live volume for an event.
425
+ *
426
+ * @throws {@link FetchEventLiveVolumeError}
427
+ * Thrown on failure.
428
+ *
429
+ * @example
430
+ * ```ts
431
+ * const volume = await client.fetchEventLiveVolume({ id: '123' });
432
+ * ```
433
+ */
434
+ fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
435
+ /**
436
+ * Fetches the midpoint price for a token.
437
+ *
438
+ * @throws {@link FetchMidpointError}
439
+ * Thrown on failure.
440
+ *
441
+ * @example
442
+ * ```ts
443
+ * const midpoint = await client.fetchMidpoint({ tokenId: '123' });
444
+ * ```
445
+ */
446
+ fetchMidpoint(request: FetchMidpointRequest): Promise<string>;
447
+ /**
448
+ * Fetches midpoint prices for multiple tokens.
449
+ *
450
+ * @throws {@link FetchMidpointsError}
451
+ * Thrown on failure.
452
+ *
453
+ * @example
454
+ * ```ts
455
+ * const midpoints = await client.fetchMidpoints([{ tokenId: '123' }]);
456
+ * ```
457
+ */
458
+ fetchMidpoints(request: FetchMidpointsRequest): Promise<Record<string, string>>;
459
+ /**
460
+ * Fetches the current quoted price for a token and side.
461
+ *
462
+ * @throws {@link FetchPriceError}
463
+ * Thrown on failure.
464
+ *
465
+ * @example
466
+ * ```ts
467
+ * const price = await client.fetchPrice({ tokenId: '123', side: OrderSide.BUY });
468
+ * ```
469
+ */
470
+ fetchPrice(request: FetchPriceRequest): Promise<string>;
471
+ /**
472
+ * Fetches quoted prices for multiple tokens.
473
+ *
474
+ * @throws {@link FetchPricesError}
475
+ * Thrown on failure.
476
+ *
477
+ * @example
478
+ * ```ts
479
+ * const prices = await client.fetchPrices([{ tokenId: '123', side: OrderSide.BUY }]);
480
+ * ```
481
+ */
482
+ fetchPrices(request: FetchPricesRequest): Promise<Prices>;
483
+ /**
484
+ * Fetches the current order book for a token.
485
+ *
486
+ * @throws {@link FetchOrderBookError}
487
+ * Thrown on failure.
488
+ *
489
+ * @example
490
+ * ```ts
491
+ * const book = await client.fetchOrderBook({ tokenId: '123' });
492
+ * ```
493
+ */
494
+ fetchOrderBook(request: FetchOrderBookRequest): Promise<OrderBook>;
495
+ /**
496
+ * Fetches order books for multiple tokens.
497
+ *
498
+ * @throws {@link FetchOrderBooksError}
499
+ * Thrown on failure.
500
+ *
501
+ * @example
502
+ * ```ts
503
+ * const books = await client.fetchOrderBooks([{ tokenId: '123' }]);
504
+ * ```
505
+ */
506
+ fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
507
+ /**
508
+ * Fetches the spread for a token.
509
+ *
510
+ * @throws {@link FetchSpreadError}
511
+ * Thrown on failure.
512
+ *
513
+ * @example
514
+ * ```ts
515
+ * const spread = await client.fetchSpread({ tokenId: '123' });
516
+ * ```
517
+ */
518
+ fetchSpread(request: FetchSpreadRequest): Promise<string>;
519
+ /**
520
+ * Fetches spreads for multiple tokens.
521
+ *
522
+ * @throws {@link FetchSpreadsError}
523
+ * Thrown on failure.
524
+ *
525
+ * @example
526
+ * ```ts
527
+ * const spreads = await client.fetchSpreads([{ tokenId: '123' }]);
528
+ * ```
529
+ */
530
+ fetchSpreads(request: FetchSpreadsRequest): Promise<Record<string, string>>;
531
+ /**
532
+ * Fetches the last traded price for a token.
533
+ *
534
+ * @throws {@link FetchLastTradePriceError}
535
+ * Thrown on failure.
536
+ *
537
+ * @example
538
+ * ```ts
539
+ * const price = await client.fetchLastTradePrice({ tokenId: '123' });
540
+ * ```
541
+ */
542
+ fetchLastTradePrice(request: FetchLastTradePriceRequest): Promise<LastTradePrice>;
543
+ /**
544
+ * Fetches last traded prices for multiple tokens.
545
+ *
546
+ * @throws {@link FetchLastTradePricesError}
547
+ * Thrown on failure.
548
+ *
549
+ * @example
550
+ * ```ts
551
+ * const prices = await client.fetchLastTradePrices([{ tokenId: '123' }]);
552
+ * ```
553
+ */
554
+ fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<LastTradePriceForToken[]>;
555
+ /**
556
+ * Fetches historical price points for a token.
557
+ *
558
+ * @throws {@link FetchPriceHistoryError}
559
+ * Thrown on failure.
560
+ *
561
+ * @example
562
+ * ```ts
563
+ * const history = await client.fetchPriceHistory({ tokenId: '123', interval: '1d' });
564
+ * ```
565
+ */
566
+ fetchPriceHistory(request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
567
+ /**
568
+ * Estimates the price level a market order would cross at current book depth.
569
+ *
570
+ * For BUY orders, `amount` is the amount of collateral to spend. For SELL orders,
571
+ * `amount` is the number of shares to sell.
572
+ *
573
+ * @throws {@link EstimateMarketPriceError}
574
+ * Thrown on failure.
575
+ *
576
+ * @example
577
+ * ```ts
578
+ * const price = await client.estimateMarketPrice({
579
+ * tokenId: '123',
580
+ * side: OrderSide.BUY,
581
+ * amount: 10,
582
+ * });
583
+ * ```
584
+ */
585
+ estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
586
+ /**
587
+ * Lists open interest for one or more markets.
588
+ *
589
+ * @throws {@link ListOpenInterestError}
590
+ * Thrown on failure.
591
+ *
592
+ * @example
593
+ * ```ts
594
+ * const openInterest = await client.listOpenInterest({
595
+ * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
596
+ * });
597
+ * ```
598
+ */
599
+ listOpenInterest(request?: ListOpenInterestRequest): Promise<OpenInterest[]>;
600
+ /**
601
+ * Lists the top holders for one or more markets.
602
+ *
603
+ * @throws {@link ListMarketHoldersError}
604
+ * Thrown on failure.
605
+ *
606
+ * @example
607
+ * ```ts
608
+ * const holders = await client.listMarketHolders({
609
+ * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
610
+ * limit: 5,
611
+ * });
612
+ * ```
613
+ */
614
+ listMarketHolders(request: ListMarketHoldersRequest): Promise<MetaHolder[]>;
615
+ /**
616
+ * Lists trades for a wallet, market, or event.
617
+ *
618
+ * @throws {@link ListTradesError}
619
+ * Thrown on failure.
620
+ *
621
+ * @example
622
+ * Fetch the first page of results:
623
+ * ```ts
624
+ * const paginator = client.listTrades({
625
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
626
+ * pageSize: 10,
627
+ * });
628
+ *
629
+ * const firstPage = await paginator.firstPage();
630
+ *
631
+ * // Optionally, fetch additional pages:
632
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
633
+ * // page.items: Trade[]
634
+ * }
635
+ * ```
636
+ *
637
+ * @example
638
+ * Loop through all pages with `for await`:
639
+ * ```ts
640
+ * const paginator = client.listTrades({
641
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
642
+ * pageSize: 10,
643
+ * });
644
+ *
645
+ * for await (const page of paginator) {
646
+ * // page.items: Trade[]
647
+ * }
648
+ * ```
649
+ */
650
+ listTrades(request?: ListTradesRequest): Paginated<Trade>;
651
+ };
652
+ declare function dataActions(client: BasePublicClient): DataActions;
653
+ declare function dataActions(client: BaseSecureClient): DataActions;
654
+
655
+ type DiscoveryActions = {
656
+ /**
657
+ * Lists events.
658
+ *
659
+ * @throws {@link ListEventsError}
660
+ * Thrown on failure.
661
+ *
662
+ * @example
663
+ * Fetch the first page of results:
664
+ * ```ts
665
+ * const paginator = client.listEvents({
666
+ * pageSize: 10,
667
+ * });
668
+ *
669
+ * const firstPage = await paginator.firstPage();
670
+ *
671
+ * // Optionally, fetch additional pages:
672
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
673
+ * // page.items: Event[]
674
+ * }
675
+ * ```
676
+ *
677
+ * @example
678
+ * Loop through all pages with `for await`:
679
+ * ```ts
680
+ * const paginator = client.listEvents({
681
+ * pageSize: 10,
682
+ * });
683
+ *
684
+ * for await (const page of paginator) {
685
+ * // page.items: Event[]
686
+ * }
687
+ * ```
688
+ */
689
+ listEvents(request?: ListEventsRequest): Paginated<Event>;
690
+ /**
691
+ * Fetches an event.
692
+ *
693
+ * @throws {@link FetchEventError}
694
+ * Thrown on failure.
695
+ *
696
+ * @example
697
+ * ```ts
698
+ * const event = await client.fetchEvent({
699
+ * id: '123',
700
+ * });
701
+ * ```
702
+ */
703
+ fetchEvent(request: FetchEventRequest): Promise<Event>;
704
+ /**
705
+ * Fetches an event's tags.
706
+ *
707
+ * @throws {@link FetchEventTagsError}
708
+ * Thrown on failure.
709
+ *
710
+ * @example
711
+ * ```ts
712
+ * const tags = await client.fetchEventTags({
713
+ * id: '123',
714
+ * });
715
+ * ```
716
+ */
717
+ fetchEventTags(request: FetchEventTagsRequest): Promise<TagReference[]>;
718
+ /**
719
+ * Lists markets.
720
+ *
721
+ * @throws {@link ListMarketsError}
722
+ * Thrown on failure.
723
+ *
724
+ * @example
725
+ * Fetch the first page of results:
726
+ * ```ts
727
+ * const paginator = client.listMarkets({
728
+ * closed: false,
729
+ * pageSize: 10,
730
+ * });
731
+ *
732
+ * const firstPage = await paginator.firstPage();
733
+ *
734
+ * // Optionally, fetch additional pages:
735
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
736
+ * // page.items: Market[]
737
+ * }
738
+ * ```
739
+ *
740
+ * @example
741
+ * Loop through all pages with `for await`:
742
+ * ```ts
743
+ * const paginator = client.listMarkets({
744
+ * closed: false,
745
+ * pageSize: 10,
746
+ * });
747
+ *
748
+ * for await (const page of paginator) {
749
+ * // page.items: Market[]
750
+ * }
751
+ * ```
752
+ */
753
+ listMarkets(request?: ListMarketsRequest): Paginated<Market>;
754
+ /**
755
+ * Fetches a market.
756
+ *
757
+ * @throws {@link FetchMarketError}
758
+ * Thrown on failure.
759
+ *
760
+ * @example
761
+ * ```ts
762
+ * const market = await client.fetchMarket({
763
+ * id: '12345',
764
+ * });
765
+ * ```
766
+ */
767
+ fetchMarket(request: FetchMarketRequest): Promise<Market>;
768
+ /**
769
+ * Fetches a market's tags.
770
+ *
771
+ * @throws {@link FetchMarketTagsError}
772
+ * Thrown on failure.
773
+ *
774
+ * @example
775
+ * ```ts
776
+ * const tags = await client.fetchMarketTags({
777
+ * id: '12345',
778
+ * });
779
+ * ```
780
+ */
781
+ fetchMarketTags(request: FetchMarketTagsRequest): Promise<TagReference[]>;
782
+ /**
783
+ * Lists series.
784
+ *
785
+ * @throws {@link ListSeriesError}
786
+ * Thrown on failure.
787
+ *
788
+ * @example
789
+ * Fetch the first page of results:
790
+ * ```ts
791
+ * const paginator = client.listSeries({
792
+ * pageSize: 10,
793
+ * });
794
+ *
795
+ * const firstPage = await paginator.firstPage();
796
+ *
797
+ * // Optionally, fetch additional pages:
798
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
799
+ * // page.items: Series[]
800
+ * }
801
+ * ```
802
+ *
803
+ * @example
804
+ * Loop through all pages with `for await`:
805
+ * ```ts
806
+ * const paginator = client.listSeries({
807
+ * pageSize: 10,
808
+ * });
809
+ *
810
+ * for await (const page of paginator) {
811
+ * // page.items: Series[]
812
+ * }
813
+ * ```
814
+ */
815
+ listSeries(request?: ListSeriesRequest): Paginated<Series>;
816
+ /**
817
+ * Fetches a series.
818
+ *
819
+ * @throws {@link FetchSeriesError}
820
+ * Thrown on failure.
821
+ *
822
+ * @example
823
+ * ```ts
824
+ * const series = await client.fetchSeries({
825
+ * id: '123',
826
+ * });
827
+ * ```
828
+ */
829
+ fetchSeries(request: FetchSeriesRequest): Promise<Series>;
830
+ /**
831
+ * Lists tags.
832
+ *
833
+ * @throws {@link ListTagsError}
834
+ * Thrown on failure.
835
+ *
836
+ * @example
837
+ * Fetch the first page of results:
838
+ * ```ts
839
+ * const paginator = client.listTags({
840
+ * pageSize: 10,
841
+ * });
842
+ *
843
+ * const firstPage = await paginator.firstPage();
844
+ *
845
+ * // Optionally, fetch additional pages:
846
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
847
+ * // page.items: Tag[]
848
+ * }
849
+ * ```
850
+ *
851
+ * @example
852
+ * Loop through all pages with `for await`:
853
+ * ```ts
854
+ * const paginator = client.listTags({
855
+ * pageSize: 10,
856
+ * });
857
+ *
858
+ * for await (const page of paginator) {
859
+ * // page.items: Tag[]
860
+ * }
861
+ * ```
862
+ */
863
+ listTags(request?: ListTagsRequest): Paginated<Tag>;
864
+ /**
865
+ * Fetches a tag by id or slug.
866
+ *
867
+ * @throws {@link FetchTagError}
868
+ * Thrown on failure.
869
+ *
870
+ * @example
871
+ * ```ts
872
+ * const tag = await client.fetchTag({
873
+ * slug: 'politics',
874
+ * });
875
+ * ```
876
+ */
877
+ fetchTag(request: FetchTagRequest): Promise<Tag>;
878
+ /**
879
+ * Fetches related tag relationships by id or slug.
880
+ *
881
+ * @throws {@link FetchRelatedTagsError}
882
+ * Thrown on failure.
883
+ *
884
+ * @example
885
+ * ```ts
886
+ * const related = await client.fetchRelatedTags({
887
+ * slug: 'politics',
888
+ * });
889
+ * ```
890
+ */
891
+ fetchRelatedTags(request: FetchRelatedTagsRequest): Promise<RelatedTag[]>;
892
+ /**
893
+ * Fetches resources linked from related tag relationships by id or slug.
894
+ *
895
+ * @throws {@link FetchRelatedTagResourcesError}
896
+ * Thrown on failure.
897
+ *
898
+ * @example
899
+ * ```ts
900
+ * const resources = await client.fetchRelatedTagResources({
901
+ * slug: 'politics',
902
+ * });
903
+ * ```
904
+ */
905
+ fetchRelatedTagResources(request: FetchRelatedTagResourcesRequest): Promise<Tag[]>;
906
+ /**
907
+ * Runs a public full-text search.
908
+ *
909
+ * @throws {@link SearchError}
910
+ * Thrown on failure.
911
+ *
912
+ * @example
913
+ * ```ts
914
+ * const results = await client.search({
915
+ * query: 'election',
916
+ * });
917
+ * ```
918
+ */
919
+ search(request: SearchRequest): Promise<PublicSearchResponse>;
920
+ /**
921
+ * Lists available sports metadata.
922
+ *
923
+ * @throws {@link ListSportsError}
924
+ * Thrown on failure.
925
+ *
926
+ * @example
927
+ * ```ts
928
+ * const sports = await client.listSports();
929
+ * ```
930
+ */
931
+ listSports(): Promise<SportsMetadata[]>;
932
+ /**
933
+ * Fetches the available market types grouped by sport.
934
+ *
935
+ * @throws {@link FetchSportsMarketTypesError}
936
+ * Thrown on failure.
937
+ *
938
+ * @example
939
+ * ```ts
940
+ * const marketTypes = await client.fetchSportsMarketTypes();
941
+ * ```
942
+ */
943
+ fetchSportsMarketTypes(): Promise<SportsMarketTypesResponse>;
944
+ /**
945
+ * Lists teams.
946
+ *
947
+ * @throws {@link ListTeamsError}
948
+ * Thrown on failure.
949
+ *
950
+ * @example
951
+ * Fetch the first page of results:
952
+ * ```ts
953
+ * const paginator = client.listTeams({
954
+ * pageSize: 10,
955
+ * });
956
+ *
957
+ * const firstPage = await paginator.firstPage();
958
+ *
959
+ * // Optionally, fetch additional pages:
960
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
961
+ * // page.items: Team[]
962
+ * }
963
+ * ```
964
+ *
965
+ * @example
966
+ * Loop through all pages with `for await`:
967
+ * ```ts
968
+ * const paginator = client.listTeams({
969
+ * pageSize: 10,
970
+ * });
971
+ *
972
+ * for await (const page of paginator) {
973
+ * // page.items: Team[]
974
+ * }
975
+ * ```
976
+ */
977
+ listTeams(request?: ListTeamsRequest): Paginated<Team>;
978
+ /**
979
+ * Fetches a public profile by wallet address.
980
+ *
981
+ * @throws {@link FetchPublicProfileError}
982
+ * Thrown on failure.
983
+ *
984
+ * @example
985
+ * ```ts
986
+ * const profile = await client.fetchPublicProfile({
987
+ * address: '0x1234...',
988
+ * });
989
+ * ```
990
+ */
991
+ fetchPublicProfile(request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
992
+ /**
993
+ * Lists comments for an event or series.
994
+ *
995
+ * @throws {@link ListCommentsError}
996
+ * Thrown on failure.
997
+ *
998
+ * @example
999
+ * Fetch the first page of results:
1000
+ * ```ts
1001
+ * const paginator = client.listComments({
1002
+ * parentEntityId: '123',
1003
+ * parentEntityType: 'Event',
1004
+ * pageSize: 20,
1005
+ * });
1006
+ *
1007
+ * const firstPage = await paginator.firstPage();
1008
+ *
1009
+ * // Optionally, fetch additional pages:
1010
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1011
+ * // page.items: Comment[]
1012
+ * }
1013
+ * ```
1014
+ *
1015
+ * @example
1016
+ * Loop through all pages with `for await`:
1017
+ * ```ts
1018
+ * const paginator = client.listComments({
1019
+ * parentEntityId: '123',
1020
+ * parentEntityType: 'Event',
1021
+ * pageSize: 20,
1022
+ * });
1023
+ *
1024
+ * for await (const page of paginator) {
1025
+ * // page.items: Comment[]
1026
+ * }
1027
+ * ```
1028
+ */
1029
+ listComments(request: ListCommentsRequest): Paginated<Comment>;
1030
+ /**
1031
+ * Fetches a comment thread by comment id.
1032
+ *
1033
+ * @throws {@link FetchCommentsByIdError}
1034
+ * Thrown on failure.
1035
+ *
1036
+ * @example
1037
+ * ```ts
1038
+ * const thread = await client.fetchCommentsById({
1039
+ * id: '456',
1040
+ * getPositions: true,
1041
+ * });
1042
+ * ```
1043
+ */
1044
+ fetchCommentsById(request: FetchCommentsByIdRequest): Promise<Comment[]>;
1045
+ /**
1046
+ * Lists comments written by a wallet address.
1047
+ *
1048
+ * @throws {@link ListCommentsByUserAddressError}
1049
+ * Thrown on failure.
1050
+ *
1051
+ * @example
1052
+ * Fetch the first page of results:
1053
+ * ```ts
1054
+ * const paginator = client.listCommentsByUserAddress({
1055
+ * address: '0x1234...',
1056
+ * pageSize: 10,
1057
+ * order: 'DESC',
1058
+ * });
1059
+ *
1060
+ * const firstPage = await paginator.firstPage();
1061
+ *
1062
+ * // Optionally, fetch additional pages:
1063
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1064
+ * // page.items: Comment[]
1065
+ * }
1066
+ * ```
1067
+ *
1068
+ * @example
1069
+ * Loop through all pages with `for await`:
1070
+ * ```ts
1071
+ * const paginator = client.listCommentsByUserAddress({
1072
+ * address: '0x1234...',
1073
+ * pageSize: 10,
1074
+ * order: 'DESC',
1075
+ * });
1076
+ *
1077
+ * for await (const page of paginator) {
1078
+ * // page.items: Comment[]
1079
+ * }
1080
+ * ```
1081
+ */
1082
+ listCommentsByUserAddress(request: ListCommentsByUserAddressRequest): Paginated<Comment>;
1083
+ };
1084
+ declare function discoveryActions(client: BasePublicClient): DiscoveryActions;
1085
+ declare function discoveryActions(client: BaseSecureClient): DiscoveryActions;
1086
+
1087
+ type RewardsPublicActions = {
1088
+ /**
1089
+ * Lists current active market rewards.
1090
+ *
1091
+ * @throws {@link ListCurrentRewardsError}
1092
+ * Thrown on failure.
1093
+ *
1094
+ * @example
1095
+ * Fetch the first page of results:
1096
+ * ```ts
1097
+ * const paginator = client.listCurrentRewards();
1098
+ *
1099
+ * const firstPage = await paginator.firstPage();
1100
+ *
1101
+ * // Optionally, fetch additional pages:
1102
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1103
+ * // page.items: CurrentReward[]
1104
+ * }
1105
+ * ```
1106
+ *
1107
+ * @example
1108
+ * Loop through all pages with `for await`:
1109
+ * ```ts
1110
+ * const paginator = client.listCurrentRewards();
1111
+ *
1112
+ * for await (const page of paginator) {
1113
+ * // page.items: CurrentReward[]
1114
+ * }
1115
+ * ```
1116
+ */
1117
+ listCurrentRewards(request?: ListCurrentRewardsRequest): Paginated<CurrentReward>;
1118
+ /**
1119
+ * Lists reward configurations for a market.
1120
+ *
1121
+ * @throws {@link ListMarketRewardsError}
1122
+ * Thrown on failure.
1123
+ *
1124
+ * @example
1125
+ * Fetch the first page of results:
1126
+ * ```ts
1127
+ * const paginator = client.listMarketRewards({
1128
+ * conditionId:
1129
+ * '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af',
1130
+ * });
1131
+ *
1132
+ * const firstPage = await paginator.firstPage();
1133
+ *
1134
+ * // Optionally, fetch additional pages:
1135
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1136
+ * // page.items: MarketReward[]
1137
+ * }
1138
+ * ```
1139
+ *
1140
+ * @example
1141
+ * Loop through all pages with `for await`:
1142
+ * ```ts
1143
+ * const paginator = client.listMarketRewards({
1144
+ * conditionId:
1145
+ * '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af',
1146
+ * });
1147
+ *
1148
+ * for await (const page of paginator) {
1149
+ * // page.items: MarketReward[]
1150
+ * }
1151
+ * ```
1152
+ */
1153
+ listMarketRewards(request: ListMarketRewardsRequest): Paginated<MarketReward>;
1154
+ };
1155
+ type RewardsActions = Prettify<RewardsPublicActions & {
1156
+ /**
1157
+ * Fetches whether a single order is currently scoring.
1158
+ *
1159
+ * @throws {@link FetchOrderScoringError}
1160
+ * Thrown on failure.
1161
+ *
1162
+ * @example
1163
+ * ```ts
1164
+ * const scoring = await client.fetchOrderScoring({
1165
+ * orderId: '123',
1166
+ * });
1167
+ * ```
1168
+ */
1169
+ fetchOrderScoring(request: FetchOrderScoringRequest): Promise<boolean>;
1170
+ /**
1171
+ * Fetches scoring state for multiple orders.
1172
+ *
1173
+ * @throws {@link FetchOrdersScoringError}
1174
+ * Thrown on failure.
1175
+ *
1176
+ * @example
1177
+ * ```ts
1178
+ * const scoring = await client.fetchOrdersScoring({
1179
+ * orderIds: ['1', '2'],
1180
+ * });
1181
+ * ```
1182
+ */
1183
+ fetchOrdersScoring(request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
1184
+ /**
1185
+ * Lists per-market earnings for the authenticated account on a given day.
1186
+ *
1187
+ * @throws {@link ListUserEarningsForDayError}
1188
+ * Thrown on failure.
1189
+ *
1190
+ * @example
1191
+ * Fetch the first page of results:
1192
+ * ```ts
1193
+ * const paginator = client.listUserEarningsForDay({
1194
+ * date: '2026-04-16',
1195
+ * });
1196
+ *
1197
+ * const firstPage = await paginator.firstPage();
1198
+ *
1199
+ * // Optionally, fetch additional pages:
1200
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1201
+ * // page.items: UserEarning[]
1202
+ * }
1203
+ * ```
1204
+ *
1205
+ * @example
1206
+ * Loop through all pages with `for await`:
1207
+ * ```ts
1208
+ * const paginator = client.listUserEarningsForDay({
1209
+ * date: '2026-04-16',
1210
+ * });
1211
+ *
1212
+ * for await (const page of paginator) {
1213
+ * // page.items: UserEarning[]
1214
+ * }
1215
+ * ```
1216
+ */
1217
+ listUserEarningsForDay(request: ListUserEarningsForDayRequest): Paginated<UserEarning>;
1218
+ /**
1219
+ * Fetches total earnings for the authenticated account on a given day.
1220
+ *
1221
+ * @throws {@link FetchTotalEarningsForUserForDayError}
1222
+ * Thrown on failure.
1223
+ *
1224
+ * @example
1225
+ * ```ts
1226
+ * const earnings = await client.fetchTotalEarningsForUserForDay({
1227
+ * date: '2026-04-16',
1228
+ * });
1229
+ * ```
1230
+ */
1231
+ fetchTotalEarningsForUserForDay(request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
1232
+ /**
1233
+ * Lists market reward configuration and earnings for the authenticated account on a given day.
1234
+ *
1235
+ * @throws {@link ListUserEarningsAndMarketsConfigError}
1236
+ * Thrown on failure.
1237
+ *
1238
+ * @example
1239
+ * Fetch the first page of results:
1240
+ * ```ts
1241
+ * const paginator = client.listUserEarningsAndMarketsConfig({
1242
+ * date: '2026-04-16',
1243
+ * });
1244
+ *
1245
+ * const firstPage = await paginator.firstPage();
1246
+ *
1247
+ * // Optionally, fetch additional pages:
1248
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
1249
+ * // page.items: UserRewardsEarning[]
1250
+ * }
1251
+ * ```
1252
+ *
1253
+ * @example
1254
+ * Loop through all pages with `for await`:
1255
+ * ```ts
1256
+ * const paginator = client.listUserEarningsAndMarketsConfig({
1257
+ * date: '2026-04-16',
1258
+ * });
1259
+ *
1260
+ * for await (const page of paginator) {
1261
+ * // page.items: UserRewardsEarning[]
1262
+ * }
1263
+ * ```
1264
+ */
1265
+ listUserEarningsAndMarketsConfig(request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning>;
1266
+ /**
1267
+ * Fetches reward percentages for the authenticated account.
1268
+ *
1269
+ * @throws {@link FetchRewardPercentagesError}
1270
+ * Thrown on failure.
1271
+ *
1272
+ * @example
1273
+ * ```ts
1274
+ * const percentages = await client.fetchRewardPercentages();
1275
+ * ```
1276
+ */
1277
+ fetchRewardPercentages(): Promise<RewardsPercentages>;
1278
+ }>;
1279
+ declare function rewardsActions(client: BasePublicClient): RewardsPublicActions;
1280
+ declare function rewardsActions(client: BaseSecureClient): RewardsActions;
1281
+
1282
+ type ResponseValidationContext = {
1283
+ endpoint: string;
1284
+ };
1285
+
1286
+ /**
1287
+ * Error thrown when an action input fails SDK validation before a request is
1288
+ * sent.
1289
+ */
1290
+ declare class UserInputError extends PolymarketError {
1291
+ name: "UserInputError";
1292
+ constructor(message: string, options?: ErrorOptions);
1293
+ static fromZodError(error: ZodError): UserInputError;
1294
+ }
1295
+ /**
1296
+ * Error thrown when a service response does not match the action's expected
1297
+ * response shape.
1298
+ */
1299
+ declare class UnexpectedResponseError extends PolymarketError {
1300
+ name: "UnexpectedResponseError";
1301
+ constructor(message: string, options?: ErrorOptions);
1302
+ static fromZodError(error: ZodError, context: ResponseValidationContext): UnexpectedResponseError;
1303
+ }
1304
+ /**
1305
+ * Error thrown when the SDK cannot complete a request because of a network or
1306
+ * runtime transport failure.
1307
+ */
1308
+ declare class TransportError extends PolymarketError {
1309
+ name: "TransportError";
1310
+ constructor(message: string, options?: ErrorOptions);
1311
+ static fromError(error: unknown): TransportError;
1312
+ }
1313
+ type RequestRejectedErrorOptions = {
1314
+ status: number;
1315
+ };
1316
+ /**
1317
+ * Error thrown when a service responds with a non-success status other than
1318
+ * rate limiting.
1319
+ */
1320
+ declare class RequestRejectedError extends PolymarketError {
1321
+ name: "RequestRejectedError";
1322
+ readonly status: number;
1323
+ constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
1324
+ }
1325
+ /**
1326
+ * Error thrown when the service rejects a request because the rate limit has
1327
+ * been exceeded.
1328
+ */
1329
+ declare class RateLimitError extends PolymarketError {
1330
+ name: "RateLimitError";
1331
+ }
1332
+ /**
1333
+ * Error thrown when an async wait operation exceeds its allotted polling time.
1334
+ */
1335
+ declare class TimeoutError extends PolymarketError {
1336
+ name: "TimeoutError";
1337
+ constructor(message: string, options?: ErrorOptions);
1338
+ }
1339
+ /**
1340
+ * Error thrown when a submitted transaction reaches a terminal failure state.
1341
+ */
1342
+ declare class TransactionFailedError extends PolymarketError {
1343
+ name: "TransactionFailedError";
1344
+ constructor(message: string, options?: ErrorOptions);
1345
+ }
1346
+ /**
1347
+ * Error thrown when the user cancels a required wallet signing action.
1348
+ */
1349
+ declare class CancelledSigningError extends PolymarketError {
1350
+ name: "CancelledSigningError";
1351
+ constructor(message: string, options?: ErrorOptions);
1352
+ static fromError(error: Error): CancelledSigningError;
1353
+ }
1354
+ /**
1355
+ * Error thrown when there is not enough resting market liquidity to satisfy the
1356
+ * requested execution semantics.
1357
+ */
1358
+ declare class InsufficientLiquidityError extends PolymarketError {
1359
+ name: "InsufficientLiquidityError";
1360
+ constructor(message: string, options?: ErrorOptions);
1361
+ }
1362
+ /**
1363
+ * Error thrown when the SDK cannot produce a required signature or
1364
+ * authentication payload.
1365
+ */
1366
+ declare class SigningError extends PolymarketError {
1367
+ name: "SigningError";
1368
+ constructor(message: string, options?: ErrorOptions);
1369
+ static fromError(error: unknown, message?: string): SigningError;
1370
+ }
1371
+
1372
+ declare const CancelOrderRequestSchema: z.ZodObject<{
1373
+ orderId: z.ZodString;
1374
+ }, z.core.$strip>;
1375
+ declare const CancelOrdersRequestSchema: z.ZodObject<{
1376
+ orderIds: z.ZodArray<z.ZodString>;
1377
+ }, z.core.$strip>;
1378
+ declare const CancelMarketOrdersRequestSchema: z.ZodObject<{
1379
+ assetId: z.ZodOptional<z.ZodString>;
1380
+ market: z.ZodOptional<z.ZodString>;
1381
+ }, z.core.$strip>;
1382
+ type CancelOrderRequest = z.input<typeof CancelOrderRequestSchema>;
1383
+ type CancelOrderError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
1384
+ /**
1385
+ * Cancels a single open order for the authenticated account.
1386
+ *
1387
+ * @throws {@link CancelOrderError}
1388
+ * Thrown on failure.
1389
+ *
1390
+ * @example
1391
+ * ```ts
1392
+ * const response = await cancelOrder(client, {
1393
+ * orderId: '123',
1394
+ * });
1395
+ *
1396
+ * // response.canceled: string[]
1397
+ * ```
1398
+ */
1399
+ declare function cancelOrder(client: BaseSecureClient, request: CancelOrderRequest): Promise<CancelOrdersResponse>;
1400
+ type CancelOrdersRequest = z.input<typeof CancelOrdersRequestSchema>;
1401
+ type CancelOrdersError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
1402
+ /**
1403
+ * Cancels multiple open orders for the authenticated account.
1404
+ *
1405
+ * @throws {@link CancelOrdersError}
1406
+ * Thrown on failure.
1407
+ *
1408
+ * @example
1409
+ * ```ts
1410
+ * const response = await cancelOrders(client, {
1411
+ * orderIds: ['1', '2'],
1412
+ * });
1413
+ *
1414
+ * // response.canceled: string[]
1415
+ * ```
1416
+ */
1417
+ declare function cancelOrders(client: BaseSecureClient, request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
1418
+ type CancelAllError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError;
1419
+ /**
1420
+ * Cancels all open orders for the authenticated account.
1421
+ *
1422
+ * @throws {@link CancelAllError}
1423
+ * Thrown on failure.
1424
+ *
1425
+ * @example
1426
+ * ```ts
1427
+ * const response = await cancelAll(client);
1428
+ *
1429
+ * // response.canceled: string[]
1430
+ * ```
1431
+ */
1432
+ declare function cancelAll(client: BaseSecureClient): Promise<CancelOrdersResponse>;
1433
+ type CancelMarketOrdersRequest = z.input<typeof CancelMarketOrdersRequestSchema>;
1434
+ type CancelMarketOrdersError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
1435
+ /**
1436
+ * Cancels all open orders for the authenticated account that match the market
1437
+ * or asset filter.
1438
+ *
1439
+ * @throws {@link CancelMarketOrdersError}
1440
+ * Thrown on failure.
1441
+ *
1442
+ * @example
1443
+ * ```ts
1444
+ * const response = await cancelMarketOrders(client, {
1445
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
1446
+ * });
1447
+ *
1448
+ * // response.canceled: string[]
1449
+ * ```
1450
+ */
1451
+ declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
1452
+
1453
+ declare const EstimateMarketPriceRequestSchema: z.ZodObject<{
1454
+ tokenId: z.ZodString;
1455
+ amount: z.ZodNumber;
1456
+ side: z.ZodEnum<typeof OrderSide>;
1457
+ orderType: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<OrderType.FAK>, z.ZodLiteral<OrderType.FOK>]>>;
1458
+ }, z.core.$strip>;
1459
+ type EstimateMarketPriceRequest = z.input<typeof EstimateMarketPriceRequestSchema>;
1460
+ type EstimateMarketPriceError = InsufficientLiquidityError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
1461
+ /**
1462
+ * Estimates the price level a market order would cross at current book depth.
1463
+ *
1464
+ * For BUY orders, `amount` is the amount of collateral to spend. For SELL orders,
1465
+ * `amount` is the number of shares to sell.
1466
+ *
1467
+ * When `orderType` is `FOK`, this estimate requires enough resting liquidity to
1468
+ * satisfy the full requested amount and throws if the book is too thin. When
1469
+ * `orderType` is `FAK`, the estimate may fall back to the best currently
1470
+ * available price level even if the full requested amount cannot fill, so it
1471
+ * should be treated as a partial-fill execution estimate rather than a full-fill
1472
+ * guarantee.
1473
+ *
1474
+ * @example
1475
+ * ```ts
1476
+ * const price = await estimateMarketPrice(client, {
1477
+ * tokenId:
1478
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
1479
+ * side: OrderSide.BUY,
1480
+ * amount: 10,
1481
+ * });
1482
+ *
1483
+ * // price === 0.53
1484
+ * ```
1485
+ *
1486
+ * @throws {@link EstimateMarketPriceError}
1487
+ * Thrown on failure.
1488
+ */
1489
+ declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
1490
+
1491
+ type SignerTransactionRequest = {
1492
+ chainId: number;
1493
+ data?: HexString;
1494
+ to: EvmAddress;
1495
+ value?: bigint;
1496
+ };
1497
+ type RequestAddressRequest = {
1498
+ kind: 'requestAddress';
1499
+ };
1500
+ type SignAuthMessageRequest = {
1501
+ kind: 'signAuthMessage';
1502
+ payload: TypedDataPayload;
1503
+ };
1504
+ type SendErc20ApprovalTransactionRequest = {
1505
+ kind: 'sendErc20ApprovalTransaction';
1506
+ request: SignerTransactionRequest;
1507
+ };
1508
+ type SendErc1155ApprovalForAllTransactionRequest = {
1509
+ kind: 'sendErc1155ApprovalForAllTransaction';
1510
+ request: SignerTransactionRequest;
1511
+ };
1512
+ type SendErc20TransferTransactionRequest = {
1513
+ kind: 'sendErc20TransferTransaction';
1514
+ request: SignerTransactionRequest;
1515
+ };
1516
+ type SignGaslessTypedDataRequest = {
1517
+ kind: 'signGaslessTypedData';
1518
+ payload: TypedDataPayload;
1519
+ };
1520
+ type SignGaslessMessageRequest = {
1521
+ kind: 'signGaslessMessage';
1522
+ payload: TypedDataPayload;
1523
+ };
1524
+ type SendSplitPositionTransactionRequest = {
1525
+ kind: 'sendSplitPositionTransaction';
1526
+ request: SignerTransactionRequest;
1527
+ };
1528
+ type SendMergePositionsTransactionRequest = {
1529
+ kind: 'sendMergePositionsTransaction';
1530
+ request: SignerTransactionRequest;
1531
+ };
1532
+ type SendRedeemPositionsTransactionRequest = {
1533
+ kind: 'sendRedeemPositionsTransaction';
1534
+ request: SignerTransactionRequest;
1535
+ };
1536
+ type SignOrderRequest = {
1537
+ kind: 'signOrder';
1538
+ payload: TypedDataPayload;
1539
+ };
1540
+ type AuthenticationWorkflowRequest = RequestAddressRequest | SignAuthMessageRequest;
1541
+ type AuthenticationWorkflow<TReturn> = AsyncGenerator<AuthenticationWorkflowRequest, TReturn, EvmAddress | EvmSignature>;
1542
+ type AuthenticateWith = <TReturn>(workflow: AuthenticationWorkflow<TReturn>) => Promise<TReturn>;
1543
+ type AuthenticateWithError = CancelledSigningError | SigningError;
1544
+ type CompleteWithError = CancelledSigningError | SigningError;
1545
+ type CompleteWorkflowRequest = RequestAddressRequest | SendErc20ApprovalTransactionRequest | SendErc1155ApprovalForAllTransactionRequest | SendErc20TransferTransactionRequest | SignGaslessTypedDataRequest | SignGaslessMessageRequest | SendSplitPositionTransactionRequest | SendMergePositionsTransactionRequest | SendRedeemPositionsTransactionRequest | SignOrderRequest;
1546
+ type CompleteWorkflowNext = EvmAddress | EvmSignature | TransactionHandle;
1547
+ type CompleteWith = <TRequest extends CompleteWorkflowRequest, TReturn>(workflow: AsyncGenerator<TRequest, TReturn, CompleteWorkflowNext>) => Promise<TReturn>;
1548
+
1549
+ declare const FetchExecuteParamsRequestSchema: z.ZodObject<{
1550
+ address: z.ZodString;
1551
+ type: z.ZodEnum<typeof RelayerTransactionType>;
1552
+ }, z.core.$strip>;
1553
+ type FetchExecuteParamsRequest = z.input<typeof FetchExecuteParamsRequestSchema>;
1554
+ type FetchExecuteParamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
1555
+ /**
1556
+ * Fetches the parameters needed to prepare a low-level transaction submission.
1557
+ *
1558
+ * @remarks
1559
+ * This is a low-level action that most SDK consumers will not need.
1560
+ *
1561
+ * @throws {@link FetchExecuteParamsError}
1562
+ * Thrown on failure.
1563
+ */
1564
+ declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest): Promise<RelayerExecuteParams>;
1565
+ declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
1566
+ transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.TransactionId, string>>;
1567
+ }, z.core.$strip>;
1568
+ type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
1569
+ declare const IsGaslessReadyRequestSchema: z.ZodObject<{
1570
+ wallet: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
1571
+ }, z.core.$strip>;
1572
+ type IsGaslessReadyRequest = z.input<typeof IsGaslessReadyRequestSchema>;
1573
+ type IsGaslessReadyError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
1574
+ /**
1575
+ * Checks whether a wallet is ready for gasless transactions.
1576
+ *
1577
+ * @throws {@link IsGaslessReadyError}
1578
+ * Thrown on failure.
1579
+ *
1580
+ * @example
1581
+ * ```ts
1582
+ * const ready = await isGaslessReady(client, {
1583
+ * wallet: '0x1234...',
1584
+ * });
1585
+ * ```
1586
+ */
1587
+ declare function isGaslessReady(client: BaseClient, request: IsGaslessReadyRequest): Promise<boolean>;
1588
+ type GaslessWalletWorkflowRequest = RequestAddressRequest | SignGaslessTypedDataRequest;
1589
+ type GaslessWalletWorkflow = AsyncGenerator<GaslessWalletWorkflowRequest, DeployTransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
1590
+ type PrepareGaslessWalletError = ExecuteGaslessError | IsGaslessReadyError | UserInputError;
1591
+ /**
1592
+ * Starts preparing the wallet for gasless transactions.
1593
+ *
1594
+ * @throws {@link PrepareGaslessWalletError}
1595
+ * Thrown on failure.
1596
+ *
1597
+ * @example
1598
+ * ```ts
1599
+ * const handle = await prepareGaslessWallet(client).then(completeWith(wallet));
1600
+ *
1601
+ * const outcome = await handle.wait();
1602
+ *
1603
+ * // outcome.transactionHash: TxHash
1604
+ * ```
1605
+ */
1606
+ declare function prepareGaslessWallet(client: BaseClient): Promise<GaslessWalletWorkflow>;
1607
+ /**
1608
+ * Fetches a submitted transaction.
1609
+ *
1610
+ * @remarks
1611
+ * This is a low-level action that most SDK consumers will not need.
1612
+ *
1613
+ * @throws {@link FetchGaslessTransactionError}
1614
+ * Thrown on failure.
1615
+ */
1616
+ declare function fetchTransaction(client: BaseClient, request: FetchGaslessTransactionRequest): Promise<GaslessTransaction>;
1617
+ declare const GaslessTransactionMetadataSchema: z.ZodString;
1618
+ declare const PrepareGaslessTransactionRequestSchema: z.ZodObject<{
1619
+ calls: z.ZodPipe<z.ZodArray<z.ZodObject<{
1620
+ data: z.ZodCustom<`0x${string}`, `0x${string}`>;
1621
+ to: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
1622
+ value: z.ZodOptional<z.ZodBigInt>;
1623
+ }, z.core.$strip>>, z.ZodTransform<NonEmptyArray<{
1624
+ data: `0x${string}`;
1625
+ to: EvmAddress;
1626
+ value?: bigint | undefined;
1627
+ }>, {
1628
+ data: `0x${string}`;
1629
+ to: EvmAddress;
1630
+ value?: bigint | undefined;
1631
+ }[]>>;
1632
+ metadata: z.ZodString;
1633
+ }, z.core.$strip>;
1634
+ type PrepareGaslessTransactionRequest = z.input<typeof PrepareGaslessTransactionRequestSchema>;
1635
+ type GaslessWorkflowRequest = RequestAddressRequest | SignGaslessMessageRequest;
1636
+ type GaslessWorkflow = AsyncGenerator<GaslessWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
1637
+ type PrepareGaslessTransactionError = ExecuteGaslessError | FetchExecuteParamsError | UserInputError;
1638
+ /**
1639
+ * Starts preparing a low-level transaction workflow from one or more calls.
1640
+ *
1641
+ * @remarks
1642
+ * This is a low-level action that most SDK consumers will not need.
1643
+ *
1644
+ * @throws {@link PrepareGaslessTransactionError}
1645
+ * Thrown on failure.
1646
+ */
1647
+ declare function prepareGaslessTransaction(client: BaseSecureClient, request: PrepareGaslessTransactionRequest): Promise<GaslessWorkflow>;
1648
+ type ExecuteGaslessError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
1649
+ type WaitForGaslessTransactionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | TimeoutError | TransactionFailedError;
1650
+
1651
+ type Erc20ApprovalWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest;
1652
+ type Erc20ApprovalWorkflow = AsyncGenerator<Erc20ApprovalWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
1653
+ declare const PrepareErc20ApprovalRequestSchema: z.ZodObject<{
1654
+ amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodLiteral<"max">]>;
1655
+ metadata: z.ZodOptional<z.ZodString>;
1656
+ spenderAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
1657
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
1658
+ }, z.core.$strip>;
1659
+ type PrepareErc20ApprovalRequest = z.input<typeof PrepareErc20ApprovalRequestSchema>;
1660
+ type PrepareErc20ApprovalError = UserInputError;
1661
+ /**
1662
+ * Starts an ERC-20 approval workflow.
1663
+ *
1664
+ * @example
1665
+ * ```ts
1666
+ * const handle = await prepareErc20Approval(client, {
1667
+ * amount: 'max',
1668
+ * spenderAddress: '0x1234…',
1669
+ * tokenAddress: '0x5678…',
1670
+ * }).then(completeWith(wallet));
1671
+ *
1672
+ * const outcome = await handle.wait();
1673
+ *
1674
+ * // outcome.transactionHash: TxHash
1675
+ * ```
1676
+ *
1677
+ * @throws {@link PrepareErc20ApprovalError}
1678
+ * Thrown on failure.
1679
+ */
1680
+ declare function prepareErc20Approval(client: BaseSecureClient, request: PrepareErc20ApprovalRequest): Promise<Erc20ApprovalWorkflow>;
1681
+ type Erc1155ApprovalForAllWorkflowRequest = GaslessWorkflowRequest | SendErc1155ApprovalForAllTransactionRequest;
1682
+ type Erc1155ApprovalForAllWorkflow = AsyncGenerator<Erc1155ApprovalForAllWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
1683
+ declare const PrepareErc1155ApprovalForAllRequestSchema: z.ZodObject<{
1684
+ approved: z.ZodDefault<z.ZodBoolean>;
1685
+ metadata: z.ZodOptional<z.ZodString>;
1686
+ operatorAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
1687
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
1688
+ }, z.core.$strip>;
1689
+ type PrepareErc1155ApprovalForAllRequest = z.input<typeof PrepareErc1155ApprovalForAllRequestSchema>;
1690
+ type PrepareErc1155ApprovalForAllError = UserInputError;
1691
+ /**
1692
+ * Starts an ERC-1155 approval-for-all workflow.
1693
+ *
1694
+ * @example
1695
+ * ```ts
1696
+ * const handle = await prepareErc1155ApprovalForAll(client, {
1697
+ * operatorAddress: '0x1234…',
1698
+ * tokenAddress: '0x5678…',
1699
+ * }).then(completeWith(wallet));
1700
+ *
1701
+ * const outcome = await handle.wait();
1702
+ *
1703
+ * // outcome.transactionHash: TxHash
1704
+ * ```
1705
+ *
1706
+ * @throws {@link PrepareErc1155ApprovalForAllError}
1707
+ * Thrown on failure.
1708
+ */
1709
+ declare function prepareErc1155ApprovalForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<Erc1155ApprovalForAllWorkflow>;
1710
+ type TradingApprovalsWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest | SendErc1155ApprovalForAllTransactionRequest;
1711
+ type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
1712
+ type PrepareTradingApprovalsError = UserInputError;
1713
+ /**
1714
+ * Starts a trading-setup approval workflow.
1715
+ *
1716
+ * Prepares all approvals required for trading, including collateral and
1717
+ * position token approvals for both standard and neg-risk market flows.
1718
+ * The neg-risk adapter approvals cover split, merge, and redemption workflows
1719
+ * on neg-risk markets.
1720
+ *
1721
+ * @example
1722
+ * ```ts
1723
+ * const handle = await prepareTradingApprovals(client).then(completeWith(wallet));
1724
+ *
1725
+ * const outcome = await handle.wait();
1726
+ *
1727
+ * // outcome.transactionHash: TxHash
1728
+ * ```
1729
+ *
1730
+ * @throws {@link PrepareTradingApprovalsError}
1731
+ * Thrown on failure.
1732
+ */
1733
+ declare function prepareTradingApprovals(client: BaseSecureClient): Promise<TradingApprovalsWorkflow>;
1734
+
1735
+ type PrepareMarketOrderRequest = {
1736
+ /** TokenID of the Conditional token asset being traded */
1737
+ tokenId: string;
1738
+ /**
1739
+ * BUY orders: dollar amount to spend
1740
+ * SELL orders: number of shares to sell
1741
+ */
1742
+ amount: number;
1743
+ /** Side of the order */
1744
+ side: OrderSide;
1745
+ /** Taker address. Omit for public orders (zero address is equivalent). */
1746
+ taker?: string;
1747
+ /**
1748
+ * Specifies the type of order execution.
1749
+ * - FOK (Fill or Kill): must be filled entirely or not at all
1750
+ * - FAK (Fill and Kill): partially fills, cancels any unfilled remainder
1751
+ *
1752
+ * @defaultValue OrderType.FAK
1753
+ */
1754
+ orderType?: OrderType.FAK | OrderType.FOK;
1755
+ };
1756
+ type PrepareLimitOrderRequest = {
1757
+ /** TokenID of the Conditional token asset being traded */
1758
+ tokenId: string;
1759
+ /** Price used to create the order */
1760
+ price: number;
1761
+ /** Size in terms of the conditional token */
1762
+ size: number;
1763
+ /** Side of the order */
1764
+ side: OrderSide;
1765
+ /** Taker address. Omit for public orders (zero address is equivalent). */
1766
+ taker?: string;
1767
+ /**
1768
+ * Posts the prepared order as post-only when submitted.
1769
+ *
1770
+ * @defaultValue false
1771
+ */
1772
+ postOnly?: boolean;
1773
+ /**
1774
+ * Unix timestamp in seconds after which the order expires.
1775
+ *
1776
+ * When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
1777
+ * expires at the given timestamp.
1778
+ *
1779
+ * When omitted, the SDK prepares a Good-Til-Cancelled (GTC) limit order.
1780
+ */
1781
+ expiration?: number;
1782
+ };
1783
+ type OrderDraft = {
1784
+ chainId: number;
1785
+ exchangeAddress: EvmAddress;
1786
+ expiration: number;
1787
+ feeRateBps: number;
1788
+ funderAddress: EvmAddress;
1789
+ offeredAmount: bigint;
1790
+ orderType: OrderType;
1791
+ side: OrderSide;
1792
+ signer: EvmAddress;
1793
+ allowedTaker?: EvmAddress;
1794
+ requestedAmount: bigint;
1795
+ tokenId: TokenId;
1796
+ };
1797
+ type SignedOrder = {
1798
+ expiration: number;
1799
+ feeRateBps: number;
1800
+ maker: EvmAddress;
1801
+ makerAmount: string;
1802
+ nonce: number;
1803
+ orderType: OrderType;
1804
+ salt: string;
1805
+ side: OrderSide;
1806
+ signatureType: SignatureType;
1807
+ signer: EvmAddress;
1808
+ taker: EvmAddress;
1809
+ takerAmount: string;
1810
+ tokenId: TokenId;
1811
+ signature: EvmSignature;
1812
+ postOnly?: boolean;
1813
+ };
1814
+ type OrderWorkflowRequest = Erc20ApprovalWorkflowRequest | Erc1155ApprovalForAllWorkflowRequest | SignOrderRequest;
1815
+ type OrderWorkflow = AsyncGenerator<OrderWorkflowRequest, SignedOrder, EvmAddress | EvmSignature | TransactionHandle>;
1816
+ type OrderPostingWorkflow = AsyncGenerator<OrderWorkflowRequest, OrderResponse, EvmAddress | EvmSignature | TransactionHandle>;
1817
+
1818
+ declare const PostOrdersRequestSchema: z.ZodArray<z.ZodCustom<SignedOrder, SignedOrder>>;
1819
+ type PostOrdersRequest = z.input<typeof PostOrdersRequestSchema>;
1820
+ type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
1821
+ type PostOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
1822
+ /**
1823
+ * Posts a signed order for the authenticated account.
1824
+ *
1825
+ * @example
1826
+ * ```ts
1827
+ * const response = await prepareMarketOrder(client, {
1828
+ * amount: 10,
1829
+ * side: OrderSide.BUY,
1830
+ * tokenId: '123',
1831
+ * })
1832
+ * .then(completeWith(wallet))
1833
+ * .then(postOrder(client));
1834
+ * ```
1835
+ *
1836
+ * @throws {@link PostOrderError}
1837
+ * Thrown on failure.
1838
+ */
1839
+ declare function postOrder(client: BaseSecureClient): (order: SignedOrder) => Promise<OrderResponse>;
1840
+ /**
1841
+ * Posts multiple signed orders for the authenticated account.
1842
+ *
1843
+ * @remarks
1844
+ * Accepts between 1 and 15 orders, matching the current service limit.
1845
+ *
1846
+ * @example
1847
+ * ```ts
1848
+ * const responses = await postOrders(client)([firstSignedOrder, secondSignedOrder]);
1849
+ * ```
1850
+ *
1851
+ * @throws {@link PostOrdersError}
1852
+ * Thrown on failure.
1853
+ */
1854
+ declare function postOrders(client: BaseSecureClient): (orders: PostOrdersRequest) => Promise<OrderResponses>;
1855
+
1856
+ type TradingActions = {
1857
+ /**
1858
+ * Starts the market-order workflow.
1859
+ *
1860
+ * @throws {@link PrepareMarketOrderError}
1861
+ * Thrown on failure.
1862
+ *
1863
+ * @example
1864
+ * ```ts
1865
+ * const order = await client.prepareMarketOrder({
1866
+ * amount: 10,
1867
+ * side: OrderSide.BUY,
1868
+ * tokenId: '123',
1869
+ * }).then(completeWith(wallet));
1870
+ *
1871
+ * const response = await client.postOrder(order);
1872
+ *
1873
+ * // response: OrderResponse
1874
+ * ```
1875
+ */
1876
+ prepareMarketOrder(request: PrepareMarketOrderRequest): Promise<OrderWorkflow>;
1877
+ /**
1878
+ * Starts and posts a market-order workflow.
1879
+ *
1880
+ * @throws {@link PrepareMarketOrderPostingError}
1881
+ * Thrown on failure.
1882
+ *
1883
+ * @example
1884
+ * ```ts
1885
+ * const response = await client.prepareMarketOrderPosting({
1886
+ * amount: 10,
1887
+ * side: OrderSide.BUY,
1888
+ * tokenId: '123',
1889
+ * }).then(completeWith(wallet));
1890
+ *
1891
+ * // response: OrderResponse
1892
+ * ```
1893
+ */
1894
+ prepareMarketOrderPosting(request: PrepareMarketOrderRequest): Promise<OrderPostingWorkflow>;
1895
+ /**
1896
+ * Starts the limit-order workflow.
1897
+ *
1898
+ * @throws {@link PrepareLimitOrderError}
1899
+ * Thrown on failure.
1900
+ *
1901
+ * @example
1902
+ * ```ts
1903
+ * const order = await client.prepareLimitOrder({
1904
+ * postOnly: true,
1905
+ * price: 0.52,
1906
+ * side: OrderSide.BUY,
1907
+ * size: 10,
1908
+ * tokenId: '123',
1909
+ * }).then(completeWith(wallet));
1910
+ *
1911
+ * const response = await client.postOrder(order);
1912
+ *
1913
+ * // response: OrderResponse
1914
+ * ```
1915
+ */
1916
+ prepareLimitOrder(request: PrepareLimitOrderRequest): Promise<OrderWorkflow>;
1917
+ /**
1918
+ * Starts and posts a limit-order workflow.
1919
+ *
1920
+ * @throws {@link PrepareLimitOrderPostingError}
1921
+ * Thrown on failure.
1922
+ *
1923
+ * @example
1924
+ * ```ts
1925
+ * const response = await client.prepareLimitOrderPosting({
1926
+ * postOnly: true,
1927
+ * price: 0.52,
1928
+ * side: OrderSide.BUY,
1929
+ * size: 10,
1930
+ * tokenId: '123',
1931
+ * }).then(completeWith(wallet));
1932
+ *
1933
+ * // response: OrderResponse
1934
+ * ```
1935
+ */
1936
+ prepareLimitOrderPosting(request: PrepareLimitOrderRequest): Promise<OrderPostingWorkflow>;
1937
+ /**
1938
+ * Posts a signed order for the authenticated account.
1939
+ *
1940
+ * @throws {@link PostOrderError}
1941
+ * Thrown on failure.
1942
+ *
1943
+ * @example
1944
+ * ```ts
1945
+ * const response = await client.postOrder(signedOrder);
1946
+ * ```
1947
+ */
1948
+ postOrder(order: SignedOrder): Promise<OrderResponse>;
1949
+ /**
1950
+ * Posts multiple signed orders for the authenticated account.
1951
+ *
1952
+ * @remarks
1953
+ * Accepts between 1 and 15 orders, matching the current service limit.
1954
+ *
1955
+ * @throws {@link PostOrdersError}
1956
+ * Thrown on failure.
1957
+ *
1958
+ * @example
1959
+ * ```ts
1960
+ * const responses = await client.postOrders([firstSignedOrder, secondSignedOrder]);
1961
+ * ```
1962
+ */
1963
+ postOrders(orders: PostOrdersRequest): Promise<OrderResponses>;
1964
+ /**
1965
+ * Cancels a single open order for the authenticated account.
1966
+ *
1967
+ * @throws {@link CancelOrderError}
1968
+ * Thrown on failure.
1969
+ *
1970
+ * @example
1971
+ * ```ts
1972
+ * const response = await client.cancelOrder({ orderId: '123' });
1973
+ *
1974
+ * // response.canceled: string[]
1975
+ * ```
1976
+ */
1977
+ cancelOrder(request: CancelOrderRequest): Promise<CancelOrdersResponse>;
1978
+ /**
1979
+ * Cancels multiple open orders for the authenticated account.
1980
+ *
1981
+ * @throws {@link CancelOrdersError}
1982
+ * Thrown on failure.
1983
+ *
1984
+ * @example
1985
+ * ```ts
1986
+ * const response = await client.cancelOrders({ orderIds: ['1', '2'] });
1987
+ *
1988
+ * // response.canceled: string[]
1989
+ * ```
1990
+ */
1991
+ cancelOrders(request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
1992
+ /**
1993
+ * Cancels all open orders for the authenticated account.
1994
+ *
1995
+ * @throws {@link CancelAllError}
1996
+ * Thrown on failure.
1997
+ *
1998
+ * @example
1999
+ * ```ts
2000
+ * const response = await client.cancelAll();
2001
+ *
2002
+ * // response.canceled: string[]
2003
+ * ```
2004
+ */
2005
+ cancelAll(): Promise<CancelOrdersResponse>;
2006
+ /**
2007
+ * Cancels all open orders for the authenticated account that match the market or asset filter.
2008
+ *
2009
+ * @throws {@link CancelMarketOrdersError}
2010
+ * Thrown on failure.
2011
+ *
2012
+ * @example
2013
+ * ```ts
2014
+ * const response = await client.cancelMarketOrders({
2015
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2016
+ * });
2017
+ *
2018
+ * // response.canceled: string[]
2019
+ * ```
2020
+ */
2021
+ cancelMarketOrders(request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
2022
+ /**
2023
+ * Lists open orders for the authenticated account across all pages.
2024
+ *
2025
+ * @throws {@link ListOpenOrdersError}
2026
+ * Thrown on failure.
2027
+ *
2028
+ * @example
2029
+ * Fetch the first page of results:
2030
+ * ```ts
2031
+ * const paginator = client.listOpenOrders({
2032
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2033
+ * });
2034
+ *
2035
+ * const firstPage = await paginator.firstPage();
2036
+ *
2037
+ * // Optionally, fetch additional pages:
2038
+ * for await (const page of paginator.from(firstPage.nextCursor)) {
2039
+ * // page.items: OpenOrder[]
2040
+ * }
2041
+ * ```
2042
+ *
2043
+ * @example
2044
+ * Loop through all pages with `for await`:
2045
+ * ```ts
2046
+ * const paginator = client.listOpenOrders({
2047
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2048
+ * });
2049
+ *
2050
+ * for await (const page of paginator) {
2051
+ * // page.items: OpenOrder[]
2052
+ * }
2053
+ * ```
2054
+ */
2055
+ listOpenOrders(request?: ListOpenOrdersRequest): Paginated<OpenOrder>;
2056
+ /**
2057
+ * Fetches a single order for the authenticated account.
2058
+ *
2059
+ * @throws {@link FetchOrderError}
2060
+ * Thrown on failure.
2061
+ *
2062
+ * @example
2063
+ * ```ts
2064
+ * const order = await client.fetchOrder({ orderId: '123' });
2065
+ * ```
2066
+ */
2067
+ fetchOrder(request: FetchOrderRequest): Promise<OpenOrder>;
2068
+ };
2069
+ declare function tradingActions(client: BaseSecureClient): TradingActions;
2070
+
2071
+ type PublicWalletActions = {
2072
+ /**
2073
+ * Checks whether a wallet is ready for gasless transactions.
2074
+ *
2075
+ * @throws {@link IsGaslessReadyError}
2076
+ * Thrown on failure.
2077
+ *
2078
+ * @example
2079
+ * ```ts
2080
+ * const ready = await client.isGaslessReady({
2081
+ * wallet: '0x1234...',
2082
+ * });
2083
+ * ```
2084
+ */
2085
+ isGaslessReady(request: IsGaslessReadyRequest): Promise<boolean>;
2086
+ /**
2087
+ * Starts preparing the wallet for gasless transactions.
2088
+ *
2089
+ * @throws {@link PrepareGaslessWalletError}
2090
+ * Thrown on failure.
2091
+ *
2092
+ * @example
2093
+ * ```ts
2094
+ * const handle = await client.prepareGaslessWallet().then(completeWith(wallet));
2095
+ *
2096
+ * const outcome = await handle.wait();
2097
+ *
2098
+ * // outcome.transactionHash: TxHash
2099
+ * ```
2100
+ */
2101
+ prepareGaslessWallet(): Promise<GaslessWalletWorkflow>;
2102
+ };
2103
+ type SecureWalletActions = Prettify<PublicWalletActions & {
2104
+ /**
2105
+ * Starts a trading-setup approval workflow.
2106
+ *
2107
+ * @throws {@link PrepareTradingApprovalsError}
2108
+ * Thrown on failure.
2109
+ *
2110
+ * @example
2111
+ * ```ts
2112
+ * const handle = await client.prepareTradingApprovals().then(completeWith(wallet));
2113
+ *
2114
+ * const outcome = await handle.wait();
2115
+ *
2116
+ * // outcome.transactionHash: TxHash
2117
+ * ```
2118
+ */
2119
+ prepareTradingApprovals(): Promise<TradingApprovalsWorkflow>;
2120
+ /**
2121
+ * Starts an ERC-20 approval workflow.
2122
+ *
2123
+ * @throws {@link PrepareErc20ApprovalError}
2124
+ * Thrown on failure.
2125
+ *
2126
+ * @example
2127
+ * ```ts
2128
+ * const handle = await client.prepareErc20Approval({
2129
+ * amount: 'max',
2130
+ * spenderAddress: '0x1234…',
2131
+ * tokenAddress: '0x5678…',
2132
+ * }).then(completeWith(wallet));
2133
+ *
2134
+ * const outcome = await handle.wait();
2135
+ *
2136
+ * // outcome.transactionHash: TxHash
2137
+ * ```
2138
+ */
2139
+ prepareErc20Approval(request: PrepareErc20ApprovalRequest): Promise<Erc20ApprovalWorkflow>;
2140
+ /**
2141
+ * Starts an ERC-1155 approval-for-all workflow.
2142
+ *
2143
+ * @throws {@link PrepareErc1155ApprovalForAllError}
2144
+ * Thrown on failure.
2145
+ *
2146
+ * @example
2147
+ * ```ts
2148
+ * const handle = await client.prepareErc1155ApprovalForAll({
2149
+ * operatorAddress: '0x1234…',
2150
+ * tokenAddress: '0x5678…',
2151
+ * }).then(completeWith(wallet));
2152
+ *
2153
+ * const outcome = await handle.wait();
2154
+ *
2155
+ * // outcome.transactionHash: TxHash
2156
+ * ```
2157
+ */
2158
+ prepareErc1155ApprovalForAll(request: PrepareErc1155ApprovalForAllRequest): Promise<Erc1155ApprovalForAllWorkflow>;
2159
+ /**
2160
+ * Starts an ERC-20 transfer workflow.
2161
+ *
2162
+ * @throws {@link PrepareErc20TransferError}
2163
+ * Thrown on failure.
2164
+ *
2165
+ * @example
2166
+ * ```ts
2167
+ * const handle = await client.prepareErc20Transfer({
2168
+ * amount: 1n,
2169
+ * recipientAddress: client.account.signer,
2170
+ * tokenAddress: client.environment.collateralToken,
2171
+ * }).then(completeWith(wallet));
2172
+ *
2173
+ * const outcome = await handle.wait();
2174
+ *
2175
+ * // outcome.transactionHash: TxHash
2176
+ * ```
2177
+ */
2178
+ prepareErc20Transfer(request: PrepareErc20TransferRequest): Promise<Erc20TransferWorkflow>;
2179
+ /**
2180
+ * Starts a split workflow for a market condition.
2181
+ *
2182
+ * @throws {@link PrepareSplitPositionError}
2183
+ * Thrown on failure.
2184
+ *
2185
+ * @example
2186
+ * ```ts
2187
+ * const handle = await client.prepareSplitPosition({
2188
+ * amount: 1n,
2189
+ * conditionId:
2190
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
2191
+ * }).then(completeWith(wallet));
2192
+ *
2193
+ * const outcome = await handle.wait();
2194
+ *
2195
+ * // outcome.transactionHash: TxHash
2196
+ * ```
2197
+ */
2198
+ prepareSplitPosition(request: PrepareSplitPositionRequest): Promise<SplitPositionWorkflow>;
2199
+ /**
2200
+ * Starts a workflow to merge complementary positions in a market back into collateral.
2201
+ *
2202
+ * @throws {@link PrepareMergePositionsError}
2203
+ * Thrown on failure.
2204
+ *
2205
+ * @example
2206
+ * ```ts
2207
+ * const handle = await client.prepareMergePositions({
2208
+ * amount: 'max',
2209
+ * conditionId:
2210
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
2211
+ * }).then(completeWith(wallet));
2212
+ *
2213
+ * const outcome = await handle.wait();
2214
+ *
2215
+ * // outcome.transactionHash: TxHash
2216
+ * ```
2217
+ */
2218
+ prepareMergePositions(request: PrepareMergePositionsRequest): Promise<MergePositionsWorkflow>;
2219
+ /**
2220
+ * Starts a redemption workflow for resolved positions.
2221
+ *
2222
+ * @throws {@link PrepareRedeemPositionsError}
2223
+ * Thrown on failure.
2224
+ *
2225
+ * @example
2226
+ * ```ts
2227
+ * const handle = await client.prepareRedeemPositions({
2228
+ * conditionId:
2229
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
2230
+ * }).then(completeWith(wallet));
2231
+ *
2232
+ * const outcome = await handle.wait();
2233
+ *
2234
+ * // outcome.transactionHash: TxHash
2235
+ * ```
2236
+ */
2237
+ prepareRedeemPositions(request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
2238
+ }>;
2239
+ declare function walletActions(client: BasePublicClient): PublicWalletActions;
2240
+ declare function walletActions(client: BaseSecureClient): SecureWalletActions;
2241
+
2242
+ type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & AccountPublicActions & RewardsPublicActions & PublicWalletActions>;
2243
+ type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & AccountActions & RewardsActions & SecureWalletActions & TradingActions>;
2244
+ declare function allActions(client: BasePublicClient): PublicActions;
2245
+ declare function allActions(client: BaseSecureClient): SecureActions;
2246
+
2247
+ type WalletDerivationConfig = {
2248
+ proxyFactory: EvmAddress;
2249
+ proxyImplementation: EvmAddress;
2250
+ safeFactory: EvmAddress;
2251
+ safeInitCodeHash: Hex.Hex;
2252
+ };
2253
+ type EnvironmentConfig = {
2254
+ name: string;
2255
+ chainId: number;
2256
+ };
2257
+ /**
2258
+ * The production environment configuration.
2259
+ */
2260
+ declare const production: EnvironmentConfig;
2261
+
2262
+ type ServiceRequest = {
2263
+ method: 'DELETE' | 'GET' | 'POST';
2264
+ path: string;
2265
+ body?: string;
2266
+ headers?: HeadersInit;
2267
+ json?: unknown;
2268
+ params?: URLSearchParams;
2269
+ };
2270
+
2271
+ type PublicContext = {};
2272
+ type ClientActions = {};
2273
+ type ClientDecorator<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = {
2274
+ (client: BasePublicClient<ClientActions, ClientActions>): TPublicActions;
2275
+ (client: BaseSecureClient<ClientActions, ClientActions>): TSecureActions;
2276
+ };
2277
+ type DecoratorPublicActions<TDecorator extends ClientDecorator> = TDecorator extends ClientDecorator<infer TPublicActions, infer _TSecureActions> ? TPublicActions : never;
2278
+ type DecoratorSecureActions<TDecorator extends ClientDecorator> = TDecorator extends ClientDecorator<infer _TPublicActions, infer TSecureActions> ? TSecureActions : never;
2279
+ declare abstract class AbstractClient<TContext extends PublicContext> {
2280
+ #private;
2281
+ protected get context(): TContext;
2282
+ protected get decorators(): readonly ClientDecorator[];
2283
+ constructor(context: TContext);
2284
+ protected resolveClobHeaders(request: ServiceRequest): Promise<HeadersInit>;
2285
+ protected resolveRelayerHeaders(request: ServiceRequest): Promise<HeadersInit>;
2286
+ protected rememberDecorator(decorator: ClientDecorator): void;
2287
+ }
2288
+ /**
2289
+ * Persistable authenticated session state that can later be passed to
2290
+ * {@link PublicClient.beginAuthentication}.
2291
+ */
2292
+ type SessionSnapshot = {
2293
+ /**
2294
+ * Wallet address to authenticate as.
2295
+ *
2296
+ * Pass the signer address itself to authenticate as an EOA account.
2297
+ */
2298
+ wallet: string;
2299
+ /**
2300
+ * Existing API credentials to reuse when they remain valid.
2301
+ */
2302
+ credentials: ApiKeyCreds;
2303
+ nonce?: never;
2304
+ };
2305
+ type FreshAuthenticationRequest = {
2306
+ /**
2307
+ * Wallet address to authenticate as.
2308
+ *
2309
+ * Pass the signer address itself to authenticate as an EOA account.
2310
+ */
2311
+ wallet: string;
2312
+ /**
2313
+ * Nonce used when creating or deriving fresh credentials.
2314
+ *
2315
+ * @defaultValue 0
2316
+ */
2317
+ nonce?: number;
2318
+ credentials?: never;
2319
+ };
2320
+ type BeginAuthenticationRequest = SessionSnapshot | FreshAuthenticationRequest;
2321
+ type PublicClientConfig = {
2322
+ environment: EnvironmentConfig;
2323
+ apiKey?: ApiKeyAuthorization;
2324
+ };
2325
+ declare class BasePublicClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> extends AbstractClient<PublicContext> {
2326
+ #private;
2327
+ constructor(config: PublicClientConfig);
2328
+ /**
2329
+ * Use this to narrow a {@link Client} union to {@link SecureClient}.
2330
+ *
2331
+ * @example
2332
+ * ```ts
2333
+ * if (client.isSecureClient()) {
2334
+ * client.credentials; // SecureClient
2335
+ * }
2336
+ * ```
2337
+ */
2338
+ isSecureClient(): this is BaseSecureClient<TPublicActions, TSecureActions>;
2339
+ /**
2340
+ * Use this to narrow a {@link Client} union to {@link PublicClient}.
2341
+ *
2342
+ * @example
2343
+ * ```ts
2344
+ * if (client.isPublicClient()) {
2345
+ * client.beginAuthentication(...); // PublicClient
2346
+ * }
2347
+ * ```
2348
+ */
2349
+ isPublicClient(): this is BasePublicClient<TPublicActions, TSecureActions>;
2350
+ /**
2351
+ * Returns a client typed with the methods contributed by the decorator.
2352
+ */
2353
+ extend<TDecorator extends ClientDecorator>(decorator: TDecorator): PublicClient<Prettify<TPublicActions & DecoratorPublicActions<TDecorator>>, Prettify<TSecureActions & DecoratorSecureActions<TDecorator>>>;
2354
+ /**
2355
+ * Begins an authentication workflow that produces a {@link SecureClient}.
2356
+ *
2357
+ * @remarks
2358
+ * Pass a {@link SessionSnapshot} to reuse stored credentials when they remain
2359
+ * valid. If the stored credential is no longer valid, the workflow falls back
2360
+ * to fresh authentication.
2361
+ */
2362
+ beginAuthentication(request: BeginAuthenticationRequest): Promise<AuthenticationWorkflow<SecureClient<TPublicActions, TSecureActions>>>;
2363
+ }
2364
+ declare class BaseSecureClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> extends AbstractClient<SecureContext> {
2365
+ #private;
2366
+ /**
2367
+ * @remarks This is the choking point for all requests, so we can ensure that once
2368
+ * `endAuthentication` is called, no further authenticated requests can be made with this client instance.
2369
+ */
2370
+ protected get context(): SecureContext;
2371
+ protected endAuthenticationLifecycle(): void;
2372
+ constructor(config: SecureClientConfig);
2373
+ /**
2374
+ * Use this to narrow a {@link Client} union to {@link SecureClient}.
2375
+ *
2376
+ * @example
2377
+ * ```ts
2378
+ * if (client.isSecureClient()) {
2379
+ * client.credentials; // SecureClient
2380
+ * }
2381
+ * ```
2382
+ */
2383
+ isSecureClient(): this is BaseSecureClient<TPublicActions, TSecureActions>;
2384
+ /**
2385
+ * Use this to narrow a {@link Client} union to {@link PublicClient}.
2386
+ *
2387
+ * @example
2388
+ * ```ts
2389
+ * if (client.isPublicClient()) {
2390
+ * client.beginAuthentication(...); // PublicClient
2391
+ * }
2392
+ * ```
2393
+ */
2394
+ isPublicClient(): this is BasePublicClient<TPublicActions, TSecureActions>;
2395
+ /**
2396
+ * Returns a secure client typed with the methods contributed by the decorator.
2397
+ */
2398
+ extend<TDecorator extends ClientDecorator>(decorator: TDecorator): SecureClient<TPublicActions, Prettify<TSecureActions & DecoratorSecureActions<TDecorator>>>;
2399
+ /**
2400
+ * Returns a persistable snapshot of the current authenticated session.
2401
+ *
2402
+ * @remarks
2403
+ * Pass the returned snapshot to {@link PublicClient.beginAuthentication} to
2404
+ * reuse the current session in a later authentication attempt. Capture the
2405
+ * snapshot before calling {@link endAuthentication}; ending authentication
2406
+ * revokes the current credential, so reusing an older snapshot will fall back
2407
+ * to fresh authentication.
2408
+ *
2409
+ * @example
2410
+ * ```ts
2411
+ * const snapshot = secureClient.getSessionSnapshot();
2412
+ * ```
2413
+ */
2414
+ getSessionSnapshot(): SessionSnapshot;
2415
+ /**
2416
+ * Ends authentication for this client and returns a public client.
2417
+ *
2418
+ * @remarks
2419
+ * This revokes the current authenticated credential and invalidates the
2420
+ * current `SecureClient` instance.
2421
+ *
2422
+ * @example
2423
+ * ```ts
2424
+ * const publicClient = await secureClient.endAuthentication();
2425
+ * ```
2426
+ */
2427
+ endAuthentication(): Promise<PublicClient<TPublicActions, TSecureActions>>;
2428
+ }
2429
+ type SecureContext = PublicContext & {};
2430
+ type SecureClientConfig = PublicClientConfig & {
2431
+ account: AccountIdentity;
2432
+ credentials: ApiKeyCreds;
2433
+ };
2434
+ type PublicClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = BasePublicClient<TPublicActions, TSecureActions> & TPublicActions;
2435
+ type SecureClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = BaseSecureClient<TPublicActions, TSecureActions> & TSecureActions;
2436
+
2437
+ type BaseClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = BasePublicClient<TPublicActions, TSecureActions> | BaseSecureClient<TPublicActions, TSecureActions>;
2438
+ type Client<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = PublicClient<TPublicActions, TSecureActions> | SecureClient<TPublicActions, TSecureActions>;
2439
+ type PublicClientOptions = {
2440
+ /**
2441
+ * The environment configuration used by the client.
2442
+ *
2443
+ * @defaultValue `production`
2444
+ */
2445
+ environment?: EnvironmentConfig;
2446
+ /**
2447
+ * Optional request authorization applied by the client when needed.
2448
+ */
2449
+ apiKey?: ApiKeyAuthorization;
2450
+ };
2451
+ /**
2452
+ * Creates a new `PublicClient` instance.
2453
+ *
2454
+ * @example
2455
+ * ```ts
2456
+ * const client = createPublicClient();
2457
+ * ```
2458
+ */
2459
+ declare function createPublicClient(options?: PublicClientOptions): PublicClient<PublicActions, SecureActions>;
2460
+
2461
+ type FetchClosedOnlyModeError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
2462
+ /**
2463
+ * Fetches whether the account is restricted to closed-only trading.
2464
+ *
2465
+ * @throws {@link FetchClosedOnlyModeError}
2466
+ *
2467
+ * @example
2468
+ * ```ts
2469
+ * const closedOnly = await fetchClosedOnlyMode(client);
2470
+ * ```
2471
+ */
2472
+ declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
2473
+ declare const ListOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
2474
+ assetId: z.ZodOptional<z.ZodString>;
2475
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2476
+ id: z.ZodOptional<z.ZodString>;
2477
+ market: z.ZodOptional<z.ZodString>;
2478
+ }, z.core.$strip>>;
2479
+ type ListOpenOrdersRequest = z.input<typeof ListOpenOrdersRequestSchema>;
2480
+ type ListOpenOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2481
+ /**
2482
+ * Lists open orders for the authenticated account across all pages.
2483
+ *
2484
+ * @throws {@link ListOpenOrdersError}
2485
+ *
2486
+ * @example
2487
+ * Fetch the first page of results:
2488
+ * ```ts
2489
+ * const result = listOpenOrders(client, {
2490
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2491
+ * });
2492
+ *
2493
+ * const firstPage = await result.firstPage();
2494
+ *
2495
+ * // Optionally, fetch additional pages:
2496
+ * for await (const page of result.from(firstPage.nextCursor)) {
2497
+ * // page.items: OpenOrder[]
2498
+ * }
2499
+ * ```
2500
+ *
2501
+ * @example
2502
+ * Loop through all pages with `for await`:
2503
+ * ```ts
2504
+ * const result = listOpenOrders(client, {
2505
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2506
+ * });
2507
+ *
2508
+ * for await (const page of result) {
2509
+ * // page.items: OpenOrder[]
2510
+ * }
2511
+ * ```
2512
+ */
2513
+ declare function listOpenOrders(client: BaseSecureClient, request?: ListOpenOrdersRequest): Paginated<OpenOrder>;
2514
+ declare const FetchOrderRequestSchema: z.ZodObject<{
2515
+ orderId: z.ZodString;
2516
+ }, z.core.$strip>;
2517
+ type FetchOrderRequest = z.input<typeof FetchOrderRequestSchema>;
2518
+ type FetchOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2519
+ /**
2520
+ * Fetches a single order for the authenticated account.
2521
+ *
2522
+ * @throws {@link FetchOrderError}
2523
+ *
2524
+ * @example
2525
+ * ```ts
2526
+ * const order = await fetchOrder(client, {
2527
+ * orderId: '123',
2528
+ * });
2529
+ * ```
2530
+ */
2531
+ declare function fetchOrder(client: BaseSecureClient, request: FetchOrderRequest): Promise<OpenOrder>;
2532
+ declare const ListAccountTradesRequestSchema: z.ZodDefault<z.ZodObject<{
2533
+ after: z.ZodOptional<z.ZodString>;
2534
+ assetId: z.ZodOptional<z.ZodString>;
2535
+ before: z.ZodOptional<z.ZodString>;
2536
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2537
+ id: z.ZodOptional<z.ZodString>;
2538
+ makerAddress: z.ZodOptional<z.ZodString>;
2539
+ market: z.ZodOptional<z.ZodString>;
2540
+ }, z.core.$strip>>;
2541
+ type ListAccountTradesRequest = z.input<typeof ListAccountTradesRequestSchema>;
2542
+ type ListAccountTradesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2543
+ /**
2544
+ * Lists trades for the authenticated account across all pages.
2545
+ *
2546
+ * @throws {@link ListAccountTradesError}
2547
+ *
2548
+ * @example
2549
+ * Fetch the first page of results:
2550
+ * ```ts
2551
+ * const result = listAccountTrades(client, {
2552
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2553
+ * });
2554
+ *
2555
+ * const firstPage = await result.firstPage();
2556
+ *
2557
+ * // Optionally, fetch additional pages:
2558
+ * for await (const page of result.from(firstPage.nextCursor)) {
2559
+ * // page.items: ClobTrade[]
2560
+ * }
2561
+ * ```
2562
+ *
2563
+ * @example
2564
+ * Loop through all pages with `for await`:
2565
+ * ```ts
2566
+ * const result = listAccountTrades(client, {
2567
+ * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2568
+ * });
2569
+ *
2570
+ * for await (const page of result) {
2571
+ * // page.items: ClobTrade[]
2572
+ * }
2573
+ * ```
2574
+ */
2575
+ declare function listAccountTrades(client: BaseSecureClient, request?: ListAccountTradesRequest): Paginated<ClobTrade>;
2576
+ type FetchNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
2577
+ declare const DropNotificationsRequestSchema: z.ZodObject<{
2578
+ ids: z.ZodArray<z.ZodString>;
2579
+ }, z.core.$strip>;
2580
+ type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
2581
+ /**
2582
+ * Fetches notifications for the authenticated account.
2583
+ *
2584
+ * @throws {@link FetchNotificationsError}
2585
+ *
2586
+ * @example
2587
+ * ```ts
2588
+ * const notifications = await fetchNotifications(client);
2589
+ * ```
2590
+ */
2591
+ declare function fetchNotifications(client: BaseSecureClient): Promise<NotificationsResponse>;
2592
+ type DropNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2593
+ /**
2594
+ * Drops notifications for the authenticated account.
2595
+ *
2596
+ * @throws {@link DropNotificationsError}
2597
+ * Thrown on failure.
2598
+ *
2599
+ * @example
2600
+ * ```ts
2601
+ * await dropNotifications(client, {
2602
+ * ids: ['1', '2'],
2603
+ * });
2604
+ * ```
2605
+ */
2606
+ declare function dropNotifications(client: BaseSecureClient, request: DropNotificationsRequest): Promise<void>;
2607
+ declare const FetchBalanceAllowanceRequestSchema: z.ZodObject<{
2608
+ assetType: z.ZodEnum<typeof _polymarket_bindings_clob.AssetType>;
2609
+ tokenId: z.ZodOptional<z.ZodString>;
2610
+ }, z.core.$strip>;
2611
+ type FetchBalanceAllowanceRequest = z.input<typeof FetchBalanceAllowanceRequestSchema>;
2612
+ type FetchBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2613
+ /**
2614
+ * Fetches balance and allowance for the authenticated account.
2615
+ *
2616
+ * @remarks
2617
+ * This is a low-level action that most SDK consumers will not need.
2618
+ *
2619
+ * @throws {@link FetchBalanceAllowanceError}
2620
+ * Thrown on failure.
2621
+ *
2622
+ * @example
2623
+ * ```ts
2624
+ * const balanceAllowance = await fetchBalanceAllowance(client, {
2625
+ * assetType: AssetType.COLLATERAL,
2626
+ * });
2627
+ * ```
2628
+ */
2629
+ declare function fetchBalanceAllowance(client: BaseSecureClient, request: FetchBalanceAllowanceRequest): Promise<BalanceAllowanceResponse>;
2630
+ declare const UpdateBalanceAllowanceRequestSchema: z.ZodObject<{
2631
+ assetType: z.ZodEnum<typeof _polymarket_bindings_clob.AssetType>;
2632
+ tokenId: z.ZodOptional<z.ZodString>;
2633
+ }, z.core.$strip>;
2634
+ type UpdateBalanceAllowanceRequest = z.input<typeof UpdateBalanceAllowanceRequestSchema>;
2635
+ type UpdateBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2636
+ /**
2637
+ * Refreshes balance and allowance for the authenticated account.
2638
+ *
2639
+ * @remarks
2640
+ * This is a low-level action that most SDK consumers will not need.
2641
+ *
2642
+ * @throws {@link UpdateBalanceAllowanceError}
2643
+ * Thrown on failure.
2644
+ *
2645
+ * @example
2646
+ * ```ts
2647
+ * const balanceAllowance = await updateBalanceAllowance(client, {
2648
+ * assetType: AssetType.COLLATERAL,
2649
+ * });
2650
+ * ```
2651
+ */
2652
+ declare function updateBalanceAllowance(client: BaseSecureClient, request: UpdateBalanceAllowanceRequest): Promise<BalanceAllowanceResponse>;
2653
+ declare const FetchOrderScoringRequestSchema: z.ZodObject<{
2654
+ orderId: z.ZodString;
2655
+ }, z.core.$strip>;
2656
+ type FetchOrderScoringRequest = z.input<typeof FetchOrderScoringRequestSchema>;
2657
+ type FetchOrderScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2658
+ /**
2659
+ * Fetches whether a single order is currently scoring.
2660
+ *
2661
+ * @throws {@link FetchOrderScoringError}
2662
+ *
2663
+ * @example
2664
+ * ```ts
2665
+ * const scoring = await fetchOrderScoring(client, {
2666
+ * orderId: '123',
2667
+ * });
2668
+ * ```
2669
+ */
2670
+ declare function fetchOrderScoring(client: BaseSecureClient, request: FetchOrderScoringRequest): Promise<boolean>;
2671
+ declare const FetchOrdersScoringRequestSchema: z.ZodObject<{
2672
+ orderIds: z.ZodArray<z.ZodString>;
2673
+ }, z.core.$strip>;
2674
+ type FetchOrdersScoringRequest = z.input<typeof FetchOrdersScoringRequestSchema>;
2675
+ type FetchOrdersScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2676
+ /**
2677
+ * Fetches scoring state for multiple orders.
2678
+ *
2679
+ * @throws {@link FetchOrdersScoringError}
2680
+ *
2681
+ * @example
2682
+ * ```ts
2683
+ * const scoring = await fetchOrdersScoring(client, {
2684
+ * orderIds: ['1', '2'],
2685
+ * });
2686
+ * ```
2687
+ */
2688
+ declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
2689
+ declare const ListUserEarningsForDayRequestSchema: z.ZodObject<{
2690
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2691
+ date: z.ZodString;
2692
+ }, z.core.$strip>;
2693
+ type ListUserEarningsForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
2694
+ type ListUserEarningsForDayError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2695
+ /**
2696
+ * Lists per-market earnings for the authenticated account on a given day.
2697
+ *
2698
+ * @throws {@link ListUserEarningsForDayError}
2699
+ *
2700
+ * @example
2701
+ * Fetch the first page of results:
2702
+ * ```ts
2703
+ * const result = listUserEarningsForDay(client, {
2704
+ * date: '2026-04-16',
2705
+ * });
2706
+ *
2707
+ * const firstPage = await result.firstPage();
2708
+ *
2709
+ * // Optionally, fetch additional pages:
2710
+ * for await (const page of result.from(firstPage.nextCursor)) {
2711
+ * // page.items: UserEarning[]
2712
+ * }
2713
+ * ```
2714
+ *
2715
+ * @example
2716
+ * Loop through all pages with `for await`:
2717
+ * ```ts
2718
+ * const result = listUserEarningsForDay(client, {
2719
+ * date: '2026-04-16',
2720
+ * });
2721
+ *
2722
+ * for await (const page of result) {
2723
+ * // page.items: UserEarning[]
2724
+ * }
2725
+ * ```
2726
+ */
2727
+ declare function listUserEarningsForDay(client: BaseSecureClient, request: ListUserEarningsForDayRequest): Paginated<UserEarning>;
2728
+ type FetchTotalEarningsForUserForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
2729
+ type FetchTotalEarningsForUserForDayError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2730
+ /**
2731
+ * Fetches total earnings for the authenticated account on a given day.
2732
+ *
2733
+ * @throws {@link FetchTotalEarningsForUserForDayError}
2734
+ *
2735
+ * @example
2736
+ * ```ts
2737
+ * const earnings = await fetchTotalEarningsForUserForDay(client, {
2738
+ * date: '2026-04-16',
2739
+ * });
2740
+ * ```
2741
+ */
2742
+ declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
2743
+ declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
2744
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2745
+ date: z.ZodString;
2746
+ noCompetition: z.ZodOptional<z.ZodBoolean>;
2747
+ orderBy: z.ZodOptional<z.ZodString>;
2748
+ pageSize: z.ZodDefault<z.ZodNumber>;
2749
+ position: z.ZodOptional<z.ZodString>;
2750
+ }, z.core.$strip>;
2751
+ type ListUserEarningsAndMarketsConfigRequest = z.input<typeof ListUserEarningsAndMarketsConfigRequestSchema>;
2752
+ type ListUserEarningsAndMarketsConfigError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
2753
+ /**
2754
+ * Lists market reward configuration and earnings for the authenticated account on a given day.
2755
+ *
2756
+ * @throws {@link ListUserEarningsAndMarketsConfigError}
2757
+ *
2758
+ * @example
2759
+ * Fetch the first page of results:
2760
+ * ```ts
2761
+ * const result = listUserEarningsAndMarketsConfig(client, {
2762
+ * date: '2026-04-16',
2763
+ * });
2764
+ *
2765
+ * const firstPage = await result.firstPage();
2766
+ *
2767
+ * // Optionally, fetch additional pages:
2768
+ * for await (const page of result.from(firstPage.nextCursor)) {
2769
+ * // page.items: UserRewardsEarning[]
2770
+ * }
2771
+ * ```
2772
+ *
2773
+ * @example
2774
+ * Loop through all pages with `for await`:
2775
+ * ```ts
2776
+ * const result = listUserEarningsAndMarketsConfig(client, {
2777
+ * date: '2026-04-16',
2778
+ * });
2779
+ *
2780
+ * for await (const page of result) {
2781
+ * // page.items: UserRewardsEarning[]
2782
+ * }
2783
+ * ```
2784
+ */
2785
+ declare function listUserEarningsAndMarketsConfig(client: BaseSecureClient, request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning>;
2786
+ type FetchRewardPercentagesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
2787
+ /**
2788
+ * Fetches reward percentages for the authenticated account.
2789
+ *
2790
+ * @throws {@link FetchRewardPercentagesError}
2791
+ *
2792
+ * @example
2793
+ * ```ts
2794
+ * const percentages = await fetchRewardPercentages(client);
2795
+ * ```
2796
+ */
2797
+ declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
2798
+
2799
+ declare const ListTradesRequestSchema: z.ZodObject<{
2800
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2801
+ pageSize: z.ZodDefault<z.ZodNumber>;
2802
+ takerOnly: z.ZodOptional<z.ZodBoolean>;
2803
+ filterType: z.ZodOptional<z.ZodEnum<{
2804
+ TOKENS: "TOKENS";
2805
+ CASH: "CASH";
2806
+ }>>;
2807
+ filterAmount: z.ZodOptional<z.ZodNumber>;
2808
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
2809
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
2810
+ user: z.ZodOptional<z.ZodString>;
2811
+ side: z.ZodOptional<z.ZodEnum<{
2812
+ BUY: "BUY";
2813
+ SELL: "SELL";
2814
+ }>>;
2815
+ }, z.core.$strip>;
2816
+ declare const ListActivityRequestSchema: z.ZodObject<{
2817
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2818
+ pageSize: z.ZodDefault<z.ZodNumber>;
2819
+ user: z.ZodString;
2820
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
2821
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
2822
+ type: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2823
+ TRADE: "TRADE";
2824
+ SPLIT: "SPLIT";
2825
+ MERGE: "MERGE";
2826
+ REDEEM: "REDEEM";
2827
+ REWARD: "REWARD";
2828
+ CONVERSION: "CONVERSION";
2829
+ MAKER_REBATE: "MAKER_REBATE";
2830
+ }>>>;
2831
+ start: z.ZodOptional<z.ZodNumber>;
2832
+ end: z.ZodOptional<z.ZodNumber>;
2833
+ sortBy: z.ZodOptional<z.ZodEnum<{
2834
+ TOKENS: "TOKENS";
2835
+ TIMESTAMP: "TIMESTAMP";
2836
+ CASH: "CASH";
2837
+ }>>;
2838
+ sortDirection: z.ZodOptional<z.ZodEnum<{
2839
+ ASC: "ASC";
2840
+ DESC: "DESC";
2841
+ }>>;
2842
+ side: z.ZodOptional<z.ZodEnum<{
2843
+ BUY: "BUY";
2844
+ SELL: "SELL";
2845
+ }>>;
2846
+ }, z.core.$strip>;
2847
+ type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
2848
+ type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
2849
+ type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
2850
+ /**
2851
+ * Lists trades for a wallet, market, or event.
2852
+ *
2853
+ * @throws {@link ListTradesError}
2854
+ * Thrown on failure.
2855
+ *
2856
+ * @example
2857
+ * Fetch the first page of results:
2858
+ * ```ts
2859
+ * const result = listTrades(client, {
2860
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
2861
+ * pageSize: 10,
2862
+ * });
2863
+ *
2864
+ * const firstPage = await result.firstPage();
2865
+ *
2866
+ * // Optionally, fetch additional pages:
2867
+ * for await (const page of result.from(firstPage.nextCursor)) {
2868
+ * // page.items: Trade[]
2869
+ * }
2870
+ * ```
2871
+ *
2872
+ * @example
2873
+ * Loop through all pages with `for await`:
2874
+ * ```ts
2875
+ * const result = listTrades(client, {
2876
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
2877
+ * pageSize: 10,
2878
+ * });
2879
+ *
2880
+ * for await (const page of result) {
2881
+ * // page.items: Trade[]
2882
+ * }
2883
+ * ```
2884
+ */
2885
+ declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade>;
2886
+ type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
2887
+ /**
2888
+ * Lists wallet activity.
2889
+ *
2890
+ * @throws {@link ListActivityError}
2891
+ * Thrown on failure.
2892
+ *
2893
+ * @example
2894
+ * Fetch the first page of results:
2895
+ * ```ts
2896
+ * const result = listActivity(client, {
2897
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
2898
+ * pageSize: 10,
2899
+ * });
2900
+ *
2901
+ * const firstPage = await result.firstPage();
2902
+ *
2903
+ * // Optionally, fetch additional pages:
2904
+ * for await (const page of result.from(firstPage.nextCursor)) {
2905
+ * // page.items: Activity[]
2906
+ * }
2907
+ * ```
2908
+ *
2909
+ * @example
2910
+ * Loop through all pages with `for await`:
2911
+ * ```ts
2912
+ * const result = listActivity(client, {
2913
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
2914
+ * pageSize: 10,
2915
+ * });
2916
+ *
2917
+ * for await (const page of result) {
2918
+ * // page.items: Activity[]
2919
+ * }
2920
+ * ```
2921
+ */
2922
+ declare function listActivity(client: BaseClient, request: ListActivityRequest): Paginated<Activity>;
2923
+
2924
+ declare const ListBuilderTradesRequestSchema: z.ZodObject<{
2925
+ after: z.ZodOptional<z.ZodString>;
2926
+ before: z.ZodOptional<z.ZodString>;
2927
+ builder: z.ZodOptional<z.ZodString>;
2928
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
2929
+ id: z.ZodOptional<z.ZodString>;
2930
+ market: z.ZodOptional<z.ZodString>;
2931
+ tokenId: z.ZodOptional<z.ZodString>;
2932
+ }, z.core.$strip>;
2933
+ type ListBuilderTradesRequest = z.input<typeof ListBuilderTradesRequestSchema>;
2934
+ type ListBuilderTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
2935
+ /**
2936
+ * Lists builder-attributed trades.
2937
+ *
2938
+ * @throws {@link ListBuilderTradesError}
2939
+ * Thrown on failure.
2940
+ *
2941
+ * @example
2942
+ * Fetch the first page of results:
2943
+ * ```ts
2944
+ * const result = listBuilderTrades(client);
2945
+ *
2946
+ * const firstPage = await result.firstPage();
2947
+ *
2948
+ * // Optionally, fetch additional pages:
2949
+ * for await (const page of result.from(firstPage.nextCursor)) {
2950
+ * // page.items: BuilderTrade[]
2951
+ * }
2952
+ * ```
2953
+ *
2954
+ * @example
2955
+ * Loop through all pages with `for await`:
2956
+ * ```ts
2957
+ * const result = listBuilderTrades(client);
2958
+ *
2959
+ * for await (const page of result) {
2960
+ * // page.items: BuilderTrade[]
2961
+ * }
2962
+ * ```
2963
+ */
2964
+ declare function listBuilderTrades(client: BaseClient, request?: ListBuilderTradesRequest): Paginated<BuilderTrade>;
2965
+
2966
+ declare const FetchMidpointRequestSchema: z.ZodObject<{
2967
+ tokenId: z.ZodString;
2968
+ }, z.core.$strip>;
2969
+ type FetchMidpointRequest = z.input<typeof FetchMidpointRequestSchema>;
2970
+ type FetchMidpointError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
2971
+ /**
2972
+ * Fetches the midpoint price for a token.
2973
+ *
2974
+ * @throws {@link FetchMidpointError}
2975
+ * Thrown on failure.
2976
+ *
2977
+ * @example
2978
+ * ```ts
2979
+ * const midpoint = await fetchMidpoint(client, {
2980
+ * tokenId:
2981
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
2982
+ * });
2983
+ *
2984
+ * // midpoint === '0.53'
2985
+ * ```
2986
+ *
2987
+ */
2988
+ declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<string>;
2989
+ declare const FetchMidpointsRequestSchema: z.ZodArray<z.ZodObject<{
2990
+ tokenId: z.ZodString;
2991
+ }, z.core.$strip>>;
2992
+ type FetchMidpointsRequest = z.input<typeof FetchMidpointsRequestSchema>;
2993
+ type FetchMidpointsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
2994
+ /**
2995
+ * Fetches midpoint prices for multiple tokens.
2996
+ *
2997
+ * @throws {@link FetchMidpointsError}
2998
+ * Thrown on failure.
2999
+ *
3000
+ * @example
3001
+ * ```ts
3002
+ * const midpoints = await fetchMidpoints(client, [
3003
+ * {
3004
+ * tokenId:
3005
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3006
+ * },
3007
+ * ]);
3008
+ *
3009
+ * // midpoints[tokenId] === '0.53'
3010
+ * ```
3011
+ *
3012
+ */
3013
+ declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Record<string, string>>;
3014
+ declare const FetchTickSizeRequestSchema: z.ZodObject<{
3015
+ tokenId: z.ZodString;
3016
+ }, z.core.$strip>;
3017
+ type FetchTickSizeRequest = z.input<typeof FetchTickSizeRequestSchema>;
3018
+ type FetchTickSizeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3019
+ /**
3020
+ * Fetches the minimum price tick size for a token's order book.
3021
+ *
3022
+ * @remarks
3023
+ * This is a low-level market action that most SDK consumers will not need.
3024
+ *
3025
+ * @throws {@link FetchTickSizeError}
3026
+ * Thrown on failure.
3027
+ *
3028
+ * @example
3029
+ * ```ts
3030
+ * const tickSize = await fetchTickSize(client, {
3031
+ * tokenId:
3032
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3033
+ * });
3034
+ *
3035
+ * // tickSize === 0.01
3036
+ * ```
3037
+ */
3038
+ declare function fetchTickSize(client: BaseClient, request: FetchTickSizeRequest): Promise<TickSizeValue>;
3039
+ declare const FetchNegRiskRequestSchema: z.ZodObject<{
3040
+ tokenId: z.ZodString;
3041
+ }, z.core.$strip>;
3042
+ type FetchNegRiskRequest = z.input<typeof FetchNegRiskRequestSchema>;
3043
+ type FetchNegRiskError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3044
+ /**
3045
+ * Fetches whether a token is in a negative-risk market.
3046
+ *
3047
+ * @remarks
3048
+ * This is a low-level market action that most SDK consumers will not need.
3049
+ *
3050
+ * @throws {@link FetchNegRiskError}
3051
+ * Thrown on failure.
3052
+ *
3053
+ * @example
3054
+ * ```ts
3055
+ * const negRisk = await fetchNegRisk(client, {
3056
+ * tokenId:
3057
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3058
+ * });
3059
+ *
3060
+ * // negRisk === false
3061
+ * ```
3062
+ */
3063
+ declare function fetchNegRisk(client: BaseClient, request: FetchNegRiskRequest): Promise<boolean>;
3064
+ declare const FetchFeeRateRequestSchema: z.ZodObject<{
3065
+ tokenId: z.ZodString;
3066
+ }, z.core.$strip>;
3067
+ type FetchFeeRateRequest = z.input<typeof FetchFeeRateRequestSchema>;
3068
+ type FetchFeeRateError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3069
+ /**
3070
+ * Fetches the base fee rate, in basis points, for a token's order book.
3071
+ *
3072
+ * @remarks
3073
+ * This is a low-level market action that most SDK consumers will not need.
3074
+ *
3075
+ * @throws {@link FetchFeeRateError}
3076
+ * Thrown on failure.
3077
+ *
3078
+ * @example
3079
+ * ```ts
3080
+ * const feeRate = await fetchFeeRate(client, {
3081
+ * tokenId:
3082
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3083
+ * });
3084
+ *
3085
+ * // feeRate === 0
3086
+ * ```
3087
+ */
3088
+ declare function fetchFeeRate(client: BaseClient, request: FetchFeeRateRequest): Promise<number>;
3089
+ declare const FetchPriceRequestSchema: z.ZodObject<{
3090
+ tokenId: z.ZodString;
3091
+ side: z.ZodEnum<typeof _polymarket_bindings_clob.OrderSide>;
3092
+ }, z.core.$strip>;
3093
+ type FetchPriceRequest = z.input<typeof FetchPriceRequestSchema>;
3094
+ type FetchPriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3095
+ /**
3096
+ * Fetches the current quoted price for a token and side.
3097
+ *
3098
+ * @throws {@link FetchPriceError}
3099
+ * Thrown on failure.
3100
+ *
3101
+ * @example
3102
+ * ```ts
3103
+ * const price = await fetchPrice(client, {
3104
+ * tokenId:
3105
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3106
+ * side: OrderSide.BUY,
3107
+ * });
3108
+ *
3109
+ * // price === '0.52'
3110
+ * ```
3111
+ *
3112
+ */
3113
+ declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<string>;
3114
+ declare const FetchPricesRequestSchema: z.ZodArray<z.ZodObject<{
3115
+ tokenId: z.ZodString;
3116
+ side: z.ZodEnum<typeof _polymarket_bindings_clob.OrderSide>;
3117
+ }, z.core.$strip>>;
3118
+ type FetchPricesRequest = z.input<typeof FetchPricesRequestSchema>;
3119
+ type FetchPricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3120
+ /**
3121
+ * Fetches quoted prices for multiple tokens.
3122
+ *
3123
+ * @throws {@link FetchPricesError}
3124
+ * Thrown on failure.
3125
+ *
3126
+ * @example
3127
+ * ```ts
3128
+ * const prices = await fetchPrices(client, [
3129
+ * {
3130
+ * tokenId:
3131
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3132
+ * side: OrderSide.BUY,
3133
+ * },
3134
+ * ]);
3135
+ *
3136
+ * // prices[tokenId]?.BUY === '0.52'
3137
+ * ```
3138
+ *
3139
+ */
3140
+ declare function fetchPrices(client: BaseClient, request: FetchPricesRequest): Promise<Prices>;
3141
+ declare const FetchOrderBookRequestSchema: z.ZodObject<{
3142
+ tokenId: z.ZodString;
3143
+ }, z.core.$strip>;
3144
+ type FetchOrderBookRequest = z.input<typeof FetchOrderBookRequestSchema>;
3145
+ type FetchOrderBookError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3146
+ /**
3147
+ * Fetches the current order book for a token.
3148
+ *
3149
+ * @throws {@link FetchOrderBookError}
3150
+ * Thrown on failure.
3151
+ *
3152
+ * @example
3153
+ * ```ts
3154
+ * const orderBook = await fetchOrderBook(client, {
3155
+ * tokenId:
3156
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3157
+ * });
3158
+ *
3159
+ * // orderBook.bids / orderBook.asks
3160
+ * ```
3161
+ */
3162
+ declare function fetchOrderBook(client: BaseClient, request: FetchOrderBookRequest): Promise<OrderBook>;
3163
+ declare const FetchOrderBooksRequestSchema: z.ZodArray<z.ZodObject<{
3164
+ tokenId: z.ZodString;
3165
+ }, z.core.$strip>>;
3166
+ type FetchOrderBooksRequest = z.input<typeof FetchOrderBooksRequestSchema>;
3167
+ type FetchOrderBooksError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3168
+ /**
3169
+ * Fetches order books for multiple tokens.
3170
+ *
3171
+ * @throws {@link FetchOrderBooksError}
3172
+ * Thrown on failure.
3173
+ *
3174
+ * @example
3175
+ * ```ts
3176
+ * const books = await fetchOrderBooks(client, [
3177
+ * {
3178
+ * tokenId:
3179
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3180
+ * },
3181
+ * ])
3182
+ *
3183
+ * // books: OrderBook[]
3184
+ * ```
3185
+ */
3186
+ declare function fetchOrderBooks(client: BaseClient, request: FetchOrderBooksRequest): Promise<OrderBook[]>;
3187
+ declare const FetchSpreadRequestSchema: z.ZodObject<{
3188
+ tokenId: z.ZodString;
3189
+ }, z.core.$strip>;
3190
+ type FetchSpreadRequest = z.input<typeof FetchSpreadRequestSchema>;
3191
+ type FetchSpreadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3192
+ /**
3193
+ * Fetches the spread for a token.
3194
+ *
3195
+ * @throws {@link FetchSpreadError}
3196
+ * Thrown on failure.
3197
+ *
3198
+ * @example
3199
+ * ```ts
3200
+ * const spread = await fetchSpread(client, {
3201
+ * tokenId:
3202
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3203
+ * });
3204
+ *
3205
+ * // spread === '0.02'
3206
+ * ```
3207
+ *
3208
+ */
3209
+ declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<string>;
3210
+ declare const FetchSpreadsRequestSchema: z.ZodArray<z.ZodObject<{
3211
+ tokenId: z.ZodString;
3212
+ }, z.core.$strip>>;
3213
+ type FetchSpreadsRequest = z.input<typeof FetchSpreadsRequestSchema>;
3214
+ type FetchSpreadsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3215
+ /**
3216
+ * Fetches spreads for multiple tokens.
3217
+ *
3218
+ * @throws {@link FetchSpreadsError}
3219
+ * Thrown on failure.
3220
+ *
3221
+ * @example
3222
+ * ```ts
3223
+ * const spreads = await fetchSpreads(client, [
3224
+ * {
3225
+ * tokenId:
3226
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3227
+ * },
3228
+ * ]);
3229
+ *
3230
+ * // spreads[tokenId] === '0.02'
3231
+ * ```
3232
+ *
3233
+ */
3234
+ declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Record<string, string>>;
3235
+ declare const FetchLastTradePriceRequestSchema: z.ZodObject<{
3236
+ tokenId: z.ZodString;
3237
+ }, z.core.$strip>;
3238
+ type FetchLastTradePriceRequest = z.input<typeof FetchLastTradePriceRequestSchema>;
3239
+ type FetchLastTradePriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3240
+ /**
3241
+ * Fetches the last traded price for a token.
3242
+ *
3243
+ * @throws {@link FetchLastTradePriceError}
3244
+ * Thrown on failure.
3245
+ *
3246
+ * @example
3247
+ * ```ts
3248
+ * const trade = await fetchLastTradePrice(client, {
3249
+ * tokenId:
3250
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3251
+ * });
3252
+ *
3253
+ * // trade === { price: '0.53', side: OrderSide.BUY }
3254
+ * ```
3255
+ *
3256
+ */
3257
+ declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest): Promise<LastTradePrice>;
3258
+ declare const FetchLastTradePricesRequestSchema: z.ZodArray<z.ZodObject<{
3259
+ tokenId: z.ZodString;
3260
+ }, z.core.$strip>>;
3261
+ type FetchLastTradePricesRequest = z.input<typeof FetchLastTradePricesRequestSchema>;
3262
+ type FetchLastTradePricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3263
+ /**
3264
+ * Fetches last traded prices for multiple tokens.
3265
+ *
3266
+ * @throws {@link FetchLastTradePricesError}
3267
+ * Thrown on failure.
3268
+ *
3269
+ * @example
3270
+ * ```ts
3271
+ * const trades = await fetchLastTradePrices(client, [
3272
+ * {
3273
+ * tokenId:
3274
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3275
+ * },
3276
+ * ]);
3277
+ *
3278
+ * // trades[0] === { tokenId, price: '0.53', side: OrderSide.BUY }
3279
+ * ```
3280
+ *
3281
+ */
3282
+ declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest): Promise<LastTradePriceForToken[]>;
3283
+ declare const ListPriceHistoryRequestSchema: z.ZodObject<{
3284
+ tokenId: z.ZodString;
3285
+ startTs: z.ZodOptional<z.ZodNumber>;
3286
+ endTs: z.ZodOptional<z.ZodNumber>;
3287
+ fidelity: z.ZodOptional<z.ZodNumber>;
3288
+ interval: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_clob.PriceHistoryInterval>>;
3289
+ }, z.core.$strip>;
3290
+ type FetchPriceHistoryRequest = z.input<typeof ListPriceHistoryRequestSchema>;
3291
+ type FetchPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3292
+ /**
3293
+ * Fetches historical price points for a token.
3294
+ *
3295
+ * @throws {@link FetchPriceHistoryError}
3296
+ * Thrown on failure.
3297
+ *
3298
+ * @example
3299
+ * ```ts
3300
+ * const history = await fetchPriceHistory(client, {
3301
+ * tokenId:
3302
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
3303
+ * interval: PriceHistoryInterval.ONE_DAY,
3304
+ * fidelity: 60,
3305
+ * });
3306
+ *
3307
+ * // history === PriceHistoryPoint[]
3308
+ * ```
3309
+ *
3310
+ */
3311
+ declare function fetchPriceHistory(client: BaseClient, request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
3312
+ declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
3313
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3314
+ sponsored: z.ZodOptional<z.ZodBoolean>;
3315
+ }, z.core.$strip>>;
3316
+ type ListCurrentRewardsRequest = z.input<typeof ListCurrentRewardsRequestSchema>;
3317
+ type ListCurrentRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3318
+ /**
3319
+ * Lists current active market rewards.
3320
+ *
3321
+ * @throws {@link ListCurrentRewardsError}
3322
+ * Thrown on failure.
3323
+ *
3324
+ * @example
3325
+ * Fetch the first page of results:
3326
+ * ```ts
3327
+ * const result = listCurrentRewards(client);
3328
+ *
3329
+ * const firstPage = await result.firstPage();
3330
+ *
3331
+ * // Optionally, fetch additional pages:
3332
+ * for await (const page of result.from(firstPage.nextCursor)) {
3333
+ * // page.items: CurrentReward[]
3334
+ * }
3335
+ * ```
3336
+ *
3337
+ * @example
3338
+ * Loop through all pages with `for await`:
3339
+ * ```ts
3340
+ * const result = listCurrentRewards(client);
3341
+ *
3342
+ * for await (const page of result) {
3343
+ * // page.items: CurrentReward[]
3344
+ * }
3345
+ * ```
3346
+ */
3347
+ declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward>;
3348
+ declare const ListMarketRewardsRequestSchema: z.ZodObject<{
3349
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>;
3350
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3351
+ sponsored: z.ZodOptional<z.ZodBoolean>;
3352
+ }, z.core.$strip>;
3353
+ type ListMarketRewardsRequest = z.input<typeof ListMarketRewardsRequestSchema>;
3354
+ type ListMarketRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3355
+ /**
3356
+ * Lists reward configurations for a market.
3357
+ *
3358
+ * @throws {@link ListMarketRewardsError}
3359
+ * Thrown on failure.
3360
+ *
3361
+ * @example
3362
+ * Fetch the first page of results:
3363
+ * ```ts
3364
+ * const result = listMarketRewards(client, {
3365
+ * conditionId:
3366
+ * '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af',
3367
+ * });
3368
+ *
3369
+ * const firstPage = await result.firstPage();
3370
+ *
3371
+ * // Optionally, fetch additional pages:
3372
+ * for await (const page of result.from(firstPage.nextCursor)) {
3373
+ * // page.items: MarketReward[]
3374
+ * }
3375
+ * ```
3376
+ *
3377
+ * @example
3378
+ * Loop through all pages with `for await`:
3379
+ * ```ts
3380
+ * const result = listMarketRewards(client, {
3381
+ * conditionId:
3382
+ * '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af',
3383
+ * });
3384
+ *
3385
+ * for await (const page of result) {
3386
+ * // page.items: MarketReward[]
3387
+ * }
3388
+ * ```
3389
+ */
3390
+ declare function listMarketRewards(client: BaseClient, request: ListMarketRewardsRequest): Paginated<MarketReward>;
3391
+
3392
+ declare const ListCommentsRequestSchema: z.ZodObject<{
3393
+ ascending: z.ZodOptional<z.ZodBoolean>;
3394
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3395
+ pageSize: z.ZodDefault<z.ZodNumber>;
3396
+ getPositions: z.ZodOptional<z.ZodBoolean>;
3397
+ holdersOnly: z.ZodOptional<z.ZodBoolean>;
3398
+ order: z.ZodOptional<z.ZodString>;
3399
+ parentEntityId: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.SeriesId, string>>]>;
3400
+ parentEntityType: z.ZodEnum<{
3401
+ Event: "Event";
3402
+ Series: "Series";
3403
+ }>;
3404
+ }, z.core.$strip>;
3405
+ declare const FetchCommentsByIdRequestSchema: z.ZodObject<{
3406
+ getPositions: z.ZodOptional<z.ZodBoolean>;
3407
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CommentId, string>>;
3408
+ }, z.core.$strip>;
3409
+ declare const ListCommentsByUserAddressRequestSchema: z.ZodObject<{
3410
+ address: z.ZodString;
3411
+ ascending: z.ZodOptional<z.ZodBoolean>;
3412
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3413
+ order: z.ZodOptional<z.ZodString>;
3414
+ pageSize: z.ZodDefault<z.ZodNumber>;
3415
+ }, z.core.$strip>;
3416
+ type ListCommentsRequest = z.input<typeof ListCommentsRequestSchema>;
3417
+ type FetchCommentsByIdRequest = z.input<typeof FetchCommentsByIdRequestSchema>;
3418
+ type ListCommentsByUserAddressRequest = z.input<typeof ListCommentsByUserAddressRequestSchema>;
3419
+ type ListCommentsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3420
+ /**
3421
+ * Lists comments for an event or series.
3422
+ *
3423
+ * @throws {@link ListCommentsError}
3424
+ * Thrown on failure.
3425
+ *
3426
+ * @example
3427
+ * Fetch the first page of results:
3428
+ * ```ts
3429
+ * const result = listComments(client, {
3430
+ * parentEntityId: '123',
3431
+ * parentEntityType: 'Event',
3432
+ * pageSize: 20,
3433
+ * });
3434
+ *
3435
+ * const firstPage = await result.firstPage();
3436
+ *
3437
+ * // Optionally, fetch additional pages:
3438
+ * for await (const page of result.from(firstPage.nextCursor)) {
3439
+ * // page.items: Comment[]
3440
+ * }
3441
+ * ```
3442
+ *
3443
+ * @example
3444
+ * Loop through all pages with `for await`:
3445
+ * ```ts
3446
+ * const result = listComments(client, {
3447
+ * parentEntityId: '123',
3448
+ * parentEntityType: 'Event',
3449
+ * pageSize: 20,
3450
+ * });
3451
+ *
3452
+ * for await (const page of result) {
3453
+ * // page.items: Comment[]
3454
+ * }
3455
+ * ```
3456
+ */
3457
+ declare function listComments(client: BaseClient, request: ListCommentsRequest): Paginated<Comment>;
3458
+ type FetchCommentsByIdError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3459
+ /**
3460
+ * Fetches a comment thread by comment id.
3461
+ *
3462
+ * @throws {@link FetchCommentsByIdError}
3463
+ * Thrown on failure.
3464
+ *
3465
+ * @example
3466
+ * ```ts
3467
+ * const thread = await fetchCommentsById(client, {
3468
+ * id: '456',
3469
+ * getPositions: true,
3470
+ * });
3471
+ *
3472
+ * // thread: Comment[]
3473
+ * ```
3474
+ */
3475
+ declare function fetchCommentsById(client: BaseClient, request: FetchCommentsByIdRequest): Promise<Comment[]>;
3476
+ type ListCommentsByUserAddressError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3477
+ /**
3478
+ * Lists comments written by a wallet address.
3479
+ *
3480
+ * @throws {@link ListCommentsByUserAddressError}
3481
+ * Thrown on failure.
3482
+ *
3483
+ * @example
3484
+ * Fetch the first page of results:
3485
+ * ```ts
3486
+ * const result = listCommentsByUserAddress(client, {
3487
+ * address: '0x1234...',
3488
+ * pageSize: 10,
3489
+ * order: 'DESC',
3490
+ * });
3491
+ *
3492
+ * const firstPage = await result.firstPage();
3493
+ *
3494
+ * // Optionally, fetch additional pages:
3495
+ * for await (const page of result.from(firstPage.nextCursor)) {
3496
+ * // page.items: Comment[]
3497
+ * }
3498
+ * ```
3499
+ *
3500
+ * @example
3501
+ * Loop through all pages with `for await`:
3502
+ * ```ts
3503
+ * const result = listCommentsByUserAddress(client, {
3504
+ * address: '0x1234...',
3505
+ * pageSize: 10,
3506
+ * order: 'DESC',
3507
+ * });
3508
+ *
3509
+ * for await (const page of result) {
3510
+ * // page.items: Comment[]
3511
+ * }
3512
+ * ```
3513
+ */
3514
+ declare function listCommentsByUserAddress(client: BaseClient, request: ListCommentsByUserAddressRequest): Paginated<Comment>;
3515
+
3516
+ declare const ListEventsRequestSchema: z.ZodObject<{
3517
+ ascending: z.ZodOptional<z.ZodBoolean>;
3518
+ closed: z.ZodOptional<z.ZodBoolean>;
3519
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3520
+ pageSize: z.ZodOptional<z.ZodNumber>;
3521
+ cyom: z.ZodOptional<z.ZodBoolean>;
3522
+ endDateMax: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3523
+ endDateMin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3524
+ ended: z.ZodOptional<z.ZodBoolean>;
3525
+ eventDate: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3526
+ eventWeek: z.ZodOptional<z.ZodNumber>;
3527
+ excludeTagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3528
+ featured: z.ZodOptional<z.ZodBoolean>;
3529
+ featuredOrder: z.ZodOptional<z.ZodBoolean>;
3530
+ gameIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3531
+ ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3532
+ includeBestLines: z.ZodOptional<z.ZodBoolean>;
3533
+ includeChat: z.ZodOptional<z.ZodBoolean>;
3534
+ includeChildren: z.ZodOptional<z.ZodBoolean>;
3535
+ includeTemplate: z.ZodOptional<z.ZodBoolean>;
3536
+ liquidityMax: z.ZodOptional<z.ZodNumber>;
3537
+ liquidityMin: z.ZodOptional<z.ZodNumber>;
3538
+ live: z.ZodOptional<z.ZodBoolean>;
3539
+ locale: z.ZodOptional<z.ZodString>;
3540
+ order: z.ZodOptional<z.ZodString>;
3541
+ parentEventId: z.ZodOptional<z.ZodNumber>;
3542
+ partnerSlug: z.ZodOptional<z.ZodString>;
3543
+ recurrence: z.ZodOptional<z.ZodEnum<{
3544
+ daily: "daily";
3545
+ weekly: "weekly";
3546
+ monthly: "monthly";
3547
+ }>>;
3548
+ relatedTags: z.ZodOptional<z.ZodBoolean>;
3549
+ seriesIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3550
+ slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
3551
+ startDateMax: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3552
+ startDateMin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3553
+ startTimeMax: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3554
+ startTimeMin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3555
+ tagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3556
+ tagMatch: z.ZodOptional<z.ZodEnum<{
3557
+ any: "any";
3558
+ all: "all";
3559
+ }>>;
3560
+ tagSlug: z.ZodOptional<z.ZodString>;
3561
+ titleSearch: z.ZodOptional<z.ZodString>;
3562
+ volumeMax: z.ZodOptional<z.ZodNumber>;
3563
+ volumeMin: z.ZodOptional<z.ZodNumber>;
3564
+ }, z.core.$strip>;
3565
+ type ListEventsRequest = z.input<typeof ListEventsRequestSchema>;
3566
+ declare const FetchEventRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
3567
+ id: z.ZodString;
3568
+ includeBestLines: z.ZodOptional<z.ZodBoolean>;
3569
+ includeChat: z.ZodOptional<z.ZodBoolean>;
3570
+ includeTemplate: z.ZodOptional<z.ZodBoolean>;
3571
+ locale: z.ZodOptional<z.ZodString>;
3572
+ }, z.core.$strip>, z.ZodObject<{
3573
+ slug: z.ZodString;
3574
+ includeBestLines: z.ZodOptional<z.ZodBoolean>;
3575
+ includeChat: z.ZodOptional<z.ZodBoolean>;
3576
+ includeTemplate: z.ZodOptional<z.ZodBoolean>;
3577
+ locale: z.ZodOptional<z.ZodString>;
3578
+ }, z.core.$strip>]>;
3579
+ type FetchEventRequest = z.input<typeof FetchEventRequestSchema>;
3580
+ declare const FetchEventTagsRequestSchema: z.ZodObject<{
3581
+ id: z.ZodString;
3582
+ }, z.core.$strip>;
3583
+ type FetchEventTagsRequest = z.input<typeof FetchEventTagsRequestSchema>;
3584
+ declare const FetchEventLiveVolumeRequestSchema: z.ZodObject<{
3585
+ id: z.ZodString;
3586
+ }, z.core.$strip>;
3587
+ type FetchEventLiveVolumeRequest = z.input<typeof FetchEventLiveVolumeRequestSchema>;
3588
+ type ListEventsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3589
+ /**
3590
+ * Lists events.
3591
+ *
3592
+ * @throws {@link ListEventsError}
3593
+ * Thrown on failure.
3594
+ *
3595
+ * @example
3596
+ * Fetch the first page of results:
3597
+ * ```ts
3598
+ * const result = listEvents(client, {
3599
+ * closed: false,
3600
+ * pageSize: 10,
3601
+ * });
3602
+ *
3603
+ * const firstPage = await result.firstPage();
3604
+ *
3605
+ * // Optionally, fetch additional pages:
3606
+ * for await (const page of result.from(firstPage.nextCursor)) {
3607
+ * // page.items: Event[]
3608
+ * }
3609
+ * ```
3610
+ *
3611
+ * @example
3612
+ * Loop through all pages with `for await`:
3613
+ * ```ts
3614
+ * const result = listEvents(client, {
3615
+ * closed: false,
3616
+ * pageSize: 10,
3617
+ * });
3618
+ *
3619
+ * for await (const page of result) {
3620
+ * // page.items: Event[]
3621
+ * }
3622
+ * ```
3623
+ */
3624
+ declare function listEvents(client: BaseClient, request?: ListEventsRequest): Paginated<Event>;
3625
+ type FetchEventError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3626
+ /**
3627
+ * Fetches an event.
3628
+ *
3629
+ * @throws {@link FetchEventError}
3630
+ * Thrown on failure.
3631
+ *
3632
+ * @example
3633
+ * ```ts
3634
+ * const event = await fetchEvent(client, {
3635
+ * id: '12345',
3636
+ * });
3637
+ *
3638
+ * // event === Event
3639
+ * ```
3640
+ */
3641
+ declare function fetchEvent(client: BaseClient, request: FetchEventRequest): Promise<Event>;
3642
+ type FetchEventTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3643
+ /**
3644
+ * Fetches an event's tags.
3645
+ *
3646
+ * @throws {@link FetchEventTagsError}
3647
+ * Thrown on failure.
3648
+ *
3649
+ * @example
3650
+ * ```ts
3651
+ * const tags = await fetchEventTags(client, {
3652
+ * id: '12345',
3653
+ * });
3654
+ *
3655
+ * // tags: TagReference[]
3656
+ * ```
3657
+ */
3658
+ declare function fetchEventTags(client: BaseClient, request: FetchEventTagsRequest): Promise<TagReference[]>;
3659
+ type FetchEventLiveVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3660
+ /**
3661
+ * Fetches live volume for an event.
3662
+ *
3663
+ * @throws {@link FetchEventLiveVolumeError}
3664
+ * Thrown on failure.
3665
+ *
3666
+ * @example
3667
+ * ```ts
3668
+ * const volume = await fetchEventLiveVolume(client, {
3669
+ * id: '160707',
3670
+ * });
3671
+ *
3672
+ * // volume: LiveVolume[]
3673
+ * ```
3674
+ */
3675
+ declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
3676
+
3677
+ declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
3678
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3679
+ pageSize: z.ZodDefault<z.ZodNumber>;
3680
+ timePeriod: z.ZodOptional<z.ZodEnum<{
3681
+ DAY: "DAY";
3682
+ WEEK: "WEEK";
3683
+ MONTH: "MONTH";
3684
+ ALL: "ALL";
3685
+ }>>;
3686
+ }, z.core.$strip>;
3687
+ declare const ListBuilderVolumeRequestSchema: z.ZodObject<{
3688
+ timePeriod: z.ZodOptional<z.ZodEnum<{
3689
+ DAY: "DAY";
3690
+ WEEK: "WEEK";
3691
+ MONTH: "MONTH";
3692
+ ALL: "ALL";
3693
+ }>>;
3694
+ }, z.core.$strip>;
3695
+ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
3696
+ category: z.ZodOptional<z.ZodEnum<{
3697
+ OVERALL: "OVERALL";
3698
+ POLITICS: "POLITICS";
3699
+ SPORTS: "SPORTS";
3700
+ CRYPTO: "CRYPTO";
3701
+ CULTURE: "CULTURE";
3702
+ MENTIONS: "MENTIONS";
3703
+ WEATHER: "WEATHER";
3704
+ ECONOMICS: "ECONOMICS";
3705
+ TECH: "TECH";
3706
+ FINANCE: "FINANCE";
3707
+ }>>;
3708
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3709
+ pageSize: z.ZodDefault<z.ZodNumber>;
3710
+ timePeriod: z.ZodOptional<z.ZodEnum<{
3711
+ DAY: "DAY";
3712
+ WEEK: "WEEK";
3713
+ MONTH: "MONTH";
3714
+ ALL: "ALL";
3715
+ }>>;
3716
+ orderBy: z.ZodOptional<z.ZodEnum<{
3717
+ PNL: "PNL";
3718
+ VOL: "VOL";
3719
+ }>>;
3720
+ user: z.ZodOptional<z.ZodString>;
3721
+ userName: z.ZodOptional<z.ZodString>;
3722
+ }, z.core.$strip>;
3723
+ type ListBuilderLeaderboardRequest = z.input<typeof ListBuilderLeaderboardRequestSchema>;
3724
+ type ListBuilderVolumeRequest = z.input<typeof ListBuilderVolumeRequestSchema>;
3725
+ type ListTraderLeaderboardRequest = z.input<typeof ListTraderLeaderboardRequestSchema>;
3726
+ type ListBuilderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3727
+ /**
3728
+ * Lists builder leaderboard rankings.
3729
+ *
3730
+ * @throws {@link ListBuilderLeaderboardError}
3731
+ * Thrown on failure.
3732
+ *
3733
+ * @example
3734
+ * Fetch the first page of results:
3735
+ * ```ts
3736
+ * const result = listBuilderLeaderboard(client, {
3737
+ * pageSize: 10,
3738
+ * timePeriod: 'DAY',
3739
+ * });
3740
+ *
3741
+ * const firstPage = await result.firstPage();
3742
+ *
3743
+ * // Optionally, fetch additional pages:
3744
+ * for await (const page of result.from(firstPage.nextCursor)) {
3745
+ * // page.items: LeaderboardEntry[]
3746
+ * }
3747
+ * ```
3748
+ *
3749
+ * @example
3750
+ * Loop through all pages with `for await`:
3751
+ * ```ts
3752
+ * const result = listBuilderLeaderboard(client, {
3753
+ * pageSize: 10,
3754
+ * timePeriod: 'DAY',
3755
+ * });
3756
+ *
3757
+ * for await (const page of result) {
3758
+ * // page.items: LeaderboardEntry[]
3759
+ * }
3760
+ * ```
3761
+ */
3762
+ declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest): Paginated<LeaderboardEntry>;
3763
+ type ListBuilderVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3764
+ /**
3765
+ * Lists daily builder volume entries.
3766
+ *
3767
+ * @throws {@link ListBuilderVolumeError}
3768
+ * Thrown on failure.
3769
+ *
3770
+ * @example
3771
+ * ```ts
3772
+ * const volume = await fetchBuilderVolume(client, {
3773
+ * timePeriod: 'DAY',
3774
+ * });
3775
+ *
3776
+ * // volume: BuilderVolumeEntry[]
3777
+ * ```
3778
+ */
3779
+ declare function fetchBuilderVolume(client: BaseClient, request?: ListBuilderVolumeRequest): Promise<BuilderVolumeEntry[]>;
3780
+ type ListTraderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3781
+ /**
3782
+ * Lists trader leaderboard rankings.
3783
+ *
3784
+ * @throws {@link ListTraderLeaderboardError}
3785
+ * Thrown on failure.
3786
+ *
3787
+ * @example
3788
+ * Fetch the first page of results:
3789
+ * ```ts
3790
+ * const result = listTraderLeaderboard(client, {
3791
+ * orderBy: 'PNL',
3792
+ * pageSize: 10,
3793
+ * timePeriod: 'DAY',
3794
+ * });
3795
+ *
3796
+ * const firstPage = await result.firstPage();
3797
+ *
3798
+ * // Optionally, fetch additional pages:
3799
+ * for await (const page of result.from(firstPage.nextCursor)) {
3800
+ * // page.items: TraderLeaderboardEntry[]
3801
+ * }
3802
+ * ```
3803
+ *
3804
+ * @example
3805
+ * Loop through all pages with `for await`:
3806
+ * ```ts
3807
+ * const result = listTraderLeaderboard(client, {
3808
+ * orderBy: 'PNL',
3809
+ * pageSize: 10,
3810
+ * timePeriod: 'DAY',
3811
+ * });
3812
+ *
3813
+ * for await (const page of result) {
3814
+ * // page.items: TraderLeaderboardEntry[]
3815
+ * }
3816
+ * ```
3817
+ */
3818
+ declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry>;
3819
+
3820
+ declare const ListMarketsRequestSchema: z.ZodObject<{
3821
+ ascending: z.ZodOptional<z.ZodBoolean>;
3822
+ closed: z.ZodOptional<z.ZodBoolean>;
3823
+ clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3824
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3825
+ pageSize: z.ZodOptional<z.ZodNumber>;
3826
+ conditionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3827
+ cyom: z.ZodOptional<z.ZodBoolean>;
3828
+ decimalized: z.ZodOptional<z.ZodBoolean>;
3829
+ endDateMax: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3830
+ endDateMin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3831
+ gameId: z.ZodOptional<z.ZodString>;
3832
+ ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
3833
+ includeTag: z.ZodOptional<z.ZodBoolean>;
3834
+ liquidityNumMax: z.ZodOptional<z.ZodNumber>;
3835
+ liquidityNumMin: z.ZodOptional<z.ZodNumber>;
3836
+ locale: z.ZodOptional<z.ZodString>;
3837
+ marketMakerAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
3838
+ order: z.ZodOptional<z.ZodString>;
3839
+ questionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3840
+ relatedTags: z.ZodOptional<z.ZodBoolean>;
3841
+ rfqEnabled: z.ZodOptional<z.ZodBoolean>;
3842
+ rewardsMinSize: z.ZodOptional<z.ZodNumber>;
3843
+ slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
3844
+ sportsMarketTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3845
+ startDateMax: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3846
+ startDateMin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
3847
+ tagId: z.ZodOptional<z.ZodNumber>;
3848
+ tagMatch: z.ZodOptional<z.ZodEnum<{
3849
+ any: "any";
3850
+ all: "all";
3851
+ }>>;
3852
+ umaResolutionStatus: z.ZodOptional<z.ZodString>;
3853
+ volumeNumMax: z.ZodOptional<z.ZodNumber>;
3854
+ volumeNumMin: z.ZodOptional<z.ZodNumber>;
3855
+ }, z.core.$strip>;
3856
+ type ListMarketsRequest = z.input<typeof ListMarketsRequestSchema>;
3857
+ declare const FetchMarketRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
3858
+ id: z.ZodString;
3859
+ includeTag: z.ZodOptional<z.ZodBoolean>;
3860
+ locale: z.ZodOptional<z.ZodString>;
3861
+ }, z.core.$strip>, z.ZodObject<{
3862
+ slug: z.ZodString;
3863
+ includeTag: z.ZodOptional<z.ZodBoolean>;
3864
+ locale: z.ZodOptional<z.ZodString>;
3865
+ }, z.core.$strip>]>;
3866
+ type FetchMarketRequest = z.input<typeof FetchMarketRequestSchema>;
3867
+ declare const FetchMarketTagsRequestSchema: z.ZodObject<{
3868
+ id: z.ZodString;
3869
+ }, z.core.$strip>;
3870
+ type FetchMarketTagsRequest = z.input<typeof FetchMarketTagsRequestSchema>;
3871
+ declare const ListMarketHoldersRequestSchema: z.ZodObject<{
3872
+ limit: z.ZodOptional<z.ZodNumber>;
3873
+ market: z.ZodArray<z.ZodString>;
3874
+ minBalance: z.ZodOptional<z.ZodNumber>;
3875
+ }, z.core.$strip>;
3876
+ declare const ListOpenInterestRequestSchema: z.ZodObject<{
3877
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
3878
+ }, z.core.$strip>;
3879
+ declare const ListMarketPositionsRequestSchema: z.ZodObject<{
3880
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3881
+ market: z.ZodString;
3882
+ pageSize: z.ZodDefault<z.ZodNumber>;
3883
+ user: z.ZodOptional<z.ZodString>;
3884
+ status: z.ZodOptional<z.ZodEnum<{
3885
+ OPEN: "OPEN";
3886
+ CLOSED: "CLOSED";
3887
+ ALL: "ALL";
3888
+ }>>;
3889
+ sortBy: z.ZodOptional<z.ZodEnum<{
3890
+ TOKENS: "TOKENS";
3891
+ CASH_PNL: "CASH_PNL";
3892
+ REALIZED_PNL: "REALIZED_PNL";
3893
+ TOTAL_PNL: "TOTAL_PNL";
3894
+ }>>;
3895
+ sortDirection: z.ZodOptional<z.ZodEnum<{
3896
+ ASC: "ASC";
3897
+ DESC: "DESC";
3898
+ }>>;
3899
+ }, z.core.$strip>;
3900
+ type ListMarketHoldersRequest = z.input<typeof ListMarketHoldersRequestSchema>;
3901
+ type ListOpenInterestRequest = z.input<typeof ListOpenInterestRequestSchema>;
3902
+ type ListMarketPositionsRequest = z.input<typeof ListMarketPositionsRequestSchema>;
3903
+ type ListMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3904
+ /**
3905
+ * Lists markets.
3906
+ *
3907
+ * @throws {@link ListMarketsError}
3908
+ * Thrown on failure.
3909
+ *
3910
+ * @example
3911
+ * Fetch the first page of results:
3912
+ * ```ts
3913
+ * const result = listMarkets(client, {
3914
+ * closed: false,
3915
+ * pageSize: 10,
3916
+ * });
3917
+ *
3918
+ * const firstPage = await result.firstPage();
3919
+ *
3920
+ * // Optionally, fetch additional pages:
3921
+ * for await (const page of result.from(firstPage.nextCursor)) {
3922
+ * // page.items: Market[]
3923
+ * }
3924
+ * ```
3925
+ *
3926
+ * @example
3927
+ * Loop through all pages with `for await`:
3928
+ * ```ts
3929
+ * const result = listMarkets(client, {
3930
+ * closed: false,
3931
+ * pageSize: 10,
3932
+ * });
3933
+ *
3934
+ * for await (const page of result) {
3935
+ * // page.items: Market[]
3936
+ * }
3937
+ * ```
3938
+ */
3939
+ declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market>;
3940
+ type FetchMarketError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3941
+ /**
3942
+ * Fetches a market.
3943
+ *
3944
+ * @throws {@link FetchMarketError}
3945
+ * Thrown on failure.
3946
+ *
3947
+ * @example
3948
+ * ```ts
3949
+ * const market = await fetchMarket(client, {
3950
+ * id: '12345',
3951
+ * });
3952
+ *
3953
+ * // market === Market
3954
+ * ```
3955
+ */
3956
+ declare function fetchMarket(client: BaseClient, request: FetchMarketRequest): Promise<Market>;
3957
+ type FetchMarketTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3958
+ /**
3959
+ * Fetches a market's tags.
3960
+ *
3961
+ * @throws {@link FetchMarketTagsError}
3962
+ * Thrown on failure.
3963
+ *
3964
+ * @example
3965
+ * ```ts
3966
+ * const tags = await fetchMarketTags(client, {
3967
+ * id: '12345',
3968
+ * });
3969
+ *
3970
+ * // tags: TagReference[]
3971
+ * ```
3972
+ */
3973
+ declare function fetchMarketTags(client: BaseClient, request: FetchMarketTagsRequest): Promise<TagReference[]>;
3974
+ type ListMarketHoldersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3975
+ /**
3976
+ * Lists the top holders for one or more markets.
3977
+ *
3978
+ * @throws {@link ListMarketHoldersError}
3979
+ * Thrown on failure.
3980
+ *
3981
+ * @example
3982
+ * ```ts
3983
+ * const holders = await listMarketHolders(client, {
3984
+ * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
3985
+ * limit: 5,
3986
+ * });
3987
+ *
3988
+ * // holders: MetaHolder[]
3989
+ * ```
3990
+ */
3991
+ declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest): Promise<MetaHolder[]>;
3992
+ type ListOpenInterestError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3993
+ /**
3994
+ * Lists open interest for one or more markets.
3995
+ *
3996
+ * @throws {@link ListOpenInterestError}
3997
+ * Thrown on failure.
3998
+ *
3999
+ * @example
4000
+ * ```ts
4001
+ * const openInterest = await listOpenInterest(client, {
4002
+ * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
4003
+ * });
4004
+ *
4005
+ * // openInterest: OpenInterest[]
4006
+ * ```
4007
+ */
4008
+ declare function listOpenInterest(client: BaseClient, request?: ListOpenInterestRequest): Promise<OpenInterest[]>;
4009
+ type ListMarketPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4010
+ /**
4011
+ * Lists positions for a market.
4012
+ *
4013
+ * @throws {@link ListMarketPositionsError}
4014
+ * Thrown on failure.
4015
+ *
4016
+ * @example
4017
+ * Fetch the first page of results:
4018
+ * ```ts
4019
+ * const result = listMarketPositions(client, {
4020
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4021
+ * pageSize: 10,
4022
+ * });
4023
+ *
4024
+ * const firstPage = await result.firstPage();
4025
+ *
4026
+ * // Optionally, fetch additional pages:
4027
+ * for await (const page of result.from(firstPage.nextCursor)) {
4028
+ * // page.items: MetaMarketPositionV1[]
4029
+ * }
4030
+ * ```
4031
+ *
4032
+ * @example
4033
+ * Loop through all pages with `for await`:
4034
+ * ```ts
4035
+ * const result = listMarketPositions(client, {
4036
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4037
+ * pageSize: 10,
4038
+ * });
4039
+ *
4040
+ * for await (const page of result) {
4041
+ * // page.items: MetaMarketPositionV1[]
4042
+ * }
4043
+ * ```
4044
+ */
4045
+ declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPositionV1>;
4046
+
4047
+ declare const ListPositionsRequestSchema: z.ZodObject<{
4048
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4049
+ user: z.ZodString;
4050
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4051
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4052
+ sizeThreshold: z.ZodOptional<z.ZodNumber>;
4053
+ redeemable: z.ZodOptional<z.ZodBoolean>;
4054
+ mergeable: z.ZodOptional<z.ZodBoolean>;
4055
+ pageSize: z.ZodDefault<z.ZodNumber>;
4056
+ sortBy: z.ZodOptional<z.ZodEnum<{
4057
+ CURRENT: "CURRENT";
4058
+ INITIAL: "INITIAL";
4059
+ TOKENS: "TOKENS";
4060
+ CASHPNL: "CASHPNL";
4061
+ PERCENTPNL: "PERCENTPNL";
4062
+ TITLE: "TITLE";
4063
+ RESOLVING: "RESOLVING";
4064
+ PRICE: "PRICE";
4065
+ AVGPRICE: "AVGPRICE";
4066
+ }>>;
4067
+ sortDirection: z.ZodOptional<z.ZodEnum<{
4068
+ ASC: "ASC";
4069
+ DESC: "DESC";
4070
+ }>>;
4071
+ title: z.ZodOptional<z.ZodString>;
4072
+ }, z.core.$strip>;
4073
+ declare const ListClosedPositionsRequestSchema: z.ZodObject<{
4074
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4075
+ user: z.ZodString;
4076
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4077
+ title: z.ZodOptional<z.ZodString>;
4078
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4079
+ pageSize: z.ZodDefault<z.ZodNumber>;
4080
+ sortBy: z.ZodOptional<z.ZodEnum<{
4081
+ TITLE: "TITLE";
4082
+ PRICE: "PRICE";
4083
+ AVGPRICE: "AVGPRICE";
4084
+ REALIZEDPNL: "REALIZEDPNL";
4085
+ TIMESTAMP: "TIMESTAMP";
4086
+ }>>;
4087
+ sortDirection: z.ZodOptional<z.ZodEnum<{
4088
+ ASC: "ASC";
4089
+ DESC: "DESC";
4090
+ }>>;
4091
+ }, z.core.$strip>;
4092
+ declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
4093
+ user: z.ZodString;
4094
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4095
+ }, z.core.$strip>;
4096
+ declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
4097
+ user: z.ZodString;
4098
+ }, z.core.$strip>;
4099
+ declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
4100
+ user: z.ZodString;
4101
+ }, z.core.$strip>;
4102
+ type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
4103
+ type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
4104
+ type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
4105
+ type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
4106
+ type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
4107
+ type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4108
+ /**
4109
+ * Lists current positions for a wallet.
4110
+ *
4111
+ * @throws {@link ListPositionsError}
4112
+ * Thrown on failure.
4113
+ *
4114
+ * @example
4115
+ * Fetch the first page of results:
4116
+ * ```ts
4117
+ * const result = listPositions(client, {
4118
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4119
+ * pageSize: 10,
4120
+ * });
4121
+ *
4122
+ * const firstPage = await result.firstPage();
4123
+ *
4124
+ * // Optionally, fetch additional pages:
4125
+ * for await (const page of result.from(firstPage.nextCursor)) {
4126
+ * // page.items: Position[]
4127
+ * }
4128
+ * ```
4129
+ *
4130
+ * @example
4131
+ * Loop through all pages with `for await`:
4132
+ * ```ts
4133
+ * const result = listPositions(client, {
4134
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4135
+ * pageSize: 10,
4136
+ * });
4137
+ *
4138
+ * for await (const page of result) {
4139
+ * // page.items: Position[]
4140
+ * }
4141
+ * ```
4142
+ */
4143
+ declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position>;
4144
+ type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4145
+ /**
4146
+ * Lists closed positions for a wallet.
4147
+ *
4148
+ * @throws {@link ListClosedPositionsError}
4149
+ * Thrown on failure.
4150
+ *
4151
+ * @example
4152
+ * Fetch the first page of results:
4153
+ * ```ts
4154
+ * const result = listClosedPositions(client, {
4155
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4156
+ * pageSize: 10,
4157
+ * });
4158
+ *
4159
+ * const firstPage = await result.firstPage();
4160
+ *
4161
+ * // Optionally, fetch additional pages:
4162
+ * for await (const page of result.from(firstPage.nextCursor)) {
4163
+ * // page.items: ClosedPosition[]
4164
+ * }
4165
+ * ```
4166
+ *
4167
+ * @example
4168
+ * Loop through all pages with `for await`:
4169
+ * ```ts
4170
+ * const result = listClosedPositions(client, {
4171
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4172
+ * pageSize: 10,
4173
+ * });
4174
+ *
4175
+ * for await (const page of result) {
4176
+ * // page.items: ClosedPosition[]
4177
+ * }
4178
+ * ```
4179
+ */
4180
+ declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition>;
4181
+ type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4182
+ /**
4183
+ * Fetches the total value for a wallet's positions.
4184
+ *
4185
+ * @throws {@link FetchPortfolioValueError}
4186
+ * Thrown on failure.
4187
+ *
4188
+ * @example
4189
+ * ```ts
4190
+ * const value = await fetchPortfolioValue(client, {
4191
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4192
+ * });
4193
+ *
4194
+ * // value: Value[]
4195
+ * ```
4196
+ */
4197
+ declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
4198
+ type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4199
+ /**
4200
+ * Fetches the total number of markets a wallet has traded.
4201
+ *
4202
+ * @throws {@link FetchTradedMarketCountError}
4203
+ * Thrown on failure.
4204
+ *
4205
+ * @example
4206
+ * ```ts
4207
+ * const traded = await fetchTradedMarketCount(client, {
4208
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4209
+ * });
4210
+ *
4211
+ * // traded === Traded
4212
+ * ```
4213
+ */
4214
+ declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
4215
+ type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4216
+ /**
4217
+ * Downloads an accounting snapshot archive for a wallet.
4218
+ *
4219
+ * @throws {@link DownloadAccountingSnapshotError}
4220
+ * Thrown on failure.
4221
+ *
4222
+ * @example
4223
+ * ```ts
4224
+ * const snapshot = await downloadAccountingSnapshot(client, {
4225
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4226
+ * });
4227
+ *
4228
+ * // snapshot === Blob
4229
+ * ```
4230
+ */
4231
+ declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
4232
+
4233
+ declare const PrepareSplitPositionRequestSchema: z.ZodObject<{
4234
+ amount: z.ZodBigInt;
4235
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4236
+ metadata: z.ZodOptional<z.ZodString>;
4237
+ }, z.core.$strip>;
4238
+ declare const PrepareMergePositionsRequestSchema: z.ZodObject<{
4239
+ amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodLiteral<"max">]>;
4240
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4241
+ metadata: z.ZodOptional<z.ZodString>;
4242
+ }, z.core.$strip>;
4243
+ declare const PrepareRedeemPositionsRequestSchema: z.ZodObject<{
4244
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4245
+ metadata: z.ZodOptional<z.ZodString>;
4246
+ }, z.core.$strip>;
4247
+ type SplitPositionWorkflowRequest = GaslessWorkflowRequest | SendSplitPositionTransactionRequest;
4248
+ type MergePositionsWorkflowRequest = GaslessWorkflowRequest | SendMergePositionsTransactionRequest;
4249
+ type RedeemPositionsWorkflowRequest = GaslessWorkflowRequest | SendRedeemPositionsTransactionRequest;
4250
+ type SplitPositionWorkflow = AsyncGenerator<SplitPositionWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4251
+ type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4252
+ type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4253
+ type PrepareSplitPositionRequest = z.input<typeof PrepareSplitPositionRequestSchema>;
4254
+ type PrepareMergePositionsRequest = z.input<typeof PrepareMergePositionsRequestSchema>;
4255
+ type PrepareRedeemPositionsRequest = z.input<typeof PrepareRedeemPositionsRequestSchema>;
4256
+ type PrepareSplitPositionError = UserInputError;
4257
+ type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4258
+ type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4259
+ /**
4260
+ * Starts a split workflow for a market condition.
4261
+ *
4262
+ * @example
4263
+ * ```ts
4264
+ * const handle = await prepareSplitPosition(client, {
4265
+ * amount: 1n,
4266
+ * conditionId:
4267
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4268
+ * }).then(completeWith(wallet));
4269
+ *
4270
+ * const outcome = await handle.wait();
4271
+ *
4272
+ * // outcome.transactionHash: TxHash
4273
+ * ```
4274
+ *
4275
+ * @throws {@link PrepareSplitPositionError}
4276
+ * Thrown on failure.
4277
+ */
4278
+ declare function prepareSplitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<SplitPositionWorkflow>;
4279
+ /**
4280
+ * Starts a workflow to merge complementary positions in a market back into collateral.
4281
+ *
4282
+ * @example
4283
+ * ```ts
4284
+ * const handle = await prepareMergePositions(client, {
4285
+ * amount: 'max',
4286
+ * conditionId:
4287
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4288
+ * }).then(completeWith(wallet));
4289
+ *
4290
+ * const outcome = await handle.wait();
4291
+ *
4292
+ * // outcome.transactionHash: TxHash
4293
+ * ```
4294
+ *
4295
+ * @throws {@link PrepareMergePositionsError}
4296
+ * Thrown on failure.
4297
+ */
4298
+ declare function prepareMergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<MergePositionsWorkflow>;
4299
+ /**
4300
+ * Starts a redemption workflow for resolved positions.
4301
+ *
4302
+ * @example
4303
+ * ```ts
4304
+ * const handle = await prepareRedeemPositions(client, {
4305
+ * conditionId:
4306
+ * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4307
+ * }).then(completeWith(wallet));
4308
+ *
4309
+ * const outcome = await handle.wait();
4310
+ *
4311
+ * // outcome.transactionHash: TxHash
4312
+ * ```
4313
+ *
4314
+ * @throws {@link PrepareRedeemPositionsError}
4315
+ * Thrown on failure.
4316
+ */
4317
+ declare function prepareRedeemPositions(client: BaseSecureClient, request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
4318
+
4319
+ declare const FetchPublicProfileRequestSchema: z.ZodObject<{
4320
+ address: z.ZodString;
4321
+ }, z.core.$strip>;
4322
+ type FetchPublicProfileRequest = z.input<typeof FetchPublicProfileRequestSchema>;
4323
+ type FetchPublicProfileError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4324
+ /**
4325
+ * Fetches a public profile by wallet address.
4326
+ *
4327
+ * @throws {@link FetchPublicProfileError}
4328
+ * Thrown on failure.
4329
+ *
4330
+ * @example
4331
+ * ```ts
4332
+ * const profile = await fetchPublicProfile(client, {
4333
+ * address: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4334
+ * });
4335
+ *
4336
+ * // profile === PublicProfile | null
4337
+ * ```
4338
+ */
4339
+ declare function fetchPublicProfile(client: BaseClient, request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
4340
+
4341
+ declare const SearchRequestSchema: z.ZodObject<{
4342
+ q: z.ZodString;
4343
+ ascending: z.ZodOptional<z.ZodBoolean>;
4344
+ cache: z.ZodOptional<z.ZodBoolean>;
4345
+ eventsStatus: z.ZodOptional<z.ZodString>;
4346
+ eventsTag: z.ZodOptional<z.ZodArray<z.ZodString>>;
4347
+ excludeTagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4348
+ keepClosedMarkets: z.ZodOptional<z.ZodNumber>;
4349
+ limitPerType: z.ZodOptional<z.ZodNumber>;
4350
+ optimized: z.ZodOptional<z.ZodBoolean>;
4351
+ page: z.ZodOptional<z.ZodNumber>;
4352
+ presets: z.ZodOptional<z.ZodArray<z.ZodString>>;
4353
+ recurrence: z.ZodOptional<z.ZodEnum<{
4354
+ daily: "daily";
4355
+ weekly: "weekly";
4356
+ monthly: "monthly";
4357
+ }>>;
4358
+ searchProfiles: z.ZodOptional<z.ZodBoolean>;
4359
+ searchTags: z.ZodOptional<z.ZodBoolean>;
4360
+ sort: z.ZodOptional<z.ZodString>;
4361
+ }, z.core.$strip>;
4362
+ type SearchRequest = z.input<typeof SearchRequestSchema>;
4363
+ type SearchError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4364
+ /**
4365
+ * Runs a public full-text search.
4366
+ *
4367
+ * @throws {@link SearchError}
4368
+ * Thrown on failure.
4369
+ *
4370
+ * @example
4371
+ * ```ts
4372
+ * const result = await search(client, {
4373
+ * q: 'trump',
4374
+ * limitPerType: 3,
4375
+ * });
4376
+ *
4377
+ * // result === PublicSearchResponse
4378
+ * ```
4379
+ */
4380
+ declare function search(client: BaseClient, request: SearchRequest): Promise<PublicSearchResponse>;
4381
+
4382
+ declare const ListSeriesRequestSchema: z.ZodObject<{
4383
+ ascending: z.ZodOptional<z.ZodBoolean>;
4384
+ categoriesIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4385
+ categoriesLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
4386
+ closed: z.ZodOptional<z.ZodBoolean>;
4387
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4388
+ excludeEvents: z.ZodOptional<z.ZodBoolean>;
4389
+ includeChat: z.ZodOptional<z.ZodBoolean>;
4390
+ locale: z.ZodOptional<z.ZodString>;
4391
+ order: z.ZodOptional<z.ZodString>;
4392
+ pageSize: z.ZodDefault<z.ZodNumber>;
4393
+ recurrence: z.ZodOptional<z.ZodEnum<{
4394
+ daily: "daily";
4395
+ weekly: "weekly";
4396
+ monthly: "monthly";
4397
+ }>>;
4398
+ slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
4399
+ }, z.core.$strip>;
4400
+ declare const FetchSeriesRequestSchema: z.ZodObject<{
4401
+ id: z.ZodString;
4402
+ includeChat: z.ZodOptional<z.ZodBoolean>;
4403
+ locale: z.ZodOptional<z.ZodString>;
4404
+ }, z.core.$strip>;
4405
+ type ListSeriesRequest = z.input<typeof ListSeriesRequestSchema>;
4406
+ type FetchSeriesRequest = z.input<typeof FetchSeriesRequestSchema>;
4407
+ type ListSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4408
+ /**
4409
+ * Lists series.
4410
+ *
4411
+ * @throws {@link ListSeriesError}
4412
+ * Thrown on failure.
4413
+ *
4414
+ * @example
4415
+ * Fetch the first page of results:
4416
+ * ```ts
4417
+ * const result = listSeries(client, {
4418
+ * closed: false,
4419
+ * pageSize: 10,
4420
+ * });
4421
+ *
4422
+ * const firstPage = await result.firstPage();
4423
+ *
4424
+ * // Optionally, fetch additional pages:
4425
+ * for await (const page of result.from(firstPage.nextCursor)) {
4426
+ * // page.items: Series[]
4427
+ * }
4428
+ * ```
4429
+ *
4430
+ * @example
4431
+ * Loop through all pages with `for await`:
4432
+ * ```ts
4433
+ * const result = listSeries(client, {
4434
+ * closed: false,
4435
+ * pageSize: 10,
4436
+ * });
4437
+ *
4438
+ * for await (const page of result) {
4439
+ * // page.items: Series[]
4440
+ * }
4441
+ * ```
4442
+ */
4443
+ declare function listSeries(client: BaseClient, request?: ListSeriesRequest): Paginated<Series>;
4444
+ type FetchSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4445
+ /**
4446
+ * Fetches a series.
4447
+ *
4448
+ * @throws {@link FetchSeriesError}
4449
+ * Thrown on failure.
4450
+ *
4451
+ * @example
4452
+ * ```ts
4453
+ * const series = await fetchSeries(client, {
4454
+ * id: 'fed-daily-series',
4455
+ * includeChat: true,
4456
+ * });
4457
+ *
4458
+ * // series === Series
4459
+ * ```
4460
+ */
4461
+ declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest): Promise<Series>;
4462
+
4463
+ declare const ListTagsRequestSchema: z.ZodObject<{
4464
+ ascending: z.ZodOptional<z.ZodBoolean>;
4465
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4466
+ includeChat: z.ZodOptional<z.ZodBoolean>;
4467
+ includeTemplate: z.ZodOptional<z.ZodBoolean>;
4468
+ isCarousel: z.ZodOptional<z.ZodBoolean>;
4469
+ locale: z.ZodOptional<z.ZodString>;
4470
+ order: z.ZodOptional<z.ZodString>;
4471
+ pageSize: z.ZodDefault<z.ZodNumber>;
4472
+ }, z.core.$strip>;
4473
+ declare const FetchTagRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
4474
+ id: z.ZodString;
4475
+ includeChat: z.ZodOptional<z.ZodBoolean>;
4476
+ includeTemplate: z.ZodOptional<z.ZodBoolean>;
4477
+ locale: z.ZodOptional<z.ZodString>;
4478
+ }, z.core.$strip>, z.ZodObject<{
4479
+ slug: z.ZodString;
4480
+ locale: z.ZodOptional<z.ZodString>;
4481
+ }, z.core.$strip>]>;
4482
+ declare const RelatedTagsByIdRequestSchema: z.ZodObject<{
4483
+ id: z.ZodString;
4484
+ omitEmpty: z.ZodOptional<z.ZodBoolean>;
4485
+ status: z.ZodOptional<z.ZodEnum<{
4486
+ closed: "closed";
4487
+ all: "all";
4488
+ active: "active";
4489
+ }>>;
4490
+ }, z.core.$strip>;
4491
+ declare const RelatedTagsBySlugRequestSchema: z.ZodObject<{
4492
+ slug: z.ZodString;
4493
+ }, z.core.$strip>;
4494
+ declare const RelatedTagResourcesByIdRequestSchema: z.ZodObject<{
4495
+ id: z.ZodString;
4496
+ locale: z.ZodOptional<z.ZodString>;
4497
+ omitEmpty: z.ZodOptional<z.ZodBoolean>;
4498
+ status: z.ZodOptional<z.ZodEnum<{
4499
+ closed: "closed";
4500
+ all: "all";
4501
+ active: "active";
4502
+ }>>;
4503
+ }, z.core.$strip>;
4504
+ declare const RelatedTagResourcesBySlugRequestSchema: z.ZodObject<{
4505
+ locale: z.ZodOptional<z.ZodString>;
4506
+ slug: z.ZodString;
4507
+ omitEmpty: z.ZodOptional<z.ZodBoolean>;
4508
+ status: z.ZodOptional<z.ZodEnum<{
4509
+ closed: "closed";
4510
+ all: "all";
4511
+ active: "active";
4512
+ }>>;
4513
+ }, z.core.$strip>;
4514
+ type ListTagsRequest = z.input<typeof ListTagsRequestSchema>;
4515
+ type FetchTagRequest = z.input<typeof FetchTagRequestSchema>;
4516
+ type FetchRelatedTagsRequest = z.input<typeof RelatedTagsByIdRequestSchema> | z.input<typeof RelatedTagsBySlugRequestSchema>;
4517
+ type FetchRelatedTagResourcesRequest = z.input<typeof RelatedTagResourcesByIdRequestSchema> | z.input<typeof RelatedTagResourcesBySlugRequestSchema>;
4518
+ type ListTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4519
+ /**
4520
+ * Lists tags.
4521
+ *
4522
+ * @throws {@link ListTagsError}
4523
+ * Thrown on failure.
4524
+ *
4525
+ * @example
4526
+ * Fetch the first page of results:
4527
+ * ```ts
4528
+ * const result = listTags(client, {
4529
+ * includeTemplate: true,
4530
+ * pageSize: 12,
4531
+ * });
4532
+ *
4533
+ * const firstPage = await result.firstPage();
4534
+ *
4535
+ * // Optionally, fetch additional pages:
4536
+ * for await (const page of result.from(firstPage.nextCursor)) {
4537
+ * // page.items: Tag[]
4538
+ * }
4539
+ * ```
4540
+ *
4541
+ * @example
4542
+ * Loop through all pages with `for await`:
4543
+ * ```ts
4544
+ * const result = listTags(client, {
4545
+ * includeTemplate: true,
4546
+ * pageSize: 12,
4547
+ * });
4548
+ *
4549
+ * for await (const page of result) {
4550
+ * // page.items: Tag[]
4551
+ * }
4552
+ * ```
4553
+ */
4554
+ declare function listTags(client: BaseClient, request?: ListTagsRequest): Paginated<Tag>;
4555
+ type FetchTagError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4556
+ /**
4557
+ * Fetches a tag by id or slug.
4558
+ *
4559
+ * @throws {@link FetchTagError}
4560
+ * Thrown on failure.
4561
+ *
4562
+ * @example
4563
+ * ```ts
4564
+ * const tag = await fetchTag(client, {
4565
+ * slug: 'politics',
4566
+ * locale: 'en',
4567
+ * });
4568
+ *
4569
+ * // tag === Tag
4570
+ * ```
4571
+ */
4572
+ declare function fetchTag(client: BaseClient, request: FetchTagRequest): Promise<Tag>;
4573
+ type FetchRelatedTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4574
+ /**
4575
+ * Fetches related tag relationships by id or slug.
4576
+ *
4577
+ * @throws {@link FetchRelatedTagsError}
4578
+ * Thrown on failure.
4579
+ *
4580
+ * @example
4581
+ * ```ts
4582
+ * const relatedTags = await fetchRelatedTags(client, {
4583
+ * id: '42',
4584
+ * status: 'active',
4585
+ * omitEmpty: true,
4586
+ * });
4587
+ *
4588
+ * // relatedTags: RelatedTag[]
4589
+ * ```
4590
+ */
4591
+ declare function fetchRelatedTags(client: BaseClient, request: FetchRelatedTagsRequest): Promise<RelatedTag[]>;
4592
+ type FetchRelatedTagResourcesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4593
+ /**
4594
+ * Fetches resources linked from related tag relationships by id or slug.
4595
+ *
4596
+ * @throws {@link FetchRelatedTagResourcesError}
4597
+ * Thrown on failure.
4598
+ *
4599
+ * @example
4600
+ * ```ts
4601
+ * const relatedResources = await fetchRelatedTagResources(client, {
4602
+ * slug: 'election',
4603
+ * status: 'active',
4604
+ * omitEmpty: true,
4605
+ * });
4606
+ *
4607
+ * // relatedResources: Tag[]
4608
+ * ```
4609
+ */
4610
+ declare function fetchRelatedTagResources(client: BaseClient, request: FetchRelatedTagResourcesRequest): Promise<Tag[]>;
4611
+
4612
+ declare const ListTeamsRequestSchema: z.ZodObject<{
4613
+ abbreviation: z.ZodOptional<z.ZodArray<z.ZodString>>;
4614
+ ascending: z.ZodOptional<z.ZodBoolean>;
4615
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4616
+ league: z.ZodOptional<z.ZodArray<z.ZodString>>;
4617
+ name: z.ZodOptional<z.ZodArray<z.ZodString>>;
4618
+ order: z.ZodOptional<z.ZodString>;
4619
+ pageSize: z.ZodDefault<z.ZodNumber>;
4620
+ providerId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4621
+ }, z.core.$strip>;
4622
+ type ListTeamsRequest = z.input<typeof ListTeamsRequestSchema>;
4623
+ type ListTeamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4624
+ /**
4625
+ * Lists teams.
4626
+ *
4627
+ * @throws {@link ListTeamsError}
4628
+ * Thrown on failure.
4629
+ *
4630
+ * @example
4631
+ * Fetch the first page of results:
4632
+ * ```ts
4633
+ * const result = listTeams(client, {
4634
+ * league: ['NBA'],
4635
+ * pageSize: 10,
4636
+ * });
4637
+ *
4638
+ * const firstPage = await result.firstPage();
4639
+ *
4640
+ * // Optionally, fetch additional pages:
4641
+ * for await (const page of result.from(firstPage.nextCursor)) {
4642
+ * // page.items: Team[]
4643
+ * }
4644
+ * ```
4645
+ *
4646
+ * @example
4647
+ * Loop through all pages with `for await`:
4648
+ * ```ts
4649
+ * const result = listTeams(client, {
4650
+ * league: ['NBA'],
4651
+ * pageSize: 10,
4652
+ * });
4653
+ *
4654
+ * for await (const page of result) {
4655
+ * // page.items: Team[]
4656
+ * }
4657
+ * ```
4658
+ */
4659
+ declare function listTeams(client: BaseClient, request?: ListTeamsRequest): Paginated<Team>;
4660
+
4661
+ type Erc20TransferWorkflowRequest = GaslessWorkflowRequest | SendErc20TransferTransactionRequest;
4662
+ type Erc20TransferWorkflow = AsyncGenerator<Erc20TransferWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
4663
+ declare const PrepareErc20TransferRequestSchema: z.ZodObject<{
4664
+ amount: z.ZodBigInt;
4665
+ metadata: z.ZodOptional<z.ZodString>;
4666
+ recipientAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
4667
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress$1, string>>;
4668
+ }, z.core.$strip>;
4669
+ type PrepareErc20TransferRequest = z.input<typeof PrepareErc20TransferRequestSchema>;
4670
+ type PrepareErc20TransferError = UserInputError;
4671
+ /**
4672
+ * Starts an ERC-20 transfer workflow.
4673
+ *
4674
+ * @example
4675
+ * ```ts
4676
+ * const handle = await prepareErc20Transfer(client, {
4677
+ * amount: 1n,
4678
+ * recipientAddress: client.account.signer,
4679
+ * tokenAddress: client.environment.collateralToken,
4680
+ * }).then(completeWith(wallet));
4681
+ *
4682
+ * const outcome = await handle.wait();
4683
+ *
4684
+ * // outcome.transactionHash: TxHash
4685
+ * ```
4686
+ *
4687
+ * @throws {@link PrepareErc20TransferError}
4688
+ * Thrown on failure.
4689
+ */
4690
+ declare function prepareErc20Transfer(client: BaseSecureClient, request: PrepareErc20TransferRequest): Promise<Erc20TransferWorkflow>;
4691
+
4692
+ type TypedDataField = {
4693
+ name: string;
4694
+ type: string;
4695
+ };
4696
+ type TypedData = Record<string, readonly TypedDataField[]>;
4697
+ type TypedDataDomain = {
4698
+ chainId?: number;
4699
+ name?: string;
4700
+ salt?: HexString;
4701
+ verifyingContract?: EvmAddress;
4702
+ version?: string;
4703
+ };
4704
+ type TypedDataPayload = {
4705
+ domain: TypedDataDomain;
4706
+ message: Record<string, unknown>;
4707
+ primaryType: string;
4708
+ types: TypedData;
4709
+ };
4710
+ type TransactionCall = {
4711
+ data: HexString;
4712
+ to: EvmAddress;
4713
+ value?: bigint;
4714
+ };
4715
+ interface ApiKeyAuthorization {
4716
+ }
4717
+ type TransactionOutcome = {
4718
+ /**
4719
+ * The hash of the settled transaction.
4720
+ */
4721
+ transactionHash: TxHash;
4722
+ /**
4723
+ * The unique identifier of the settled transaction when submitted through the Polymarket API,
4724
+ * or null if the transaction was submitted directly to the blockchain.
4725
+ */
4726
+ transactionId: TransactionId | null;
4727
+ };
4728
+ type WaitForTransactionError = WaitForGaslessTransactionError;
4729
+ interface TransactionHandle {
4730
+ /**
4731
+ * The hash of the submitted transaction, or null if the transaction is pending submission.
4732
+ */
4733
+ readonly transactionHash: TxHash | null;
4734
+ /**
4735
+ * The unique identifier of the submitted transaction when submitted through the Polymarket API,
4736
+ * or null if the transaction was submitted directly to the blockchain.
4737
+ */
4738
+ readonly transactionId: TransactionId | null;
4739
+ /**
4740
+ * Waits for the submitted transaction to settle.
4741
+ *
4742
+ * @throws {@link WaitForTransactionError}
4743
+ * Thrown when polling times out, the transaction reaches a terminal failure state, or a later read returns an unexpected response.
4744
+ */
4745
+ wait(): Promise<TransactionOutcome>;
4746
+ }
4747
+ interface DeployTransactionHandle extends TransactionHandle {
4748
+ /**
4749
+ * The deterministic address of the Safe wallet being deployed by this transaction.
4750
+ */
4751
+ readonly wallet: EvmAddress;
4752
+ }
4753
+
4754
+ export { type TypedDataField as $, type AuthenticateWith as A, type BaseClient as B, type CompleteWith as C, type DataActions as D, type EnvironmentConfig as E, type FreshAuthenticationRequest as F, RequestRejectedError as G, type RequestRejectedErrorOptions as H, InsufficientLiquidityError as I, type RewardsActions as J, type RewardsPublicActions as K, type SecureClient as L, type SecureWalletActions as M, type SessionSnapshot as N, SigningError as O, type Page as P, TimeoutError as Q, RateLimitError as R, type SecureActions as S, type TypedDataPayload as T, UserInputError as U, type TradingActions as V, TransactionFailedError as W, type TransactionHandle as X, type TransactionOutcome as Y, TransportError as Z, type TypedDataDomain as _, type TypedData as a, type FetchMidpointsRequest as a$, UnexpectedResponseError as a0, type WaitForTransactionError as a1, type WalletDerivationConfig as a2, accountActions as a3, allActions as a4, analyticsActions as a5, createPublicClient as a6, dataActions as a7, discoveryActions as a8, production as a9, type FetchBalanceAllowanceError as aA, type FetchBalanceAllowanceRequest as aB, type FetchClosedOnlyModeError as aC, type FetchCommentsByIdError as aD, type FetchCommentsByIdRequest as aE, type FetchEventError as aF, type FetchEventLiveVolumeError as aG, type FetchEventLiveVolumeRequest as aH, type FetchEventRequest as aI, type FetchEventTagsError as aJ, type FetchEventTagsRequest as aK, type FetchExecuteParamsError as aL, type FetchExecuteParamsRequest as aM, type FetchFeeRateError as aN, type FetchFeeRateRequest as aO, type FetchGaslessTransactionRequest as aP, type FetchLastTradePriceError as aQ, type FetchLastTradePriceRequest as aR, type FetchLastTradePricesError as aS, type FetchLastTradePricesRequest as aT, type FetchMarketError as aU, type FetchMarketRequest as aV, type FetchMarketTagsError as aW, type FetchMarketTagsRequest as aX, type FetchMidpointError as aY, type FetchMidpointRequest as aZ, type FetchMidpointsError as a_, rewardsActions as aa, tradingActions as ab, walletActions as ac, type PrepareLimitOrderRequest as ad, type OrderWorkflow as ae, type OrderPostingWorkflow as af, type PrepareMarketOrderRequest as ag, type CancelAllError as ah, type CancelMarketOrdersError as ai, type CancelMarketOrdersRequest as aj, type CancelOrderError as ak, type CancelOrderRequest as al, type CancelOrdersError as am, type CancelOrdersRequest as an, type DownloadAccountingSnapshotError as ao, type DownloadAccountingSnapshotRequest as ap, type DropNotificationsError as aq, type DropNotificationsRequest as ar, type Erc1155ApprovalForAllWorkflow as as, type Erc1155ApprovalForAllWorkflowRequest as at, type Erc20ApprovalWorkflow as au, type Erc20ApprovalWorkflowRequest as av, type Erc20TransferWorkflow as aw, type Erc20TransferWorkflowRequest as ax, type EstimateMarketPriceError as ay, type EstimateMarketPriceRequest as az, type TransactionCall as b, type ListCommentsError as b$, type FetchNegRiskError as b0, type FetchNegRiskRequest as b1, type FetchNotificationsError as b2, type FetchOrderBookError as b3, type FetchOrderBookRequest as b4, type FetchOrderBooksError as b5, type FetchOrderBooksRequest as b6, type FetchOrderError as b7, type FetchOrderRequest as b8, type FetchOrderScoringError as b9, type FetchTickSizeError as bA, type FetchTickSizeRequest as bB, type FetchTotalEarningsForUserForDayError as bC, type FetchTotalEarningsForUserForDayRequest as bD, type FetchTradedMarketCountError as bE, type FetchTradedMarketCountRequest as bF, GaslessTransactionMetadataSchema as bG, type GaslessWalletWorkflow as bH, type GaslessWalletWorkflowRequest as bI, type GaslessWorkflow as bJ, type GaslessWorkflowRequest as bK, type IsGaslessReadyError as bL, type IsGaslessReadyRequest as bM, type ListAccountTradesError as bN, type ListAccountTradesRequest as bO, type ListActivityError as bP, type ListActivityRequest as bQ, type ListBuilderLeaderboardError as bR, type ListBuilderLeaderboardRequest as bS, type ListBuilderTradesError as bT, type ListBuilderTradesRequest as bU, type ListBuilderVolumeError as bV, type ListBuilderVolumeRequest as bW, type ListClosedPositionsError as bX, type ListClosedPositionsRequest as bY, type ListCommentsByUserAddressError as bZ, type ListCommentsByUserAddressRequest as b_, type FetchOrderScoringRequest as ba, type FetchOrdersScoringError as bb, type FetchOrdersScoringRequest as bc, type FetchPortfolioValueError as bd, type FetchPortfolioValueRequest as be, type FetchPriceError as bf, type FetchPriceHistoryError as bg, type FetchPriceHistoryRequest as bh, type FetchPriceRequest as bi, type FetchPricesError as bj, type FetchPricesRequest as bk, type FetchPublicProfileError as bl, type FetchPublicProfileRequest as bm, type FetchRelatedTagResourcesError as bn, type FetchRelatedTagResourcesRequest as bo, type FetchRelatedTagsError as bp, type FetchRelatedTagsRequest as bq, type FetchRewardPercentagesError as br, type FetchSeriesError as bs, type FetchSeriesRequest as bt, type FetchSpreadError as bu, type FetchSpreadRequest as bv, type FetchSpreadsError as bw, type FetchSpreadsRequest as bx, type FetchTagError as by, type FetchTagRequest as bz, type ApiKeyAuthorization as c, type TradingApprovalsWorkflow as c$, type ListCommentsRequest as c0, type ListCurrentRewardsError as c1, type ListCurrentRewardsRequest as c2, type ListEventsError as c3, type ListEventsRequest as c4, type ListMarketHoldersError as c5, type ListMarketHoldersRequest as c6, type ListMarketPositionsError as c7, type ListMarketPositionsRequest as c8, type ListMarketRewardsError as c9, type OrderWorkflowRequest as cA, type PostOrderError as cB, type PostOrdersError as cC, type PostOrdersRequest as cD, type PrepareErc1155ApprovalForAllError as cE, type PrepareErc1155ApprovalForAllRequest as cF, type PrepareErc20ApprovalError as cG, type PrepareErc20ApprovalRequest as cH, type PrepareErc20TransferError as cI, type PrepareErc20TransferRequest as cJ, type PrepareGaslessTransactionError as cK, type PrepareGaslessTransactionRequest as cL, type PrepareGaslessWalletError as cM, type PrepareMergePositionsError as cN, type PrepareMergePositionsRequest as cO, type PrepareRedeemPositionsError as cP, type PrepareRedeemPositionsRequest as cQ, type PrepareSplitPositionError as cR, type PrepareSplitPositionRequest as cS, type PrepareTradingApprovalsError as cT, type RedeemPositionsWorkflow as cU, type RedeemPositionsWorkflowRequest as cV, type SearchError as cW, type SearchRequest as cX, type SignedOrder as cY, type SplitPositionWorkflow as cZ, type SplitPositionWorkflowRequest as c_, type ListMarketRewardsRequest as ca, type ListMarketsError as cb, type ListMarketsRequest as cc, type ListOpenInterestError as cd, type ListOpenInterestRequest as ce, type ListOpenOrdersError as cf, type ListOpenOrdersRequest as cg, type ListPositionsError as ch, type ListPositionsRequest as ci, type ListSeriesError as cj, type ListSeriesRequest as ck, type ListTagsError as cl, type ListTagsRequest as cm, type ListTeamsError as cn, type ListTeamsRequest as co, type ListTraderLeaderboardError as cp, type ListTraderLeaderboardRequest as cq, type ListTradesError as cr, type ListTradesRequest as cs, type ListUserEarningsAndMarketsConfigError as ct, type ListUserEarningsAndMarketsConfigRequest as cu, type ListUserEarningsForDayError as cv, type ListUserEarningsForDayRequest as cw, type MergePositionsWorkflow as cx, type MergePositionsWorkflowRequest as cy, type OrderDraft as cz, type AccountActions as d, listMarkets as d$, type TradingApprovalsWorkflowRequest as d0, type UpdateBalanceAllowanceError as d1, type UpdateBalanceAllowanceRequest as d2, type WaitForGaslessTransactionError as d3, cancelAll as d4, cancelMarketOrders as d5, cancelOrder as d6, cancelOrders as d7, downloadAccountingSnapshot as d8, dropNotifications as d9, fetchPriceHistory as dA, fetchPrices as dB, fetchPublicProfile as dC, fetchRelatedTagResources as dD, fetchRelatedTags as dE, fetchRewardPercentages as dF, fetchSeries as dG, fetchSpread as dH, fetchSpreads as dI, fetchTag as dJ, fetchTickSize as dK, fetchTotalEarningsForUserForDay as dL, fetchTradedMarketCount as dM, fetchTransaction as dN, isGaslessReady as dO, listAccountTrades as dP, listActivity as dQ, listBuilderLeaderboard as dR, listBuilderTrades as dS, listClosedPositions as dT, listComments as dU, listCommentsByUserAddress as dV, listCurrentRewards as dW, listEvents as dX, listMarketHolders as dY, listMarketPositions as dZ, listMarketRewards as d_, estimateMarketPrice as da, fetchBalanceAllowance as db, fetchBuilderVolume as dc, fetchClosedOnlyMode as dd, fetchCommentsById as de, fetchEvent as df, fetchEventLiveVolume as dg, fetchEventTags as dh, fetchExecuteParams as di, fetchFeeRate as dj, fetchLastTradePrice as dk, fetchLastTradePrices as dl, fetchMarket as dm, fetchMarketTags as dn, fetchMidpoint as dp, fetchMidpoints as dq, fetchNegRisk as dr, fetchNotifications as ds, fetchOrder as dt, fetchOrderBook as du, fetchOrderBooks as dv, fetchOrderScoring as dw, fetchOrdersScoring as dx, fetchPortfolioValue as dy, fetchPrice as dz, type AccountIdentity as e, listOpenInterest as e0, listOpenOrders as e1, listPositions as e2, listSeries as e3, listTags as e4, listTeams as e5, listTraderLeaderboard as e6, listTrades as e7, listUserEarningsAndMarketsConfig as e8, listUserEarningsForDay as e9, postOrder as ea, postOrders as eb, prepareErc1155ApprovalForAll as ec, prepareErc20Approval as ed, prepareErc20Transfer as ee, prepareGaslessTransaction as ef, prepareGaslessWallet as eg, prepareMergePositions as eh, prepareRedeemPositions as ei, prepareSplitPosition as ej, prepareTradingApprovals as ek, search as el, updateBalanceAllowance as em, type AccountPublicActions as f, type AnalyticsActions as g, type AuthenticateWithError as h, type AuthenticationWorkflow as i, type AuthenticationWorkflowRequest as j, BasePublicClient as k, BaseSecureClient as l, type BeginAuthenticationRequest as m, CancelledSigningError as n, type Client as o, type ClientActions as p, type ClientDecorator as q, type CompleteWithError as r, type DeployTransactionHandle as s, type DiscoveryActions as t, PageSizeSchema as u, type Paginated as v, type PublicActions as w, type PublicClient as x, type PublicClientOptions as y, type PublicWalletActions as z };