@polymarket/client 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +4 -3
- package/dist/actions/index.js +1 -1
- package/dist/chunk-DLZLJOGO.js +6 -0
- package/dist/chunk-DLZLJOGO.js.map +1 -0
- package/dist/chunk-ENQH6V4J.js +3 -0
- package/dist/chunk-ENQH6V4J.js.map +1 -0
- package/dist/chunk-ZH5ERGHG.js +2 -0
- package/dist/chunk-ZH5ERGHG.js.map +1 -0
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/ethers-v5.js +1 -1
- package/dist/ethers-v5.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/privy.js +1 -1
- package/dist/{sports-BPp6UXlR.d.ts → sports-w2Iai7fW.d.ts} +1 -1
- package/dist/{types-RGx7fNNl.d.ts → types-C4sR5GA8.d.ts} +395 -46
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/dist/viem.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-DB2YMGIT.js +0 -3
- package/dist/chunk-DB2YMGIT.js.map +0 -1
- package/dist/chunk-MCGT5BAF.js +0 -6
- package/dist/chunk-MCGT5BAF.js.map +0 -1
- package/dist/chunk-O4EZ2N7U.js +0 -2
- package/dist/chunk-O4EZ2N7U.js.map +0 -1
|
@@ -1,19 +1,61 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
|
-
import { PaginationCursor, DecimalString, BuilderCode, OrderSide, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue,
|
|
3
|
-
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, TxHash as TxHash$1 } from '@polymarket/types';
|
|
2
|
+
import { TransactionId, PaginationCursor, DecimalString, BuilderCode, OrderSide, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, SessionSignerScope } from '@polymarket/bindings';
|
|
3
|
+
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, SessionSignerSignature, TxHash as TxHash$1 } from '@polymarket/types';
|
|
4
4
|
import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
5
5
|
import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
|
|
6
6
|
import { ZodError, z } from 'zod';
|
|
7
7
|
import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
|
|
8
8
|
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
9
9
|
import * as _polymarket_bindings_data from '@polymarket/bindings/data';
|
|
10
|
-
import { Activity, ComboActivity, Trade, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
|
|
10
|
+
import { Activity, ComboActivity, Trade, ComboPositionStatus, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
|
|
11
11
|
import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
|
|
12
12
|
import { ComboMarket, RfqRejectionCode, RfqQuoteId, RfqId, ComboAcceptFailureReason, BuilderRfqError, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, ComboQuoteUnavailableReason, RfqStatus, RfqErrorCode, BuilderRfqStatusResponse, CollateralReturnPlanResponse } from '@polymarket/bindings/combos';
|
|
13
13
|
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsSortDirection, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsOrder, PerpsOrderId, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsAutoCancelStatus, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsNotificationEntry, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
14
14
|
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, CryptoPricesChainlinkTwapTopic, CryptoPricesChainlinkTwapWindowSeconds, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
15
15
|
import { Hex } from 'ox';
|
|
16
16
|
|
|
17
|
+
/** Independent rate-limit bucket affected by an order or cancellation. */
|
|
18
|
+
type RateLimitBucket = 'order' | 'cancel';
|
|
19
|
+
/**
|
|
20
|
+
* Per-signer rate-limit state reported by order and cancellation responses.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Fields mirror the `Poly-RateLimit-*` response headers. `remaining` and
|
|
24
|
+
* `reset` are normally reported together, while `tier` can be absent. These
|
|
25
|
+
* fields remain optional because malformed header values are ignored;
|
|
26
|
+
* `warning` is `false` whenever the response does not report warning mode.
|
|
27
|
+
*/
|
|
28
|
+
type RateLimitUpdate = {
|
|
29
|
+
/** Rate-limit bucket affected by the request, when that request declares one. */
|
|
30
|
+
bucket?: RateLimitBucket;
|
|
31
|
+
/**
|
|
32
|
+
* Token balance remaining in the applicable rate-limit bucket after the
|
|
33
|
+
* request was accounted for. Can be negative for tiers that allow a
|
|
34
|
+
* negative cancellation balance. A value of `0` alone does not prove the
|
|
35
|
+
* bucket is exhausted because it can also be reported when no active limit
|
|
36
|
+
* applies; do not back off solely because this value is zero.
|
|
37
|
+
*/
|
|
38
|
+
remaining?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Unix timestamp, in seconds, when the current rate-limit wait period ends.
|
|
41
|
+
*/
|
|
42
|
+
reset?: number;
|
|
43
|
+
/** Rate-limit tier applied to the request. */
|
|
44
|
+
tier?: string;
|
|
45
|
+
/**
|
|
46
|
+
* `true` when the limiter runs in warning mode and the request would have
|
|
47
|
+
* been rejected under live enforcement. Monitor this to adjust request
|
|
48
|
+
* patterns before enforcement begins.
|
|
49
|
+
*/
|
|
50
|
+
warning: boolean;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Listener invoked whenever a response reports per-signer rate-limit state.
|
|
54
|
+
* The listener may return a promise; synchronous errors and promise rejections
|
|
55
|
+
* are ignored.
|
|
56
|
+
*/
|
|
57
|
+
type RateLimitUpdateListener = (update: RateLimitUpdate) => void;
|
|
58
|
+
|
|
17
59
|
type ResponseValidationContext = {
|
|
18
60
|
endpoint: string;
|
|
19
61
|
};
|
|
@@ -87,6 +129,17 @@ declare class ConnectionLostError extends PolymarketError {
|
|
|
87
129
|
readonly reason: string;
|
|
88
130
|
constructor(message: string, options: ErrorOptions & ConnectionLostErrorOptions);
|
|
89
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Trading restriction reported by the venue while orders cannot be placed
|
|
134
|
+
* normally. The SDK does not retry automatically; callers decide how to
|
|
135
|
+
* react, honoring {@link RequestRejectedError.retryAfter} when provided.
|
|
136
|
+
*/
|
|
137
|
+
declare enum TradingRestriction {
|
|
138
|
+
/** The matching engine is restarting and rejects order requests until it is back. */
|
|
139
|
+
RESTARTING = "restarting",
|
|
140
|
+
/** Cancels and post-only orders are accepted; other orders are rejected. */
|
|
141
|
+
POST_ONLY = "post_only"
|
|
142
|
+
}
|
|
90
143
|
type RequestRejectedErrorOptions = {
|
|
91
144
|
status: number;
|
|
92
145
|
/**
|
|
@@ -99,6 +152,11 @@ type RequestRejectedErrorOptions = {
|
|
|
99
152
|
* provided one.
|
|
100
153
|
*/
|
|
101
154
|
retryAfter?: number;
|
|
155
|
+
/**
|
|
156
|
+
* Trading restriction that caused the rejection, when the response
|
|
157
|
+
* identified one.
|
|
158
|
+
*/
|
|
159
|
+
restriction?: TradingRestriction;
|
|
102
160
|
};
|
|
103
161
|
/**
|
|
104
162
|
* Error thrown when a service responds with a non-success status other than
|
|
@@ -117,6 +175,11 @@ declare class RequestRejectedError extends PolymarketError {
|
|
|
117
175
|
* provided one.
|
|
118
176
|
*/
|
|
119
177
|
readonly retryAfter?: number;
|
|
178
|
+
/**
|
|
179
|
+
* Trading restriction that caused the rejection, when the response
|
|
180
|
+
* identified one.
|
|
181
|
+
*/
|
|
182
|
+
readonly restriction?: TradingRestriction;
|
|
120
183
|
constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
|
|
121
184
|
}
|
|
122
185
|
type RateLimitErrorOptions = {
|
|
@@ -125,6 +188,11 @@ type RateLimitErrorOptions = {
|
|
|
125
188
|
* provided one.
|
|
126
189
|
*/
|
|
127
190
|
retryAfter?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Rate-limit state reported with the rejection, when the response provided
|
|
193
|
+
* it.
|
|
194
|
+
*/
|
|
195
|
+
rateLimit?: RateLimitUpdate;
|
|
128
196
|
};
|
|
129
197
|
/**
|
|
130
198
|
* Error thrown when the service rejects a request because the rate limit has
|
|
@@ -137,6 +205,11 @@ declare class RateLimitError extends PolymarketError {
|
|
|
137
205
|
* provided one.
|
|
138
206
|
*/
|
|
139
207
|
readonly retryAfter?: number;
|
|
208
|
+
/**
|
|
209
|
+
* Rate-limit state reported with the rejection, when the response provided
|
|
210
|
+
* it.
|
|
211
|
+
*/
|
|
212
|
+
readonly rateLimit?: RateLimitUpdate;
|
|
140
213
|
constructor(message: string, options?: ErrorOptions & RateLimitErrorOptions);
|
|
141
214
|
}
|
|
142
215
|
/**
|
|
@@ -261,7 +334,7 @@ declare const FetchExecuteParamsError: {
|
|
|
261
334
|
*/
|
|
262
335
|
declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest): Promise<RelayerExecuteParams>;
|
|
263
336
|
declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
|
|
264
|
-
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
337
|
+
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
|
|
265
338
|
}, z.core.$strip>;
|
|
266
339
|
type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
|
|
267
340
|
declare const IsWalletDeployedRequestSchema: z.ZodObject<{
|
|
@@ -687,17 +760,24 @@ declare const ListClosedPositionsError: {
|
|
|
687
760
|
* ```
|
|
688
761
|
*/
|
|
689
762
|
declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
763
|
+
/**
|
|
764
|
+
* One status or a non-empty ordered list of statuses for filtering combo positions.
|
|
765
|
+
* Pass multiple statuses as an array rather than a comma-separated string.
|
|
766
|
+
*/
|
|
767
|
+
type ComboPositionStatusFilter = ComboPositionStatus | readonly [ComboPositionStatus, ...ComboPositionStatus[]];
|
|
690
768
|
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
691
769
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
692
770
|
user: z.ZodString;
|
|
693
771
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
694
|
-
status: z.ZodOptional<z.ZodEnum<typeof
|
|
772
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ComboPositionStatus>, z.ZodTuple<[z.ZodEnum<typeof ComboPositionStatus>], z.ZodEnum<typeof ComboPositionStatus>>]>>;
|
|
695
773
|
sort: z.ZodOptional<z.ZodEnum<typeof ComboPositionSort>>;
|
|
696
774
|
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>]>>;
|
|
697
775
|
updatedAfter: z.ZodOptional<z.ZodNumber>;
|
|
698
776
|
updatedBefore: z.ZodOptional<z.ZodNumber>;
|
|
699
777
|
}, z.core.$strip>;
|
|
700
|
-
type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema
|
|
778
|
+
type ListComboPositionsRequest = Omit<z.input<typeof ListComboPositionsRequestSchema>, 'status'> & {
|
|
779
|
+
status?: ComboPositionStatusFilter;
|
|
780
|
+
};
|
|
701
781
|
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
702
782
|
declare const ListComboPositionsError: {
|
|
703
783
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -737,6 +817,20 @@ declare const ListComboPositionsError: {
|
|
|
737
817
|
* ```
|
|
738
818
|
*
|
|
739
819
|
* @example
|
|
820
|
+
* Filter to any of several resolved statuses. Pass multiple statuses as an
|
|
821
|
+
* array rather than a comma-separated string:
|
|
822
|
+
* ```ts
|
|
823
|
+
* const result = listComboPositions(client, {
|
|
824
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
825
|
+
* status: [
|
|
826
|
+
* ComboPositionStatus.ResolvedWin,
|
|
827
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
828
|
+
* ComboPositionStatus.ResolvedLoss,
|
|
829
|
+
* ],
|
|
830
|
+
* });
|
|
831
|
+
* ```
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
740
834
|
* Incrementally sync changed combo positions:
|
|
741
835
|
* ```ts
|
|
742
836
|
* const result = listComboPositions(client, {
|
|
@@ -976,6 +1070,19 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
976
1070
|
*
|
|
977
1071
|
* const firstPage = await paginator.firstPage();
|
|
978
1072
|
* ```
|
|
1073
|
+
*
|
|
1074
|
+
* @example
|
|
1075
|
+
* Filter to any of several resolved statuses:
|
|
1076
|
+
* ```ts
|
|
1077
|
+
* const paginator = client.listComboPositions({
|
|
1078
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1079
|
+
* status: [
|
|
1080
|
+
* ComboPositionStatus.ResolvedWin,
|
|
1081
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
1082
|
+
* ComboPositionStatus.ResolvedLoss,
|
|
1083
|
+
* ],
|
|
1084
|
+
* });
|
|
1085
|
+
* ```
|
|
979
1086
|
*/
|
|
980
1087
|
listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
981
1088
|
/**
|
|
@@ -1113,6 +1220,17 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1113
1220
|
*
|
|
1114
1221
|
* @throws {@link ListComboPositionsError}
|
|
1115
1222
|
* Thrown on failure.
|
|
1223
|
+
*
|
|
1224
|
+
* @example
|
|
1225
|
+
* Filter the authenticated account's positions to multiple statuses:
|
|
1226
|
+
* ```ts
|
|
1227
|
+
* const paginator = client.listComboPositions({
|
|
1228
|
+
* status: [
|
|
1229
|
+
* ComboPositionStatus.ResolvedWin,
|
|
1230
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
1231
|
+
* ],
|
|
1232
|
+
* });
|
|
1233
|
+
* ```
|
|
1116
1234
|
*/
|
|
1117
1235
|
listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
1118
1236
|
/**
|
|
@@ -1198,6 +1316,7 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1198
1316
|
listAccountTrades(request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
|
|
1199
1317
|
/**
|
|
1200
1318
|
* Fetches notifications for the authenticated account.
|
|
1319
|
+
* Notifications of a kind this SDK version does not recognize are omitted.
|
|
1201
1320
|
*
|
|
1202
1321
|
* @throws {@link FetchNotificationsError}
|
|
1203
1322
|
* Thrown on failure.
|
|
@@ -1536,6 +1655,15 @@ type DataActions = {
|
|
|
1536
1655
|
* amount: 10,
|
|
1537
1656
|
* });
|
|
1538
1657
|
* ```
|
|
1658
|
+
*
|
|
1659
|
+
* @example Position-backed outcome
|
|
1660
|
+
* ```ts
|
|
1661
|
+
* const price = await client.estimateMarketPrice({
|
|
1662
|
+
* positionId: '456',
|
|
1663
|
+
* side: OrderSide.SELL,
|
|
1664
|
+
* shares: 10,
|
|
1665
|
+
* });
|
|
1666
|
+
* ```
|
|
1539
1667
|
*/
|
|
1540
1668
|
estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
|
|
1541
1669
|
/**
|
|
@@ -2755,9 +2883,9 @@ interface RfqSession extends AsyncIterable<RfqEvent> {
|
|
|
2755
2883
|
*/
|
|
2756
2884
|
close(): Promise<void>;
|
|
2757
2885
|
}
|
|
2758
|
-
type OpenRfqSessionError = ConnectionLostError | TransportError;
|
|
2886
|
+
type OpenRfqSessionError = ConnectionLostError | TransportError | UserInputError;
|
|
2759
2887
|
declare const OpenRfqSessionError: {
|
|
2760
|
-
isError(error: unknown): error is TransportError | ConnectionLostError;
|
|
2888
|
+
isError(error: unknown): error is TransportError | UserInputError | ConnectionLostError;
|
|
2761
2889
|
};
|
|
2762
2890
|
/**
|
|
2763
2891
|
* Opens an RFQ event session.
|
|
@@ -3337,6 +3465,64 @@ type SecureRfqActions = {
|
|
|
3337
3465
|
};
|
|
3338
3466
|
declare function rfqActions(client: BaseSecureClient): SecureRfqActions;
|
|
3339
3467
|
|
|
3468
|
+
type SessionKeyActions = {
|
|
3469
|
+
/**
|
|
3470
|
+
* Authorizes an externally managed signer for selected venues.
|
|
3471
|
+
*
|
|
3472
|
+
* The SDK receives only the public address. The application remains
|
|
3473
|
+
* responsible for generating, storing, and protecting the private key.
|
|
3474
|
+
* When scopes are omitted, authorization defaults to `ALL`.
|
|
3475
|
+
* Requires builder API-key authentication.
|
|
3476
|
+
*
|
|
3477
|
+
* @remarks
|
|
3478
|
+
* Resolves after the submitted transaction is confirmed and the session key
|
|
3479
|
+
* appears in the active session-key list.
|
|
3480
|
+
*
|
|
3481
|
+
* @example
|
|
3482
|
+
* ```ts
|
|
3483
|
+
* const authorization = await client.authorizeSessionKey({
|
|
3484
|
+
* address: sessionAddress,
|
|
3485
|
+
* validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
|
|
3486
|
+
* });
|
|
3487
|
+
* ```
|
|
3488
|
+
*
|
|
3489
|
+
* @throws {@link AuthorizeSessionKeyError}
|
|
3490
|
+
* Thrown on failure.
|
|
3491
|
+
*/
|
|
3492
|
+
authorizeSessionKey(request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
|
|
3493
|
+
/**
|
|
3494
|
+
* Fetches the active session keys authorized for the Deposit Wallet.
|
|
3495
|
+
*
|
|
3496
|
+
* @example
|
|
3497
|
+
* ```ts
|
|
3498
|
+
* const sessionKeys = await client.fetchSessionKeys();
|
|
3499
|
+
* ```
|
|
3500
|
+
*
|
|
3501
|
+
* @throws {@link FetchSessionKeysError}
|
|
3502
|
+
* Thrown on failure.
|
|
3503
|
+
*/
|
|
3504
|
+
fetchSessionKeys(): Promise<SessionKey[]>;
|
|
3505
|
+
/**
|
|
3506
|
+
* Revokes a session key authorized for the Deposit Wallet.
|
|
3507
|
+
*
|
|
3508
|
+
* Revocation may take several minutes while existing activity is canceled and
|
|
3509
|
+
* the on-chain revocation is confirmed.
|
|
3510
|
+
* Requires API-key authentication that supports gasless transactions.
|
|
3511
|
+
*
|
|
3512
|
+
* @example
|
|
3513
|
+
* ```ts
|
|
3514
|
+
* const revocation = await client.revokeSessionKey({
|
|
3515
|
+
* address: sessionAddress,
|
|
3516
|
+
* });
|
|
3517
|
+
* ```
|
|
3518
|
+
*
|
|
3519
|
+
* @throws {@link RevokeSessionKeyError}
|
|
3520
|
+
* Thrown on failure.
|
|
3521
|
+
*/
|
|
3522
|
+
revokeSessionKey(request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
|
|
3523
|
+
};
|
|
3524
|
+
declare function sessionKeyActions(client: BaseSecureClient): SessionKeyActions;
|
|
3525
|
+
|
|
3340
3526
|
type PublicSubscriptionsActions = {
|
|
3341
3527
|
/**
|
|
3342
3528
|
* Starts one or more realtime subscriptions on this client.
|
|
@@ -3486,9 +3672,20 @@ declare const CancelMarketOrdersError: {
|
|
|
3486
3672
|
*/
|
|
3487
3673
|
declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
|
|
3488
3674
|
|
|
3489
|
-
|
|
3490
|
-
|
|
3675
|
+
/**
|
|
3676
|
+
* Identifies the asset to trade. Provide exactly one identifier.
|
|
3677
|
+
*/
|
|
3678
|
+
type OrderAsset = {
|
|
3679
|
+
/** CTF token identifier. */
|
|
3491
3680
|
tokenId: string;
|
|
3681
|
+
positionId?: never;
|
|
3682
|
+
} | {
|
|
3683
|
+
/** Polymarket V2 position identifier. */
|
|
3684
|
+
positionId: string;
|
|
3685
|
+
tokenId?: never;
|
|
3686
|
+
};
|
|
3687
|
+
|
|
3688
|
+
type EstimateMarketBuyPriceRequest = OrderAsset & {
|
|
3492
3689
|
/** Buy side of the estimate. */
|
|
3493
3690
|
side: OrderSide.BUY;
|
|
3494
3691
|
/** Desired USD buy notional to match against current ask depth. */
|
|
@@ -3500,9 +3697,7 @@ type EstimateMarketBuyPriceRequest = {
|
|
|
3500
3697
|
*/
|
|
3501
3698
|
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3502
3699
|
};
|
|
3503
|
-
type EstimateMarketSellPriceRequest = {
|
|
3504
|
-
/** TokenID of the Conditional token asset to estimate. */
|
|
3505
|
-
tokenId: string;
|
|
3700
|
+
type EstimateMarketSellPriceRequest = OrderAsset & {
|
|
3506
3701
|
/** Sell side of the estimate. */
|
|
3507
3702
|
side: OrderSide.SELL;
|
|
3508
3703
|
/** Number of conditional-token shares to match against current bid depth. */
|
|
@@ -3547,14 +3742,21 @@ declare const EstimateMarketPriceError: {
|
|
|
3547
3742
|
* // price === 0.53
|
|
3548
3743
|
* ```
|
|
3549
3744
|
*
|
|
3745
|
+
* @example Position-backed outcome
|
|
3746
|
+
* ```ts
|
|
3747
|
+
* const price = await estimateMarketPrice(client, {
|
|
3748
|
+
* positionId: '456',
|
|
3749
|
+
* side: OrderSide.SELL,
|
|
3750
|
+
* shares: 10,
|
|
3751
|
+
* });
|
|
3752
|
+
* ```
|
|
3753
|
+
*
|
|
3550
3754
|
* @throws {@link EstimateMarketPriceError}
|
|
3551
3755
|
* Thrown on failure.
|
|
3552
3756
|
*/
|
|
3553
3757
|
declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
|
|
3554
3758
|
|
|
3555
|
-
type BasePrepareMarketOrderRequest = {
|
|
3556
|
-
/** TokenID of the Conditional token asset being traded */
|
|
3557
|
-
tokenId: string;
|
|
3759
|
+
type BasePrepareMarketOrderRequest = OrderAsset & {
|
|
3558
3760
|
/** Optional builder attribution code. */
|
|
3559
3761
|
builderCode?: HexString;
|
|
3560
3762
|
/**
|
|
@@ -3603,7 +3805,7 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
|
|
|
3603
3805
|
/** Sell side of the order. */
|
|
3604
3806
|
side: OrderSide.SELL;
|
|
3605
3807
|
/**
|
|
3606
|
-
* Number of outcome
|
|
3808
|
+
* Number of outcome shares to sell.
|
|
3607
3809
|
*
|
|
3608
3810
|
* This is the human-readable token amount: `1` means one full share, not one
|
|
3609
3811
|
* 6-decimal base unit.
|
|
@@ -3620,13 +3822,11 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
|
|
|
3620
3822
|
minPrice?: number | string;
|
|
3621
3823
|
};
|
|
3622
3824
|
type PrepareMarketOrderRequest = PrepareMarketBuyOrderRequest | PrepareMarketSellOrderRequest;
|
|
3623
|
-
type PrepareLimitOrderRequest = {
|
|
3624
|
-
/** TokenID of the Conditional token asset being traded */
|
|
3625
|
-
tokenId: string;
|
|
3825
|
+
type PrepareLimitOrderRequest = OrderAsset & {
|
|
3626
3826
|
/** Price used to create the order */
|
|
3627
3827
|
price: number | string;
|
|
3628
3828
|
/**
|
|
3629
|
-
* Order size in outcome
|
|
3829
|
+
* Order size in outcome shares.
|
|
3630
3830
|
*
|
|
3631
3831
|
* This is the human-readable token amount: `1` means one full share, not one
|
|
3632
3832
|
* 6-decimal base unit.
|
|
@@ -3656,19 +3856,7 @@ type PrepareLimitOrderRequest = {
|
|
|
3656
3856
|
*/
|
|
3657
3857
|
expiration?: number;
|
|
3658
3858
|
};
|
|
3659
|
-
type
|
|
3660
|
-
builderCode?: BuilderCode;
|
|
3661
|
-
chainId: number;
|
|
3662
|
-
exchangeAddress: EvmAddress;
|
|
3663
|
-
expiration: number;
|
|
3664
|
-
funderAddress: EvmAddress;
|
|
3665
|
-
offeredAmount: bigint;
|
|
3666
|
-
orderType: OrderType;
|
|
3667
|
-
side: OrderSide;
|
|
3668
|
-
signer: EvmAddress;
|
|
3669
|
-
requestedAmount: bigint;
|
|
3670
|
-
tokenId: TokenId;
|
|
3671
|
-
};
|
|
3859
|
+
type OrderSignature = EvmSignature | Erc1271Signature | SessionSignerSignature;
|
|
3672
3860
|
type SignedOrder = {
|
|
3673
3861
|
builder: HexString;
|
|
3674
3862
|
expiration: number;
|
|
@@ -3682,19 +3870,22 @@ type SignedOrder = {
|
|
|
3682
3870
|
signer: EvmAddress;
|
|
3683
3871
|
takerAmount: string;
|
|
3684
3872
|
timestamp: string;
|
|
3685
|
-
|
|
3686
|
-
|
|
3873
|
+
/**
|
|
3874
|
+
* Asset identifier encoded in the exchange order. The protocol field is
|
|
3875
|
+
* named `tokenId` for both CTF token IDs and Polymarket V2 position IDs.
|
|
3876
|
+
*/
|
|
3877
|
+
tokenId: PositionId | TokenId;
|
|
3878
|
+
signature: OrderSignature;
|
|
3687
3879
|
postOnly?: boolean;
|
|
3688
3880
|
};
|
|
3689
3881
|
type OrderWorkflowRequest = SignOrderRequest;
|
|
3690
3882
|
type OrderWorkflow = AsyncGenerator<OrderWorkflowRequest, SignedOrder, EvmAddress | EvmSignature>;
|
|
3691
3883
|
type OrderPostingWorkflow = AsyncGenerator<OrderWorkflowRequest, OrderResponse, EvmAddress | EvmSignature>;
|
|
3692
3884
|
|
|
3693
|
-
|
|
3694
|
-
type
|
|
3695
|
-
type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
3885
|
+
type PostOrdersRequest = SignedOrder[];
|
|
3886
|
+
type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3696
3887
|
declare const PostOrderError: {
|
|
3697
|
-
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3888
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3698
3889
|
};
|
|
3699
3890
|
type PostOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3700
3891
|
declare const PostOrdersError: {
|
|
@@ -3808,6 +3999,15 @@ type SecureTradingActions = {
|
|
|
3808
3999
|
* tokenId: '123',
|
|
3809
4000
|
* });
|
|
3810
4001
|
* ```
|
|
4002
|
+
*
|
|
4003
|
+
* @example Position-backed market buy
|
|
4004
|
+
* ```ts
|
|
4005
|
+
* const order = await client.createMarketOrder({
|
|
4006
|
+
* amount: 10,
|
|
4007
|
+
* positionId: '456',
|
|
4008
|
+
* side: OrderSide.BUY,
|
|
4009
|
+
* });
|
|
4010
|
+
* ```
|
|
3811
4011
|
*/
|
|
3812
4012
|
createMarketOrder(request: PrepareMarketOrderRequest): Promise<SignedOrder>;
|
|
3813
4013
|
/**
|
|
@@ -3870,7 +4070,7 @@ type SecureTradingActions = {
|
|
|
3870
4070
|
* @throws {@link CreateLimitOrderError}
|
|
3871
4071
|
* Thrown on failure.
|
|
3872
4072
|
*
|
|
3873
|
-
* @example
|
|
4073
|
+
* @example Token-backed limit order
|
|
3874
4074
|
* ```ts
|
|
3875
4075
|
* const order = await client.createLimitOrder({
|
|
3876
4076
|
* postOnly: true,
|
|
@@ -3880,6 +4080,17 @@ type SecureTradingActions = {
|
|
|
3880
4080
|
* tokenId: '123',
|
|
3881
4081
|
* });
|
|
3882
4082
|
* ```
|
|
4083
|
+
*
|
|
4084
|
+
* @example Position-backed limit order
|
|
4085
|
+
* ```ts
|
|
4086
|
+
* const order = await client.createLimitOrder({
|
|
4087
|
+
* postOnly: true,
|
|
4088
|
+
* positionId: '456',
|
|
4089
|
+
* price: 0.52,
|
|
4090
|
+
* side: OrderSide.BUY,
|
|
4091
|
+
* size: 10,
|
|
4092
|
+
* });
|
|
4093
|
+
* ```
|
|
3883
4094
|
*/
|
|
3884
4095
|
createLimitOrder(request: PrepareLimitOrderRequest): Promise<SignedOrder>;
|
|
3885
4096
|
/**
|
|
@@ -4303,7 +4514,7 @@ type SecureWalletActions = {
|
|
|
4303
4514
|
declare function walletActions(client: BaseSecureClient): SecureWalletActions;
|
|
4304
4515
|
|
|
4305
4516
|
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
|
|
4306
|
-
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
4517
|
+
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SessionKeyActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
4307
4518
|
declare function allActions(client: BasePublicClient): PublicActions;
|
|
4308
4519
|
declare function allActions(client: BaseSecureClient): SecureActions;
|
|
4309
4520
|
|
|
@@ -4402,9 +4613,18 @@ type ServiceRequest = {
|
|
|
4402
4613
|
params?: URLSearchParams;
|
|
4403
4614
|
};
|
|
4404
4615
|
|
|
4616
|
+
/** Relationship between the authenticated signer and the active account wallet. */
|
|
4617
|
+
declare enum SignerType {
|
|
4618
|
+
/** Signer owns or deterministically controls the active account wallet. */
|
|
4619
|
+
OWNER = "OWNER",
|
|
4620
|
+
/** Signer uses the Deposit Wallet session-signature path. */
|
|
4621
|
+
SESSION_KEY = "SESSION_KEY"
|
|
4622
|
+
}
|
|
4405
4623
|
type AccountIdentity = {
|
|
4406
4624
|
/** Authenticated EOA that signs API authentication, orders, and wallet operations. */
|
|
4407
4625
|
signer: EvmAddress;
|
|
4626
|
+
/** Relationship between the authenticated signer and the active account wallet. */
|
|
4627
|
+
signerType: SignerType;
|
|
4408
4628
|
/** Active Polymarket account/funder wallet used for balances, positions, and execution. */
|
|
4409
4629
|
wallet: EvmAddress;
|
|
4410
4630
|
/** Wallet classification used for order signatures and transaction routing. */
|
|
@@ -4454,6 +4674,7 @@ type BeginAuthenticationRequest = {
|
|
|
4454
4674
|
type PublicClientConfig = {
|
|
4455
4675
|
environment: EnvironmentConfig;
|
|
4456
4676
|
apiKey?: ApiKeyAuthorization;
|
|
4677
|
+
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
4457
4678
|
};
|
|
4458
4679
|
declare class BasePublicClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> extends AbstractClient<PublicContext> {
|
|
4459
4680
|
#private;
|
|
@@ -4596,6 +4817,17 @@ type PublicClientOptions = {
|
|
|
4596
4817
|
* Optional request authorization applied by the client when needed.
|
|
4597
4818
|
*/
|
|
4598
4819
|
apiKey?: ApiKeyAuthorization;
|
|
4820
|
+
/**
|
|
4821
|
+
* Listener invoked whenever a response reports per-signer rate-limit state,
|
|
4822
|
+
* as order and cancellation responses do.
|
|
4823
|
+
*
|
|
4824
|
+
* @remarks
|
|
4825
|
+
* Use this to monitor remaining rate-limit capacity and warning-mode
|
|
4826
|
+
* signals, and adjust request patterns before requests are rejected.
|
|
4827
|
+
* Errors thrown by the listener and rejections from promises it returns are
|
|
4828
|
+
* ignored.
|
|
4829
|
+
*/
|
|
4830
|
+
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
4599
4831
|
};
|
|
4600
4832
|
type SecureClientOptions = PublicClientOptions & {
|
|
4601
4833
|
/**
|
|
@@ -4807,6 +5039,7 @@ declare const DropNotificationsRequestSchema: z.ZodObject<{
|
|
|
4807
5039
|
type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
|
|
4808
5040
|
/**
|
|
4809
5041
|
* Fetches notifications for the authenticated account.
|
|
5042
|
+
* Notifications of a kind this SDK version does not recognize are omitted.
|
|
4810
5043
|
*
|
|
4811
5044
|
* @remarks
|
|
4812
5045
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -6196,18 +6429,18 @@ declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
6196
6429
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6197
6430
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6198
6431
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6432
|
+
ALL: "ALL";
|
|
6199
6433
|
DAY: "DAY";
|
|
6200
6434
|
WEEK: "WEEK";
|
|
6201
6435
|
MONTH: "MONTH";
|
|
6202
|
-
ALL: "ALL";
|
|
6203
6436
|
}>>;
|
|
6204
6437
|
}, z.core.$strip>;
|
|
6205
6438
|
declare const ListBuilderVolumeRequestSchema: z.ZodObject<{
|
|
6206
6439
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6440
|
+
ALL: "ALL";
|
|
6207
6441
|
DAY: "DAY";
|
|
6208
6442
|
WEEK: "WEEK";
|
|
6209
6443
|
MONTH: "MONTH";
|
|
6210
|
-
ALL: "ALL";
|
|
6211
6444
|
}>>;
|
|
6212
6445
|
}, z.core.$strip>;
|
|
6213
6446
|
declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
@@ -6226,10 +6459,10 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
6226
6459
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6227
6460
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6228
6461
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6462
|
+
ALL: "ALL";
|
|
6229
6463
|
DAY: "DAY";
|
|
6230
6464
|
WEEK: "WEEK";
|
|
6231
6465
|
MONTH: "MONTH";
|
|
6232
|
-
ALL: "ALL";
|
|
6233
6466
|
}>>;
|
|
6234
6467
|
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
6235
6468
|
PNL: "PNL";
|
|
@@ -8818,6 +9051,122 @@ declare const FetchSeriesError: {
|
|
|
8818
9051
|
*/
|
|
8819
9052
|
declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest): Promise<Series>;
|
|
8820
9053
|
|
|
9054
|
+
/**
|
|
9055
|
+
* A scoped session key authorized for the Deposit Wallet.
|
|
9056
|
+
*/
|
|
9057
|
+
type SessionKey = {
|
|
9058
|
+
/** Public EVM address of the externally managed session signer. */
|
|
9059
|
+
address: EvmAddress$1;
|
|
9060
|
+
/** Venue scopes granted to the signer. */
|
|
9061
|
+
scopes: SessionSignerScope[];
|
|
9062
|
+
/** Absolute expiry as whole Unix seconds. */
|
|
9063
|
+
validUntil: number;
|
|
9064
|
+
};
|
|
9065
|
+
type FetchSessionKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9066
|
+
declare const FetchSessionKeysError: {
|
|
9067
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9068
|
+
};
|
|
9069
|
+
/**
|
|
9070
|
+
* Fetches the active session keys authorized for the Deposit Wallet.
|
|
9071
|
+
*
|
|
9072
|
+
* @remarks
|
|
9073
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9074
|
+
*
|
|
9075
|
+
* @example
|
|
9076
|
+
* ```ts
|
|
9077
|
+
* const sessionKeys = await fetchSessionKeys(client);
|
|
9078
|
+
* ```
|
|
9079
|
+
*
|
|
9080
|
+
* @throws {@link FetchSessionKeysError}
|
|
9081
|
+
* Thrown on failure.
|
|
9082
|
+
*/
|
|
9083
|
+
declare function fetchSessionKeys(client: BaseSecureClient): Promise<SessionKey[]>;
|
|
9084
|
+
/** Parameters for authorizing a scoped session key. */
|
|
9085
|
+
type AuthorizeSessionKeyRequest = {
|
|
9086
|
+
/** Public EVM address of the externally managed session signer. */
|
|
9087
|
+
address: string;
|
|
9088
|
+
/** Stable key to reuse when retrying the same logical authorization. */
|
|
9089
|
+
idempotencyKey?: string;
|
|
9090
|
+
/** Requested scopes. Defaults to `ALL`, which must appear alone. */
|
|
9091
|
+
scopes?: SessionSignerScope[];
|
|
9092
|
+
/** Absolute expiry as whole future Unix seconds. */
|
|
9093
|
+
validUntil: number;
|
|
9094
|
+
};
|
|
9095
|
+
/** Result of a confirmed session-key authorization. */
|
|
9096
|
+
type AuthorizeSessionKeyResult = {
|
|
9097
|
+
/** Session-key metadata associated with the confirmed authorization. */
|
|
9098
|
+
sessionKey: SessionKey;
|
|
9099
|
+
/** Confirmed transaction that applied the authorization. */
|
|
9100
|
+
transaction: TransactionOutcome;
|
|
9101
|
+
};
|
|
9102
|
+
type AuthorizeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9103
|
+
declare const AuthorizeSessionKeyError: {
|
|
9104
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
9105
|
+
};
|
|
9106
|
+
/**
|
|
9107
|
+
* Authorizes an externally managed signer for selected venues.
|
|
9108
|
+
*
|
|
9109
|
+
* The SDK receives only the public address. The application remains
|
|
9110
|
+
* responsible for generating, storing, and protecting the private key.
|
|
9111
|
+
* When scopes are omitted, authorization defaults to `ALL`.
|
|
9112
|
+
* Requires builder API-key authentication.
|
|
9113
|
+
*
|
|
9114
|
+
* @remarks
|
|
9115
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9116
|
+
*
|
|
9117
|
+
* Resolves after the submitted transaction is confirmed and the session key
|
|
9118
|
+
* appears in the active session-key list.
|
|
9119
|
+
*
|
|
9120
|
+
* @example
|
|
9121
|
+
* ```ts
|
|
9122
|
+
* const authorization = await authorizeSessionKey(client, {
|
|
9123
|
+
* address: sessionAddress,
|
|
9124
|
+
* validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
|
|
9125
|
+
* });
|
|
9126
|
+
* ```
|
|
9127
|
+
*
|
|
9128
|
+
* @throws {@link AuthorizeSessionKeyError}
|
|
9129
|
+
* Thrown on failure.
|
|
9130
|
+
*/
|
|
9131
|
+
declare function authorizeSessionKey(client: BaseSecureClient, request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
|
|
9132
|
+
/** Parameters for revoking a session key. */
|
|
9133
|
+
type RevokeSessionKeyRequest = {
|
|
9134
|
+
/** Public EVM address of the session signer to revoke. */
|
|
9135
|
+
address: string;
|
|
9136
|
+
/** Stable key to reuse when retrying the same signed revocation. */
|
|
9137
|
+
idempotencyKey?: string;
|
|
9138
|
+
};
|
|
9139
|
+
/** Result of a confirmed session-key revocation. */
|
|
9140
|
+
type RevokeSessionKeyResult = {
|
|
9141
|
+
/** Confirmed transaction that applied the revocation. */
|
|
9142
|
+
transaction: TransactionOutcome;
|
|
9143
|
+
};
|
|
9144
|
+
type RevokeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9145
|
+
declare const RevokeSessionKeyError: {
|
|
9146
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
9147
|
+
};
|
|
9148
|
+
/**
|
|
9149
|
+
* Revokes a session key authorized for the Deposit Wallet.
|
|
9150
|
+
*
|
|
9151
|
+
* Revocation may take several minutes while existing activity is canceled and
|
|
9152
|
+
* the on-chain revocation is confirmed.
|
|
9153
|
+
* Requires API-key authentication that supports gasless transactions.
|
|
9154
|
+
*
|
|
9155
|
+
* @remarks
|
|
9156
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9157
|
+
*
|
|
9158
|
+
* @example
|
|
9159
|
+
* ```ts
|
|
9160
|
+
* const revocation = await revokeSessionKey(client, {
|
|
9161
|
+
* address: sessionAddress,
|
|
9162
|
+
* });
|
|
9163
|
+
* ```
|
|
9164
|
+
*
|
|
9165
|
+
* @throws {@link RevokeSessionKeyError}
|
|
9166
|
+
* Thrown on failure.
|
|
9167
|
+
*/
|
|
9168
|
+
declare function revokeSessionKey(client: BaseSecureClient, request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
|
|
9169
|
+
|
|
8821
9170
|
type MarketEventType = MarketEvent['type'];
|
|
8822
9171
|
type UserEventType = UserEvent['type'];
|
|
8823
9172
|
type SportsEventType = SportsEvent['type'];
|
|
@@ -9329,4 +9678,4 @@ type Signer = {
|
|
|
9329
9678
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
9330
9679
|
};
|
|
9331
9680
|
|
|
9332
|
-
export { FetchClosedOnlyModeError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, ComboPositionSort as D, type ComboQuote as E, type CombosEndpoints as F, ConnectionLostError as G, type ConnectionLostErrorOptions as H, type CreatePerpsSessionRequest as I, CreateSecureClientError as J, type CryptoPricesChainlinkTwapSubscription as K, type DataActions as L, DepositToPerpsError as M, type DepositToPerpsRequest as N, type DisarmPerpsAutoCancelRequest as O, type DiscoveryActions as P, DownloadAccountingSnapshotError as Q, DropNotificationsError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type EnvironmentConfig as V, type EnvironmentConfigFork as W, type EnvironmentContracts as X, EstimateMarketPriceError as Y, ExecuteCollateralReturnPlanError as Z, type ExecuteCollateralReturnPlanRequest as _, type TypedData as a, ListOpenOrdersError as a$, FetchCommentsByIdError as a0, FetchEventError as a1, FetchEventLiveVolumeError as a2, FetchEventTagsError as a3, FetchLastTradePriceError as a4, FetchLastTradePricesError as a5, FetchMarketError as a6, FetchMarketTagsError as a7, FetchMidpointError as a8, FetchMidpointsError as a9, FetchRfqStatusError as aA, type FetchRfqStatusParams as aB, FetchSeriesError as aC, FetchSpreadError as aD, FetchSpreadsError as aE, FetchTagError as aF, FetchTotalEarningsForUserForDayError as aG, FetchTradedMarketCountError as aH, InsufficientLiquidityError as aI, ListAccountTradesError as aJ, ListActivityError as aK, ListBuilderLeaderboardError as aL, ListBuilderTradesError as aM, ListBuilderVolumeError as aN, ListClosedPositionsError as aO, ListComboActivityError as aP, ListComboMarketsError as aQ, ListComboPositionsError as aR, ListCommentsByUserAddressError as aS, ListCommentsError as aT, ListCurrentRewardsError as aU, ListEventsError as aV, ListMarketHoldersError as aW, ListMarketPositionsError as aX, ListMarketRewardsError as aY, ListMarketsError as aZ, ListOpenInterestError as a_, FetchNotificationsError as aa, FetchOrderBookError as ab, FetchOrderBooksError as ac, FetchOrderError as ad, FetchOrderScoringError as ae, FetchOrdersScoringError as af, type FetchPerpsAccountConfigRequest as ag, FetchPerpsBookError as ah, type FetchPerpsBookRequest as ai, FetchPerpsFeesError as aj, FetchPerpsInstrumentsError as ak, type FetchPerpsInstrumentsRequest as al, type FetchPerpsOpenOrdersRequest as am, type FetchPerpsOrdersRequest as an, FetchPerpsTickerError as ao, type FetchPerpsTickerRequest as ap, FetchPerpsTickersError as aq, type FetchPerpsTickersRequest as ar, FetchPortfolioValueError as as, FetchPriceError as at, FetchPriceHistoryError as au, FetchPricesError as av, FetchPublicProfileError as aw, FetchRelatedTagResourcesError as ax, FetchRelatedTagsError as ay, FetchRewardPercentagesError as az, type TransactionCall as b, RedeemPositionsError as b$, ListPerpsCandlesError as b0, type ListPerpsCandlesRequest as b1, type ListPerpsDepositsRequest as b2, type ListPerpsEquityHistoryRequest as b3, type ListPerpsFillsRequest as b4, ListPerpsFundingHistoryError as b5, type ListPerpsFundingHistoryRequest as b6, type ListPerpsFundingPaymentsRequest as b7, type ListPerpsNotificationsRequest as b8, type ListPerpsPnlHistoryRequest as b9, type PerpsPlacedTpSlOrder as bA, type PerpsPlacedTpSlOrders as bB, type PerpsPositionTpSlTrigger as bC, PerpsSession as bD, type PerpsSessionAccountError as bE, type PerpsSessionLifecycleError as bF, type PerpsSessionTradingError as bG, type PerpsTpSlTrigger as bH, type PlacePerpsOrderRequest as bI, type PlacePerpsOrderResult as bJ, type PlacePerpsOrderWithTpSlRequest as bK, type PlacePerpsOrderWithTpSlResult as bL, type PlacePerpsPositionTpSlRequest as bM, type PlacePerpsPositionTpSlResult as bN, PlanCollateralReturnError as bO, PostOrderError as bP, PostOrdersError as bQ, type PostPerpsOrdersRequest as bR, type PublicAccountActions as bS, type PublicActions as bT, type PublicClient as bU, type PublicClientOptions as bV, type PublicPerpsActions as bW, type PublicRewardsActions as bX, type PublicSubscriptionsActions as bY, RateLimitError as bZ, type RateLimitErrorOptions as b_, ListPerpsTradesError as ba, type ListPerpsTradesRequest as bb, type ListPerpsWithdrawalsRequest as bc, ListPositionsError as bd, ListSeriesError as be, ListTagsError as bf, ListTeamsError as bg, ListTraderLeaderboardError as bh, ListTradesError as bi, ListUserEarningsAndMarketsConfigError as bj, ListUserEarningsForDayError as bk, type MarkPerpsNotificationsReadRequest as bl, MergePositionsError as bm, OpenPerpsSessionError as bn, type OpenPerpsSessionRequest as bo, OpenRfqSessionError as bp, type Page as bq, PageSizeSchema as br, type Paginated as bs, type PerpsActions as bt, type PerpsBookDepth as bu, type PerpsEndpoints as bv, type PerpsOrderRequest as bw, type PerpsPlaceFokOrderRequest as bx, type PerpsPlaceGtcOrderRequest as by, type PerpsPlaceIocOrderRequest as bz, AcceptComboQuoteError as c, type TypedDataField as c$, RequestComboQuoteError as c0, type RequestComboQuoteParams as c1, type RequestComboQuoteResult as c2, RequestRejectedError as c3, type RequestRejectedErrorOptions as c4, type RestEndpoint as c5, type ResumePerpsSessionRequest as c6, RevokePerpsCredentialsError as c7, type RevokePerpsCredentialsRequest as c8, type RfqCancelQuoteAck as c9, type SecureDownloadAccountingSnapshotRequest as cA, type SecureFetchPortfolioValueRequest as cB, type SecureFetchTradedMarketCountRequest as cC, type SecureListActivityRequest as cD, type SecureListClosedPositionsRequest as cE, type SecureListComboActivityRequest as cF, type SecureListComboPositionsRequest as cG, type SecureListPositionsRequest as cH, type SecurePerpsActions as cI, type SecureRewardsActions as cJ, type SecureRfqActions as cK, type SecureSubscriptionsActions as cL, type SecureTradingActions as cM, type SecureWalletActions as cN, SetupGaslessWalletError as cO, SetupTradingApprovalsError as cP, type SignerTransactionRequest as cQ, SigningError as cR, SplitPositionError as cS, SubscribeError as cT, TimeoutError as cU, TransactionFailedError as cV, type TransactionHandle as cW, type TransactionOutcome as cX, TransferErc20Error as cY, TransportError as cZ, type TypedDataDomain as c_, RfqCancelQuoteError as ca, RfqCancelQuoteRejectedError as cb, type RfqCancelQuoteRejectedErrorOptions as cc, type RfqConfirmationAck as cd, RfqConfirmationError as ce, RfqConfirmationRejectedError as cf, type RfqConfirmationRequestEvent as cg, type RfqEvent as ch, RfqQuoteError as ci, type RfqQuoteReference as cj, RfqQuoteRejectedError as ck, type RfqQuoteRejectedErrorOptions as cl, type RfqQuoteRequestEvent as cm, type RfqQuoteResponse as cn, type RfqQuoteSource as co, RfqRequestRejectedError as cp, type RfqRequestRejectedErrorOptions as cq, type RfqSession as cr, type RfqStatusResult as cs, type RfqTradeEvent as ct, SearchError as cu, SearchSort as cv, type SecureAccountActions as cw, type SecureActions as cx, type SecureClient as cy, type SecureClientOptions as cz, type AcceptComboQuoteParams as d, type FetchEventRequest as d$, UnexpectedResponseError as d0, UpdatePerpsLeverageError as d1, type UpdatePerpsLeverageRequest as d2, UpdatePerpsMarginError as d3, type UpdatePerpsMarginRequest as d4, WaitForComboFillError as d5, type WaitForComboFillParams as d6, type WaitForComboFillResult as d7, WaitForOrderFillSettlementError as d8, WaitForTransactionError as d9, type CollateralReturnExecutionWorkflow as dA, type CommentsEventType as dB, type CommentsSubscription as dC, type CryptoPricesEventType as dD, type CryptoPricesSubscription as dE, DeployDepositWalletError as dF, type DownloadAccountingSnapshotRequest as dG, type DropNotificationsRequest as dH, type EquityPricesEventType as dI, type EquityPricesSubscription as dJ, type Erc1155ApprovalForAllWorkflow as dK, type Erc1155ApprovalForAllWorkflowRequest as dL, type Erc20ApprovalWorkflow as dM, type Erc20ApprovalWorkflowRequest as dN, type Erc20TransferWorkflow as dO, type Erc20TransferWorkflowRequest as dP, type EstimateMarketBuyPriceRequest as dQ, type EstimateMarketPriceRequest as dR, type EstimateMarketSellPriceRequest as dS, type EventForSubscriptionSpec as dT, type EventForSubscriptionSpecs as dU, FetchBalanceAllowanceError as dV, type FetchBalanceAllowanceRequest as dW, FetchBuilderFeeRatesError as dX, type FetchBuilderFeeRatesRequest as dY, type FetchCommentsByIdRequest as dZ, type FetchEventLiveVolumeRequest as d_, type WalletDerivationConfig as da, type WebSocketCloseCode as db, type WebSocketEndpoint as dc, WebSocketKnownCloseCode as dd, WithdrawFromPerpsError as de, type WithdrawFromPerpsRequest as df, accountActions as dg, allActions as dh, analyticsActions as di, createPublicClient as dj, createSecureClient as dk, dataActions as dl, discoveryActions as dm, forkEnvironmentConfig as dn, makeErrorGuard as dp, perpsActions as dq, production as dr, rewardsActions as ds, rfqActions as dt, subscriptionsActions as du, tradingActions as dv, walletActions as dw, type CancelMarketOrdersRequest as dx, type CancelOrderRequest as dy, type CancelOrdersRequest as dz, type AcceptComboQuoteResult as e, type ListTeamsRequest as e$, type FetchEventTagsRequest as e0, FetchExecuteParamsError as e1, type FetchExecuteParamsRequest as e2, type FetchGaslessTransactionRequest as e3, type FetchLastTradePriceRequest as e4, type FetchLastTradePricesRequest as e5, FetchMarketInfoError as e6, type FetchMarketInfoRequest as e7, type FetchMarketRequest as e8, type FetchMarketTagsRequest as e9, type GaslessWorkflowRequest as eA, IsWalletDeployedError as eB, type IsWalletDeployedRequest as eC, type ListAccountTradesRequest as eD, type ListActivityRequest as eE, type ListBuilderLeaderboardRequest as eF, type ListBuilderTradesRequest as eG, type ListBuilderVolumeRequest as eH, type ListClosedPositionsRequest as eI, type ListComboActivityRequest as eJ, type ListComboMarketsRequest as eK, type ListComboPositionsRequest as eL, type ListCommentsByUserAddressRequest as eM, type ListCommentsRequest as eN, type ListCurrentRewardsRequest as eO, type ListEventsRequest as eP, ListMarketClarificationsError as eQ, type ListMarketClarificationsRequest as eR, type ListMarketHoldersRequest as eS, type ListMarketPositionsRequest as eT, type ListMarketRewardsRequest as eU, type ListMarketsRequest as eV, type ListOpenInterestRequest as eW, type ListOpenOrdersRequest as eX, type ListPositionsRequest as eY, type ListSeriesRequest as eZ, type ListTagsRequest as e_, type FetchMidpointRequest as ea, type FetchMidpointsRequest as eb, FetchNegRiskError as ec, type FetchNegRiskRequest as ed, type FetchOrderBookRequest as ee, type FetchOrderBooksRequest as ef, type FetchOrderRequest as eg, type FetchOrderScoringRequest as eh, type FetchOrdersScoringRequest as ei, type FetchPortfolioValueRequest as ej, type FetchPriceHistoryRequest as ek, type FetchPriceRequest as el, type FetchPricesRequest as em, type FetchPublicProfileRequest as en, type FetchRelatedTagResourcesRequest as eo, type FetchRelatedTagsRequest as ep, type FetchSeriesRequest as eq, type FetchSpreadRequest as er, type FetchSpreadsRequest as es, type FetchTagRequest as et, FetchTickSizeError as eu, type FetchTickSizeRequest as ev, type FetchTotalEarningsForUserForDayRequest as ew, type FetchTradedMarketCountRequest as ex, GaslessTransactionMetadataSchema as ey, type GaslessWorkflow as ez, type AccountIdentity as f, type PublicSubscriptionSpec as f$, type ListTraderLeaderboardRequest as f0, type ListTradesRequest as f1, type ListUserEarningsAndMarketsConfigRequest as f2, type ListUserEarningsForDayRequest as f3, type MarketEventType as f4, type MarketSubscription as f5, MergeComboPositionError as f6, MergeMarketPositionError as f7, type MergePositionsWorkflow as f8, type MergePositionsWorkflowRequest as f9, type PrepareMarketBuyOrderRequest as fA, type PrepareMarketOrderRequest as fB, type PrepareMarketSellOrderRequest as fC, PrepareMergeComboPositionError as fD, type PrepareMergeComboPositionRequest as fE, PrepareMergeMarketPositionError as fF, type PrepareMergeMarketPositionRequest as fG, PrepareMergePositionsError as fH, type PrepareMergePositionsRequest as fI, PreparePerpsDepositError as fJ, PrepareRedeemComboPositionError as fK, type PrepareRedeemComboPositionRequest as fL, type PrepareRedeemMarketPositionsByConditionIdRequest as fM, type PrepareRedeemMarketPositionsByMarketIdRequest as fN, PrepareRedeemMarketPositionsError as fO, type PrepareRedeemMarketPositionsRequest as fP, PrepareRedeemPositionsError as fQ, type PrepareRedeemPositionsRequest as fR, PrepareSplitComboPositionError as fS, type PrepareSplitComboPositionRequest as fT, PrepareSplitMarketPositionError as fU, type PrepareSplitMarketPositionRequest as fV, PrepareSplitPositionError as fW, type PrepareSplitPositionRequest as fX, PrepareTradingApprovalsError as fY, type PublicRealtimeEvent as fZ, type PublicRealtimeTopic as f_, type OrderDraft as fa, type OrderPostingWorkflow as fb, type OrderWorkflow as fc, type OrderWorkflowRequest as fd, type PerpsBboSubscription as fe, type PerpsBookSubscription as ff, type PerpsCandlesSubscription as fg, type PerpsDepositWorkflow as fh, type PerpsDepositWorkflowRequest as fi, type PerpsMarketDataEventType as fj, type PerpsMarketDataSubscription as fk, type PerpsStatisticsSubscription as fl, type PerpsStreamingCandleInterval as fm, type PerpsTickersSubscription as fn, type PerpsTradesSubscription as fo, type PostOrdersRequest as fp, PrepareCollateralReturnExecutionError as fq, PrepareErc1155ApprovalForAllError as fr, type PrepareErc1155ApprovalForAllRequest as fs, PrepareErc20ApprovalError as ft, type PrepareErc20ApprovalRequest as fu, PrepareErc20TransferError as fv, type PrepareErc20TransferRequest as fw, PrepareGaslessTransactionError as fx, type PrepareGaslessTransactionRequest as fy, type PrepareLimitOrderRequest as fz, type AnalyticsActions as g, fetchPerpsBook as g$, type RedeemPositionsWorkflow as g0, type RedeemPositionsWorkflowRequest as g1, ResolveConditionByTokenError as g2, type ResolveConditionByTokenRequest as g3, type RfqConfirmationRejectedErrorOptions as g4, type RfqExecutionUpdateEvent as g5, type SearchRequest as g6, type SearchResults as g7, type SecureRealtimeEvent as g8, type SecureRealtimeTopic as g9, downloadAccountingSnapshot as gA, dropNotifications as gB, estimateMarketPrice as gC, executeCollateralReturnPlan as gD, fetchBalanceAllowance as gE, fetchBuilderFeeRates as gF, fetchBuilderVolume as gG, fetchClosedOnlyMode as gH, fetchCommentsById as gI, fetchEvent as gJ, fetchEventLiveVolume as gK, fetchEventTags as gL, fetchExecuteParams as gM, fetchLastTradePrice as gN, fetchLastTradePrices as gO, fetchMarket as gP, fetchMarketInfo as gQ, fetchMarketTags as gR, fetchMidpoint as gS, fetchMidpoints as gT, fetchNegRisk as gU, fetchNotifications as gV, fetchOrder as gW, fetchOrderBook as gX, fetchOrderBooks as gY, fetchOrderScoring as gZ, fetchOrdersScoring as g_, type SecureSubscriptionSpec as ga, type SignedOrder as gb, SplitComboPositionError as gc, SplitMarketPositionError as gd, type SplitPositionWorkflow as ge, type SplitPositionWorkflowRequest as gf, type SportsEventType as gg, type SportsSubscription as gh, type SubscriptionHandle as gi, type TradingApprovalsWorkflow as gj, type TradingApprovalsWorkflowRequest as gk, UpdateBalanceAllowanceError as gl, type UpdateBalanceAllowanceRequest as gm, type UserEventType as gn, type UserSubscription as go, WaitForGaslessTransactionError as gp, type WaitForOrderFillSettlementRequest as gq, acceptComboQuote as gr, approveErc1155ForAll as gs, approveErc20 as gt, cancelAll as gu, cancelMarketOrders as gv, cancelOrder as gw, cancelOrders as gx, deployDepositWallet as gy, depositToPerps as gz, ApproveErc1155ForAllError as h, prepareErc20Transfer as h$, fetchPerpsFees as h0, fetchPerpsInstruments as h1, fetchPerpsTicker as h2, fetchPerpsTickers as h3, fetchPortfolioValue as h4, fetchPrice as h5, fetchPriceHistory as h6, fetchPrices as h7, fetchPublicProfile as h8, fetchRelatedTagResources as h9, listMarketPositions as hA, listMarketRewards as hB, listMarkets as hC, listOpenInterest as hD, listOpenOrders as hE, listPerpsCandles as hF, listPerpsFundingHistory as hG, listPerpsTrades as hH, listPositions as hI, listSeries as hJ, listTags as hK, listTeams as hL, listTraderLeaderboard as hM, listTrades as hN, listUserEarningsAndMarketsConfig as hO, listUserEarningsForDay as hP, mergeComboPosition as hQ, mergeMarketPosition as hR, mergePositions as hS, openPerpsSession as hT, openRfqSession as hU, planCollateralReturn as hV, postOrder as hW, postOrders as hX, prepareCollateralReturnExecution as hY, prepareErc1155ApprovalForAll as hZ, prepareErc20Approval as h_, fetchRelatedTags as ha, fetchRewardPercentages as hb, fetchRfqStatus as hc, fetchSeries as hd, fetchSpread as he, fetchSpreads as hf, fetchTag as hg, fetchTickSize as hh, fetchTotalEarningsForUserForDay as hi, fetchTradedMarketCount as hj, fetchTransaction as hk, isWalletDeployed as hl, listAccountTrades as hm, listActivity as hn, listBuilderLeaderboard as ho, listBuilderTrades as hp, listClosedPositions as hq, listComboActivity as hr, listComboMarkets as hs, listComboPositions as ht, listComments as hu, listCommentsByUserAddress as hv, listCurrentRewards as hw, listEvents as hx, listMarketClarifications as hy, listMarketHolders as hz, ApproveErc20Error as i, prepareGaslessTransaction as i0, prepareMergeComboPosition as i1, prepareMergeMarketPosition as i2, prepareMergePositions as i3, preparePerpsDeposit as i4, prepareRedeemComboPosition as i5, prepareRedeemMarketPositions as i6, prepareRedeemPositions as i7, prepareSplitComboPosition as i8, prepareSplitMarketPosition as i9, prepareSplitPosition as ia, prepareTradingApprovals as ib, redeemPositions as ic, requestComboQuote as id, resolveConditionByToken as ie, revokePerpsCredentials as ig, search as ih, setupTradingApprovals as ii, splitComboPosition as ij, splitMarketPosition as ik, splitPosition as il, subscribe as im, transferErc20 as io, updateBalanceAllowance as ip, waitForComboFill as iq, waitForOrderFillSettlement as ir, withdrawFromPerps as is, ArmPerpsAutoCancelError as j, type ArmPerpsAutoCancelRequest as k, AutoCancelDailyLimitError as l, BasePublicClient as m, BaseSecureClient as n, type BeginAuthenticationRequest as o, type CancelAllPerpsOrdersRequest as p, CancelMarketOrdersError as q, CancelOrderError as r, CancelOrdersError as s, type CancelPerpsOrderRequest as t, type CancelPerpsOrdersRequest as u, CancelledSigningError as v, type Client as w, type ClientActions as x, type ClientDecorator as y, type ClobEndpoints as z };
|
|
9681
|
+
export { type EnvironmentContracts as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type ClientActions as D, type ClientDecorator as E, type ClobEndpoints as F, ComboPositionSort as G, type ComboPositionStatusFilter as H, type ComboQuote as I, type CombosEndpoints as J, ConnectionLostError as K, type ConnectionLostErrorOptions as L, type CreatePerpsSessionRequest as M, CreateSecureClientError as N, type CryptoPricesChainlinkTwapSubscription as O, type DataActions as P, DepositToPerpsError as Q, type DepositToPerpsRequest as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type DisarmPerpsAutoCancelRequest as V, type DiscoveryActions as W, DownloadAccountingSnapshotError as X, DropNotificationsError as Y, type EnvironmentConfig as Z, type EnvironmentConfigFork as _, type TypedData as a, ListMarketHoldersError as a$, EstimateMarketPriceError as a0, ExecuteCollateralReturnPlanError as a1, type ExecuteCollateralReturnPlanRequest as a2, FetchClosedOnlyModeError as a3, FetchCommentsByIdError as a4, FetchEventError as a5, FetchEventLiveVolumeError as a6, FetchEventTagsError as a7, FetchLastTradePriceError as a8, FetchLastTradePricesError as a9, FetchPublicProfileError as aA, FetchRelatedTagResourcesError as aB, FetchRelatedTagsError as aC, FetchRewardPercentagesError as aD, FetchRfqStatusError as aE, type FetchRfqStatusParams as aF, FetchSeriesError as aG, FetchSessionKeysError as aH, FetchSpreadError as aI, FetchSpreadsError as aJ, FetchTagError as aK, FetchTotalEarningsForUserForDayError as aL, FetchTradedMarketCountError as aM, InsufficientLiquidityError as aN, ListAccountTradesError as aO, ListActivityError as aP, ListBuilderLeaderboardError as aQ, ListBuilderTradesError as aR, ListBuilderVolumeError as aS, ListClosedPositionsError as aT, ListComboActivityError as aU, ListComboMarketsError as aV, ListComboPositionsError as aW, ListCommentsByUserAddressError as aX, ListCommentsError as aY, ListCurrentRewardsError as aZ, ListEventsError as a_, FetchMarketError as aa, FetchMarketTagsError as ab, FetchMidpointError as ac, FetchMidpointsError as ad, FetchNotificationsError as ae, FetchOrderBookError as af, FetchOrderBooksError as ag, FetchOrderError as ah, FetchOrderScoringError as ai, FetchOrdersScoringError as aj, type FetchPerpsAccountConfigRequest as ak, FetchPerpsBookError as al, type FetchPerpsBookRequest as am, FetchPerpsFeesError as an, FetchPerpsInstrumentsError as ao, type FetchPerpsInstrumentsRequest as ap, type FetchPerpsOpenOrdersRequest as aq, type FetchPerpsOrdersRequest as ar, FetchPerpsTickerError as as, type FetchPerpsTickerRequest as at, FetchPerpsTickersError as au, type FetchPerpsTickersRequest as av, FetchPortfolioValueError as aw, FetchPriceError as ax, FetchPriceHistoryError as ay, FetchPricesError as az, type TransactionCall as b, type PublicClient as b$, ListMarketPositionsError as b0, ListMarketRewardsError as b1, ListMarketsError as b2, ListOpenInterestError as b3, ListOpenOrdersError as b4, ListPerpsCandlesError as b5, type ListPerpsCandlesRequest as b6, type ListPerpsDepositsRequest as b7, type ListPerpsEquityHistoryRequest as b8, type ListPerpsFillsRequest as b9, type PerpsActions as bA, type PerpsBookDepth as bB, type PerpsEndpoints as bC, type PerpsOrderRequest as bD, type PerpsPlaceFokOrderRequest as bE, type PerpsPlaceGtcOrderRequest as bF, type PerpsPlaceIocOrderRequest as bG, type PerpsPlacedTpSlOrder as bH, type PerpsPlacedTpSlOrders as bI, type PerpsPositionTpSlTrigger as bJ, PerpsSession as bK, type PerpsSessionAccountError as bL, type PerpsSessionLifecycleError as bM, type PerpsSessionTradingError as bN, type PerpsTpSlTrigger as bO, type PlacePerpsOrderRequest as bP, type PlacePerpsOrderResult as bQ, type PlacePerpsOrderWithTpSlRequest as bR, type PlacePerpsOrderWithTpSlResult as bS, type PlacePerpsPositionTpSlRequest as bT, type PlacePerpsPositionTpSlResult as bU, PlanCollateralReturnError as bV, PostOrderError as bW, PostOrdersError as bX, type PostPerpsOrdersRequest as bY, type PublicAccountActions as bZ, type PublicActions as b_, ListPerpsFundingHistoryError as ba, type ListPerpsFundingHistoryRequest as bb, type ListPerpsFundingPaymentsRequest as bc, type ListPerpsNotificationsRequest as bd, type ListPerpsPnlHistoryRequest as be, ListPerpsTradesError as bf, type ListPerpsTradesRequest as bg, type ListPerpsWithdrawalsRequest as bh, ListPositionsError as bi, ListSeriesError as bj, ListTagsError as bk, ListTeamsError as bl, ListTraderLeaderboardError as bm, ListTradesError as bn, ListUserEarningsAndMarketsConfigError as bo, ListUserEarningsForDayError as bp, type MarkPerpsNotificationsReadRequest as bq, MergePositionsError as br, OpenPerpsSessionError as bs, type OpenPerpsSessionRequest as bt, OpenRfqSessionError as bu, type OrderAsset as bv, type OrderSignature as bw, type Page as bx, PageSizeSchema as by, type Paginated as bz, AcceptComboQuoteError as c, type SessionKey as c$, type PublicClientOptions as c0, type PublicPerpsActions as c1, type PublicRewardsActions as c2, type PublicSubscriptionsActions as c3, type RateLimitBucket as c4, RateLimitError as c5, type RateLimitErrorOptions as c6, type RateLimitUpdate as c7, type RateLimitUpdateListener as c8, RedeemPositionsError as c9, type RfqQuoteResponse as cA, type RfqQuoteSource as cB, RfqRequestRejectedError as cC, type RfqRequestRejectedErrorOptions as cD, type RfqSession as cE, type RfqStatusResult as cF, type RfqTradeEvent as cG, SearchError as cH, SearchSort as cI, type SecureAccountActions as cJ, type SecureActions as cK, type SecureClient as cL, type SecureClientOptions as cM, type SecureDownloadAccountingSnapshotRequest as cN, type SecureFetchPortfolioValueRequest as cO, type SecureFetchTradedMarketCountRequest as cP, type SecureListActivityRequest as cQ, type SecureListClosedPositionsRequest as cR, type SecureListComboActivityRequest as cS, type SecureListComboPositionsRequest as cT, type SecureListPositionsRequest as cU, type SecurePerpsActions as cV, type SecureRewardsActions as cW, type SecureRfqActions as cX, type SecureSubscriptionsActions as cY, type SecureTradingActions as cZ, type SecureWalletActions as c_, RequestComboQuoteError as ca, type RequestComboQuoteParams as cb, type RequestComboQuoteResult as cc, RequestRejectedError as cd, type RequestRejectedErrorOptions as ce, type RestEndpoint as cf, type ResumePerpsSessionRequest as cg, RevokePerpsCredentialsError as ch, type RevokePerpsCredentialsRequest as ci, RevokeSessionKeyError as cj, type RevokeSessionKeyRequest as ck, type RevokeSessionKeyResult as cl, type RfqCancelQuoteAck as cm, RfqCancelQuoteError as cn, RfqCancelQuoteRejectedError as co, type RfqCancelQuoteRejectedErrorOptions as cp, type RfqConfirmationAck as cq, RfqConfirmationError as cr, RfqConfirmationRejectedError as cs, type RfqConfirmationRequestEvent as ct, type RfqEvent as cu, RfqQuoteError as cv, type RfqQuoteReference as cw, RfqQuoteRejectedError as cx, type RfqQuoteRejectedErrorOptions as cy, type RfqQuoteRequestEvent as cz, type AcceptComboQuoteParams as d, type EquityPricesEventType as d$, type SessionKeyActions as d0, SetupGaslessWalletError as d1, SetupTradingApprovalsError as d2, type SignedOrder as d3, type SignerTransactionRequest as d4, SignerType as d5, SigningError as d6, SplitPositionError as d7, SubscribeError as d8, TimeoutError as d9, allActions as dA, analyticsActions as dB, createPublicClient as dC, createSecureClient as dD, dataActions as dE, discoveryActions as dF, forkEnvironmentConfig as dG, makeErrorGuard as dH, perpsActions as dI, production as dJ, rewardsActions as dK, rfqActions as dL, sessionKeyActions as dM, subscriptionsActions as dN, tradingActions as dO, walletActions as dP, type CancelMarketOrdersRequest as dQ, type CancelOrderRequest as dR, type CancelOrdersRequest as dS, type CollateralReturnExecutionWorkflow as dT, type CommentsEventType as dU, type CommentsSubscription as dV, type CryptoPricesEventType as dW, type CryptoPricesSubscription as dX, DeployDepositWalletError as dY, type DownloadAccountingSnapshotRequest as dZ, type DropNotificationsRequest as d_, TradingRestriction as da, TransactionFailedError as db, type TransactionHandle as dc, type TransactionOutcome as dd, TransferErc20Error as de, TransportError as df, type TypedDataDomain as dg, type TypedDataField as dh, UnexpectedResponseError as di, UpdatePerpsLeverageError as dj, type UpdatePerpsLeverageRequest as dk, UpdatePerpsMarginError as dl, type UpdatePerpsMarginRequest as dm, WaitForComboFillError as dn, type WaitForComboFillParams as dp, type WaitForComboFillResult as dq, WaitForOrderFillSettlementError as dr, WaitForTransactionError as ds, type WalletDerivationConfig as dt, type WebSocketCloseCode as du, type WebSocketEndpoint as dv, WebSocketKnownCloseCode as dw, WithdrawFromPerpsError as dx, type WithdrawFromPerpsRequest as dy, accountActions as dz, type AcceptComboQuoteResult as e, type ListClosedPositionsRequest as e$, type EquityPricesSubscription as e0, type Erc1155ApprovalForAllWorkflow as e1, type Erc1155ApprovalForAllWorkflowRequest as e2, type Erc20ApprovalWorkflow as e3, type Erc20ApprovalWorkflowRequest as e4, type Erc20TransferWorkflow as e5, type Erc20TransferWorkflowRequest as e6, type EstimateMarketBuyPriceRequest as e7, type EstimateMarketPriceRequest as e8, type EstimateMarketSellPriceRequest as e9, type FetchOrderScoringRequest as eA, type FetchOrdersScoringRequest as eB, type FetchPortfolioValueRequest as eC, type FetchPriceHistoryRequest as eD, type FetchPriceRequest as eE, type FetchPricesRequest as eF, type FetchPublicProfileRequest as eG, type FetchRelatedTagResourcesRequest as eH, type FetchRelatedTagsRequest as eI, type FetchSeriesRequest as eJ, type FetchSpreadRequest as eK, type FetchSpreadsRequest as eL, type FetchTagRequest as eM, FetchTickSizeError as eN, type FetchTickSizeRequest as eO, type FetchTotalEarningsForUserForDayRequest as eP, type FetchTradedMarketCountRequest as eQ, GaslessTransactionMetadataSchema as eR, type GaslessWorkflow as eS, type GaslessWorkflowRequest as eT, IsWalletDeployedError as eU, type IsWalletDeployedRequest as eV, type ListAccountTradesRequest as eW, type ListActivityRequest as eX, type ListBuilderLeaderboardRequest as eY, type ListBuilderTradesRequest as eZ, type ListBuilderVolumeRequest as e_, type EventForSubscriptionSpec as ea, type EventForSubscriptionSpecs as eb, FetchBalanceAllowanceError as ec, type FetchBalanceAllowanceRequest as ed, FetchBuilderFeeRatesError as ee, type FetchBuilderFeeRatesRequest as ef, type FetchCommentsByIdRequest as eg, type FetchEventLiveVolumeRequest as eh, type FetchEventRequest as ei, type FetchEventTagsRequest as ej, FetchExecuteParamsError as ek, type FetchExecuteParamsRequest as el, type FetchGaslessTransactionRequest as em, type FetchLastTradePriceRequest as en, type FetchLastTradePricesRequest as eo, FetchMarketInfoError as ep, type FetchMarketInfoRequest as eq, type FetchMarketRequest as er, type FetchMarketTagsRequest as es, type FetchMidpointRequest as et, type FetchMidpointsRequest as eu, FetchNegRiskError as ev, type FetchNegRiskRequest as ew, type FetchOrderBookRequest as ex, type FetchOrderBooksRequest as ey, type FetchOrderRequest as ez, type AccountIdentity as f, PreparePerpsDepositError as f$, type ListComboActivityRequest as f0, type ListComboMarketsRequest as f1, type ListComboPositionsRequest as f2, type ListCommentsByUserAddressRequest as f3, type ListCommentsRequest as f4, type ListCurrentRewardsRequest as f5, type ListEventsRequest as f6, ListMarketClarificationsError as f7, type ListMarketClarificationsRequest as f8, type ListMarketHoldersRequest as f9, type PerpsDepositWorkflowRequest as fA, type PerpsMarketDataEventType as fB, type PerpsMarketDataSubscription as fC, type PerpsStatisticsSubscription as fD, type PerpsStreamingCandleInterval as fE, type PerpsTickersSubscription as fF, type PerpsTradesSubscription as fG, type PostOrdersRequest as fH, PrepareCollateralReturnExecutionError as fI, PrepareErc1155ApprovalForAllError as fJ, type PrepareErc1155ApprovalForAllRequest as fK, PrepareErc20ApprovalError as fL, type PrepareErc20ApprovalRequest as fM, PrepareErc20TransferError as fN, type PrepareErc20TransferRequest as fO, PrepareGaslessTransactionError as fP, type PrepareGaslessTransactionRequest as fQ, type PrepareLimitOrderRequest as fR, type PrepareMarketBuyOrderRequest as fS, type PrepareMarketOrderRequest as fT, type PrepareMarketSellOrderRequest as fU, PrepareMergeComboPositionError as fV, type PrepareMergeComboPositionRequest as fW, PrepareMergeMarketPositionError as fX, type PrepareMergeMarketPositionRequest as fY, PrepareMergePositionsError as fZ, type PrepareMergePositionsRequest as f_, type ListMarketPositionsRequest as fa, type ListMarketRewardsRequest as fb, type ListMarketsRequest as fc, type ListOpenInterestRequest as fd, type ListOpenOrdersRequest as fe, type ListPositionsRequest as ff, type ListSeriesRequest as fg, type ListTagsRequest as fh, type ListTeamsRequest as fi, type ListTraderLeaderboardRequest as fj, type ListTradesRequest as fk, type ListUserEarningsAndMarketsConfigRequest as fl, type ListUserEarningsForDayRequest as fm, type MarketEventType as fn, type MarketSubscription as fo, MergeComboPositionError as fp, MergeMarketPositionError as fq, type MergePositionsWorkflow as fr, type MergePositionsWorkflowRequest as fs, type OrderPostingWorkflow as ft, type OrderWorkflow as fu, type OrderWorkflowRequest as fv, type PerpsBboSubscription as fw, type PerpsBookSubscription as fx, type PerpsCandlesSubscription as fy, type PerpsDepositWorkflow as fz, type AnalyticsActions as g, fetchEvent as g$, PrepareRedeemComboPositionError as g0, type PrepareRedeemComboPositionRequest as g1, type PrepareRedeemMarketPositionsByConditionIdRequest as g2, type PrepareRedeemMarketPositionsByMarketIdRequest as g3, PrepareRedeemMarketPositionsError as g4, type PrepareRedeemMarketPositionsRequest as g5, PrepareRedeemPositionsError as g6, type PrepareRedeemPositionsRequest as g7, PrepareSplitComboPositionError as g8, type PrepareSplitComboPositionRequest as g9, type TradingApprovalsWorkflow as gA, type TradingApprovalsWorkflowRequest as gB, UpdateBalanceAllowanceError as gC, type UpdateBalanceAllowanceRequest as gD, type UserEventType as gE, type UserSubscription as gF, WaitForGaslessTransactionError as gG, type WaitForOrderFillSettlementRequest as gH, acceptComboQuote as gI, approveErc1155ForAll as gJ, approveErc20 as gK, authorizeSessionKey as gL, cancelAll as gM, cancelMarketOrders as gN, cancelOrder as gO, cancelOrders as gP, deployDepositWallet as gQ, depositToPerps as gR, downloadAccountingSnapshot as gS, dropNotifications as gT, estimateMarketPrice as gU, executeCollateralReturnPlan as gV, fetchBalanceAllowance as gW, fetchBuilderFeeRates as gX, fetchBuilderVolume as gY, fetchClosedOnlyMode as gZ, fetchCommentsById as g_, PrepareSplitMarketPositionError as ga, type PrepareSplitMarketPositionRequest as gb, PrepareSplitPositionError as gc, type PrepareSplitPositionRequest as gd, PrepareTradingApprovalsError as ge, type PublicRealtimeEvent as gf, type PublicRealtimeTopic as gg, type PublicSubscriptionSpec as gh, type RedeemPositionsWorkflow as gi, type RedeemPositionsWorkflowRequest as gj, ResolveConditionByTokenError as gk, type ResolveConditionByTokenRequest as gl, type RfqConfirmationRejectedErrorOptions as gm, type RfqExecutionUpdateEvent as gn, type SearchRequest as go, type SearchResults as gp, type SecureRealtimeEvent as gq, type SecureRealtimeTopic as gr, type SecureSubscriptionSpec as gs, SplitComboPositionError as gt, SplitMarketPositionError as gu, type SplitPositionWorkflow as gv, type SplitPositionWorkflowRequest as gw, type SportsEventType as gx, type SportsSubscription as gy, type SubscriptionHandle as gz, ApproveErc1155ForAllError as h, listPositions as h$, fetchEventLiveVolume as h0, fetchEventTags as h1, fetchExecuteParams as h2, fetchLastTradePrice as h3, fetchLastTradePrices as h4, fetchMarket as h5, fetchMarketInfo as h6, fetchMarketTags as h7, fetchMidpoint as h8, fetchMidpoints as h9, fetchTickSize as hA, fetchTotalEarningsForUserForDay as hB, fetchTradedMarketCount as hC, fetchTransaction as hD, isWalletDeployed as hE, listAccountTrades as hF, listActivity as hG, listBuilderLeaderboard as hH, listBuilderTrades as hI, listClosedPositions as hJ, listComboActivity as hK, listComboMarkets as hL, listComboPositions as hM, listComments as hN, listCommentsByUserAddress as hO, listCurrentRewards as hP, listEvents as hQ, listMarketClarifications as hR, listMarketHolders as hS, listMarketPositions as hT, listMarketRewards as hU, listMarkets as hV, listOpenInterest as hW, listOpenOrders as hX, listPerpsCandles as hY, listPerpsFundingHistory as hZ, listPerpsTrades as h_, fetchNegRisk as ha, fetchNotifications as hb, fetchOrder as hc, fetchOrderBook as hd, fetchOrderBooks as he, fetchOrderScoring as hf, fetchOrdersScoring as hg, fetchPerpsBook as hh, fetchPerpsFees as hi, fetchPerpsInstruments as hj, fetchPerpsTicker as hk, fetchPerpsTickers as hl, fetchPortfolioValue as hm, fetchPrice as hn, fetchPriceHistory as ho, fetchPrices as hp, fetchPublicProfile as hq, fetchRelatedTagResources as hr, fetchRelatedTags as hs, fetchRewardPercentages as ht, fetchRfqStatus as hu, fetchSeries as hv, fetchSessionKeys as hw, fetchSpread as hx, fetchSpreads as hy, fetchTag as hz, ApproveErc20Error as i, listSeries as i0, listTags as i1, listTeams as i2, listTraderLeaderboard as i3, listTrades as i4, listUserEarningsAndMarketsConfig as i5, listUserEarningsForDay as i6, mergeComboPosition as i7, mergeMarketPosition as i8, mergePositions as i9, revokePerpsCredentials as iA, revokeSessionKey as iB, search as iC, setupTradingApprovals as iD, splitComboPosition as iE, splitMarketPosition as iF, splitPosition as iG, subscribe as iH, transferErc20 as iI, updateBalanceAllowance as iJ, waitForComboFill as iK, waitForOrderFillSettlement as iL, withdrawFromPerps as iM, openPerpsSession as ia, openRfqSession as ib, planCollateralReturn as ic, postOrder as id, postOrders as ie, prepareCollateralReturnExecution as ig, prepareErc1155ApprovalForAll as ih, prepareErc20Approval as ii, prepareErc20Transfer as ij, prepareGaslessTransaction as ik, prepareMergeComboPosition as il, prepareMergeMarketPosition as im, prepareMergePositions as io, preparePerpsDeposit as ip, prepareRedeemComboPosition as iq, prepareRedeemMarketPositions as ir, prepareRedeemPositions as is, prepareSplitComboPosition as it, prepareSplitMarketPosition as iu, prepareSplitPosition as iv, prepareTradingApprovals as iw, redeemPositions as ix, requestComboQuote as iy, resolveConditionByToken as iz, ArmPerpsAutoCancelError as j, type ArmPerpsAutoCancelRequest as k, AuthorizeSessionKeyError as l, type AuthorizeSessionKeyRequest as m, type AuthorizeSessionKeyResult as n, AutoCancelDailyLimitError as o, BasePublicClient as p, BaseSecureClient as q, type BeginAuthenticationRequest as r, type CancelAllPerpsOrdersRequest as s, CancelMarketOrdersError as t, CancelOrderError as u, CancelOrdersError as v, type CancelPerpsOrderRequest as w, type CancelPerpsOrdersRequest as x, CancelledSigningError as y, type Client as z };
|