@lifi/perps-types 3.3.2 → 4.0.1
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/cjs/account.d.ts +11 -2
- package/dist/cjs/account.d.ts.map +1 -1
- package/dist/cjs/action.d.ts +1 -0
- package/dist/cjs/action.d.ts.map +1 -1
- package/dist/cjs/asset.d.ts.map +1 -1
- package/dist/cjs/enums.d.ts +5 -0
- package/dist/cjs/enums.d.ts.map +1 -1
- package/dist/cjs/enums.js +7 -1
- package/dist/cjs/enums.js.map +1 -1
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/market.d.ts +4 -0
- package/dist/cjs/market.d.ts.map +1 -1
- package/dist/cjs/primitives.d.ts.map +1 -1
- package/dist/cjs/providers.d.ts.map +1 -1
- package/dist/cjs/subscriptions.d.ts.map +1 -1
- package/dist/cjs/typedData.d.ts.map +1 -1
- package/dist/cjs/vote.d.ts.map +1 -1
- package/dist/cjs/vote.js.map +1 -1
- package/dist/esm/account.d.ts +223 -32
- package/dist/esm/account.d.ts.map +1 -1
- package/dist/esm/action.d.ts +205 -37
- package/dist/esm/action.d.ts.map +1 -1
- package/dist/esm/asset.d.ts +1 -4
- package/dist/esm/asset.d.ts.map +1 -1
- package/dist/esm/enums.d.ts +43 -20
- package/dist/esm/enums.d.ts.map +1 -1
- package/dist/esm/enums.js +43 -19
- package/dist/esm/enums.js.map +1 -1
- package/dist/esm/errors.d.ts +6 -1
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/market.d.ts +57 -15
- package/dist/esm/market.d.ts.map +1 -1
- package/dist/esm/primitives.d.ts +12 -2
- package/dist/esm/primitives.d.ts.map +1 -1
- package/dist/esm/providers.d.ts +19 -6
- package/dist/esm/providers.d.ts.map +1 -1
- package/dist/esm/quote.d.ts +2 -2
- package/dist/esm/quote.d.ts.map +1 -1
- package/dist/esm/subscriptions.d.ts +27 -19
- package/dist/esm/subscriptions.d.ts.map +1 -1
- package/dist/esm/typedData.d.ts +15 -5
- package/dist/esm/typedData.d.ts.map +1 -1
- package/dist/esm/vote.d.ts +1 -3
- package/dist/esm/vote.d.ts.map +1 -1
- package/dist/esm/vote.js.map +1 -1
- package/dist/types/account.d.ts +223 -32
- package/dist/types/account.d.ts.map +1 -1
- package/dist/types/action.d.ts +205 -37
- package/dist/types/action.d.ts.map +1 -1
- package/dist/types/asset.d.ts +1 -4
- package/dist/types/asset.d.ts.map +1 -1
- package/dist/types/enums.d.ts +43 -20
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/errors.d.ts +6 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/market.d.ts +57 -15
- package/dist/types/market.d.ts.map +1 -1
- package/dist/types/primitives.d.ts +12 -2
- package/dist/types/primitives.d.ts.map +1 -1
- package/dist/types/providers.d.ts +19 -6
- package/dist/types/providers.d.ts.map +1 -1
- package/dist/types/quote.d.ts +2 -2
- package/dist/types/quote.d.ts.map +1 -1
- package/dist/types/subscriptions.d.ts +27 -19
- package/dist/types/subscriptions.d.ts.map +1 -1
- package/dist/types/typedData.d.ts +15 -5
- package/dist/types/typedData.d.ts.map +1 -1
- package/dist/types/vote.d.ts +1 -3
- package/dist/types/vote.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/account.ts +225 -37
- package/src/action.ts +205 -37
- package/src/asset.ts +1 -4
- package/src/enums.ts +44 -20
- package/src/errors.ts +6 -1
- package/src/market.ts +69 -16
- package/src/primitives.ts +12 -2
- package/src/providers.ts +19 -6
- package/src/quote.ts +2 -2
- package/src/subscriptions.ts +27 -19
- package/src/typedData.ts +15 -5
- package/src/vote.ts +1 -3
package/dist/types/action.d.ts
CHANGED
|
@@ -4,12 +4,21 @@ import type { MarketDisplay, MarketRef } from './market.js';
|
|
|
4
4
|
import type { Address, Hex } from './primitives.js';
|
|
5
5
|
import type { PerpsTypedData } from './typedData.js';
|
|
6
6
|
import type { VoteParams } from './vote.js';
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Unsigned EIP-712 action step containing typed data for client signing.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
8
12
|
export interface Eip712ActionStep {
|
|
9
13
|
action: ActionType;
|
|
10
14
|
typedData: PerpsTypedData;
|
|
11
15
|
}
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Unsigned WASM-blob action step containing provider-specific signing
|
|
18
|
+
* parameters for the client.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
13
22
|
export interface WasmBlobActionStep {
|
|
14
23
|
action: ActionType;
|
|
15
24
|
wasmSignParams: Record<string, unknown>;
|
|
@@ -25,11 +34,17 @@ export interface EvmCall {
|
|
|
25
34
|
chainId: number;
|
|
26
35
|
to: Address;
|
|
27
36
|
functionName: string;
|
|
37
|
+
/** Function arguments supplied to the contract call in declaration order. */
|
|
28
38
|
args: readonly unknown[];
|
|
29
39
|
/** Human-readable ABI signatures, e.g. `'function approve(address,uint256) returns (bool)'`, fed to viem `parseAbi`. */
|
|
30
40
|
abi: readonly string[];
|
|
31
41
|
}
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Unsigned EVM transaction action step. `txParams` describes the call that the
|
|
44
|
+
* client encodes and submits.
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
33
48
|
export interface EvmTxActionStep {
|
|
34
49
|
action: ActionType;
|
|
35
50
|
txParams: EvmCall;
|
|
@@ -63,13 +78,21 @@ export interface HmacActionStep {
|
|
|
63
78
|
* @public
|
|
64
79
|
*/
|
|
65
80
|
export interface CreateDepositAddressSessionMarker {
|
|
81
|
+
/** Source network for the provider deposit address. */
|
|
66
82
|
network: 'ethereum';
|
|
83
|
+
/** Deposit asset symbol; currently constrained to USDC. */
|
|
67
84
|
symbol: 'USDC';
|
|
85
|
+
/** Provider wallet destination policy; currently constrained to margin. */
|
|
68
86
|
depositDestination: {
|
|
69
87
|
wallet: 'margin';
|
|
70
88
|
};
|
|
71
89
|
}
|
|
72
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Client-only session action step, with a provider session request marker or
|
|
92
|
+
* an empty session payload for actions that do not need one.
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
73
96
|
export type SessionActionStep = {
|
|
74
97
|
action: Exclude<ActionType, ActionType.CREATE_DEPOSIT_ADDRESS>;
|
|
75
98
|
session: Record<string, never>;
|
|
@@ -77,24 +100,41 @@ export type SessionActionStep = {
|
|
|
77
100
|
action: ActionType.CREATE_DEPOSIT_ADDRESS;
|
|
78
101
|
session: CreateDepositAddressSessionMarker;
|
|
79
102
|
};
|
|
80
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Unsigned SIWE action step containing the backend-issued login challenge.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
81
108
|
export interface SiweActionStep {
|
|
82
109
|
action: ActionType;
|
|
83
110
|
siwe: {
|
|
111
|
+
/** Backend identifier for the SIWE challenge. */
|
|
84
112
|
challengeId: string;
|
|
85
113
|
/** The backend-built ERC-4361 challenge the wallet must `personal_sign`. */
|
|
86
114
|
message: string;
|
|
87
115
|
};
|
|
88
116
|
}
|
|
89
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Union of all unsigned action-step encodings produced by `createAction`.
|
|
119
|
+
*
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
90
122
|
export type ActionStep = Eip712ActionStep | WasmBlobActionStep | EvmTxActionStep | HmacActionStep | SessionActionStep | SiweActionStep;
|
|
91
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Signed EIP-712 action step ready for backend execution.
|
|
125
|
+
*
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
92
128
|
export interface Eip712SignedActionStep {
|
|
93
129
|
action: ActionType;
|
|
94
130
|
typedData: PerpsTypedData;
|
|
95
131
|
signature: Hex;
|
|
96
132
|
}
|
|
97
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* Signed WASM-blob action step, including provider wire transaction details.
|
|
135
|
+
*
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
98
138
|
export interface WasmBlobSignedActionStep {
|
|
99
139
|
action: ActionType;
|
|
100
140
|
wasmSignParams: Record<string, unknown>;
|
|
@@ -104,13 +144,21 @@ export interface WasmBlobSignedActionStep {
|
|
|
104
144
|
txHash: string;
|
|
105
145
|
};
|
|
106
146
|
}
|
|
107
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Signed EVM transaction action step with the submitted transaction hash.
|
|
149
|
+
*
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
108
152
|
export interface EvmTxSignedActionStep {
|
|
109
153
|
action: ActionType;
|
|
110
154
|
txParams: EvmCall;
|
|
111
155
|
txHash: string;
|
|
112
156
|
}
|
|
113
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* HMAC-authenticated venue request ready for backend execution.
|
|
159
|
+
*
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
114
162
|
export interface HmacSignedActionStep {
|
|
115
163
|
action: ActionType;
|
|
116
164
|
request: HmacActionStep['request'];
|
|
@@ -125,15 +173,28 @@ export interface HmacSignedActionStep {
|
|
|
125
173
|
signature: string;
|
|
126
174
|
};
|
|
127
175
|
}
|
|
128
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Signed SIWE login action step.
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
129
181
|
export interface SiweSignedActionStep {
|
|
130
182
|
action: ActionType;
|
|
131
183
|
siwe: SiweActionStep['siwe'];
|
|
132
184
|
signature: Hex;
|
|
133
185
|
}
|
|
134
|
-
/**
|
|
186
|
+
/**
|
|
187
|
+
* Union of all signed action-step encodings accepted by `executeAction`.
|
|
188
|
+
*
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
135
191
|
export type SignedActionStep = Eip712SignedActionStep | WasmBlobSignedActionStep | EvmTxSignedActionStep | HmacSignedActionStep | SiweSignedActionStep;
|
|
136
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Per-action execution result. Success arms may include a provider order id;
|
|
194
|
+
* failure arms carry a message and optional structured error code.
|
|
195
|
+
*
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
137
198
|
export type ActionResult = {
|
|
138
199
|
action: ActionType;
|
|
139
200
|
success: true;
|
|
@@ -145,12 +206,26 @@ export type ActionResult = {
|
|
|
145
206
|
/** Structured classification of the failure, when the backend can provide one. */
|
|
146
207
|
errorCode?: PerpsErrorCode;
|
|
147
208
|
};
|
|
148
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Trigger prices used to configure take-profit or stop-loss behavior.
|
|
211
|
+
* Prices are decimal strings in the market's quote currency.
|
|
212
|
+
*
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
149
215
|
export interface TriggerOrderInput {
|
|
150
216
|
triggerPrice: string;
|
|
151
217
|
limitPrice?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Base-asset size the trigger closes. Omitted covers the entire position,
|
|
220
|
+
* tracking later size changes; set, it is a fixed partial amount.
|
|
221
|
+
*/
|
|
222
|
+
size?: string;
|
|
152
223
|
}
|
|
153
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* Mutable fields for an existing order, identified by venue order id.
|
|
226
|
+
*
|
|
227
|
+
* @public
|
|
228
|
+
*/
|
|
154
229
|
export interface ModifyOrderInput {
|
|
155
230
|
id: string;
|
|
156
231
|
price?: string;
|
|
@@ -158,7 +233,12 @@ export interface ModifyOrderInput {
|
|
|
158
233
|
triggerPrice?: string;
|
|
159
234
|
limitPrice?: string;
|
|
160
235
|
}
|
|
161
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* Normalized order returned by a provider, including lifecycle and trigger
|
|
238
|
+
* metadata. Quantities and prices are decimal strings.
|
|
239
|
+
*
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
162
242
|
export interface Order {
|
|
163
243
|
orderId: string;
|
|
164
244
|
market: MarketDisplay;
|
|
@@ -181,7 +261,11 @@ export interface Order {
|
|
|
181
261
|
createdAt: string;
|
|
182
262
|
updatedAt: string;
|
|
183
263
|
}
|
|
184
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Parameters for placing a regular order on a market.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
185
269
|
export interface PlaceOrderParams {
|
|
186
270
|
market: MarketRef;
|
|
187
271
|
side: OrderSide;
|
|
@@ -197,14 +281,22 @@ export interface PlaceOrderParams {
|
|
|
197
281
|
takeProfit?: TriggerOrderInput;
|
|
198
282
|
stopLoss?: TriggerOrderInput;
|
|
199
283
|
}
|
|
200
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* Parameters for placing a take-profit or stop-loss trigger order.
|
|
286
|
+
*
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
201
289
|
export interface PlaceTriggerOrderParams {
|
|
202
290
|
market: MarketRef;
|
|
203
291
|
side: OrderSide;
|
|
204
292
|
takeProfit?: TriggerOrderInput;
|
|
205
293
|
stopLoss?: TriggerOrderInput;
|
|
206
294
|
}
|
|
207
|
-
/**
|
|
295
|
+
/**
|
|
296
|
+
* Parameters for cancelling one or more venue orders.
|
|
297
|
+
*
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
208
300
|
export interface CancelOrderParams {
|
|
209
301
|
/** Venue order ids. Venues whose ids are scoped per market (e.g. Lighter's
|
|
210
302
|
* `order_index`) also accept the composite `"<market_id>:<order_id>"`. */
|
|
@@ -212,36 +304,61 @@ export interface CancelOrderParams {
|
|
|
212
304
|
/** Market context for per-market order ids; the order's `market.id`. */
|
|
213
305
|
assetId?: string;
|
|
214
306
|
}
|
|
215
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* Parameters for applying one or more modifications to existing orders.
|
|
309
|
+
*
|
|
310
|
+
* @public
|
|
311
|
+
*/
|
|
216
312
|
export interface ModifyOrderParams {
|
|
217
313
|
modifications: ModifyOrderInput[];
|
|
218
314
|
}
|
|
219
|
-
/**
|
|
315
|
+
/**
|
|
316
|
+
* Parameters for changing leverage on a market.
|
|
317
|
+
*
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
220
320
|
export interface UpdateLeverageParams {
|
|
221
321
|
market: MarketRef;
|
|
222
322
|
leverage: number;
|
|
223
323
|
/** Omitted falls back to the provider's default (currently CROSS). */
|
|
224
324
|
marginMode?: MarginMode;
|
|
225
325
|
}
|
|
226
|
-
/**
|
|
326
|
+
/**
|
|
327
|
+
* Parameters for adding or removing margin from a market position.
|
|
328
|
+
* `amount` is a decimal string in the venue's collateral units.
|
|
329
|
+
*
|
|
330
|
+
* @public
|
|
331
|
+
*/
|
|
227
332
|
export interface UpdatePositionMarginParams {
|
|
228
333
|
market: MarketRef;
|
|
229
334
|
action: 'add' | 'remove';
|
|
230
335
|
amount: string;
|
|
231
336
|
}
|
|
232
|
-
/**
|
|
337
|
+
/**
|
|
338
|
+
* Parameters for enabling or disabling an asset as cross-margin collateral.
|
|
339
|
+
*
|
|
340
|
+
* @public
|
|
341
|
+
*/
|
|
233
342
|
export interface UpdateAssetCollateralParams {
|
|
234
343
|
/** Provider-native spot asset id (matches `Asset.id`), keyed per asset — not per market. */
|
|
235
344
|
assetId: string;
|
|
236
345
|
/** Whether this asset's balance counts toward the cross-margin collateral pool. */
|
|
237
346
|
enabled: boolean;
|
|
238
347
|
}
|
|
239
|
-
/**
|
|
348
|
+
/**
|
|
349
|
+
* Parameters for withdrawing a decimal-string amount to an EVM address.
|
|
350
|
+
*
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
240
353
|
export interface WithdrawalParams {
|
|
241
354
|
destination: Address;
|
|
242
355
|
amount: string;
|
|
243
356
|
}
|
|
244
|
-
/**
|
|
357
|
+
/**
|
|
358
|
+
* Parameters for depositing a token from an EVM source chain.
|
|
359
|
+
*
|
|
360
|
+
* @public
|
|
361
|
+
*/
|
|
245
362
|
export interface DepositParams {
|
|
246
363
|
/** Amount of the token to deposit (human-readable, e.g. "100.5"). */
|
|
247
364
|
amount: string;
|
|
@@ -250,20 +367,37 @@ export interface DepositParams {
|
|
|
250
367
|
/** Chain ID of the source chain (e.g. 1 for Ethereum, 42161 for Arbitrum). */
|
|
251
368
|
chainId: number;
|
|
252
369
|
}
|
|
253
|
-
/**
|
|
370
|
+
/**
|
|
371
|
+
* Parameters for approving an account agent, including an optional TTL in
|
|
372
|
+
* milliseconds.
|
|
373
|
+
*
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
254
376
|
export interface ApproveAgentParams {
|
|
255
377
|
agentAddress: string;
|
|
256
378
|
agentTtlMs?: number;
|
|
257
379
|
}
|
|
258
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Parameters for selecting a provider account mode by its wire value.
|
|
382
|
+
*
|
|
383
|
+
* @public
|
|
384
|
+
*/
|
|
259
385
|
export interface AccountModeParams {
|
|
260
386
|
mode: string;
|
|
261
387
|
}
|
|
262
|
-
/**
|
|
388
|
+
/**
|
|
389
|
+
* Parameters for selecting a provider account tier by its wire value.
|
|
390
|
+
*
|
|
391
|
+
* @public
|
|
392
|
+
*/
|
|
263
393
|
export interface AccountTypeParams {
|
|
264
394
|
tier: string;
|
|
265
395
|
}
|
|
266
|
-
/**
|
|
396
|
+
/**
|
|
397
|
+
* Parameters for moving an asset between provider DEX accounts.
|
|
398
|
+
*
|
|
399
|
+
* @public
|
|
400
|
+
*/
|
|
267
401
|
export interface SendAssetParams {
|
|
268
402
|
/** Canonical `Asset.id` of the asset being moved (for Hyperliquid spot
|
|
269
403
|
* assets, the token index as a string) — never a display symbol. */
|
|
@@ -272,14 +406,23 @@ export interface SendAssetParams {
|
|
|
272
406
|
destinationDex: string;
|
|
273
407
|
amount: string;
|
|
274
408
|
}
|
|
275
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* Parameters for cancelling all orders immediately or through a scheduled
|
|
411
|
+
* cancellation instruction.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
276
415
|
export interface CancelAllOrdersParams {
|
|
277
416
|
/** 0=immediate (cancel GTC), 1=scheduled, 2=abort scheduled */
|
|
278
417
|
timeInForce: number;
|
|
279
418
|
/** Unix timestamp in milliseconds (required for scheduled cancels) */
|
|
280
419
|
timestampMs?: number;
|
|
281
420
|
}
|
|
282
|
-
/**
|
|
421
|
+
/**
|
|
422
|
+
* Parameters for registering a provider API key in a specific slot.
|
|
423
|
+
*
|
|
424
|
+
* @public
|
|
425
|
+
*/
|
|
283
426
|
export interface RegisterApiKeyParams {
|
|
284
427
|
/** The API key slot index to register (0-255). Reusing a fixed slot overwrites the old key. */
|
|
285
428
|
apiKeyIndex: number;
|
|
@@ -291,14 +434,23 @@ export interface RegisterApiKeyParams {
|
|
|
291
434
|
*/
|
|
292
435
|
knownPublicKey?: string;
|
|
293
436
|
}
|
|
294
|
-
/**
|
|
437
|
+
/**
|
|
438
|
+
* Parameters for approving a Lighter read-only token and its scope/expiry.
|
|
439
|
+
*
|
|
440
|
+
* @public
|
|
441
|
+
*/
|
|
295
442
|
export interface ApproveReadOnlyTokenParams {
|
|
296
443
|
accountIndex: number;
|
|
297
444
|
/** Absolute unix-seconds expiry. Lighter requires lifetime between 1 day and 10 years. */
|
|
298
445
|
expirySeconds: number;
|
|
299
446
|
scope: 'single' | 'all';
|
|
300
447
|
}
|
|
301
|
-
/**
|
|
448
|
+
/**
|
|
449
|
+
* Mapping from each {@link ActionType} to its action-specific parameter shape.
|
|
450
|
+
* `Record<string, never>` marks actions whose params object must be empty.
|
|
451
|
+
*
|
|
452
|
+
* @public
|
|
453
|
+
*/
|
|
302
454
|
export interface ActionParamsMap {
|
|
303
455
|
[ActionType.APPROVE_AGENT]: ApproveAgentParams;
|
|
304
456
|
[ActionType.APPROVE_BUILDER_FEE]: Record<string, never>;
|
|
@@ -326,7 +478,11 @@ export interface ActionParamsMap {
|
|
|
326
478
|
[ActionType.META_VOTE]: VoteParams;
|
|
327
479
|
[ActionType.META_ACCEPT_TERMS]: AcceptTermsParams;
|
|
328
480
|
}
|
|
329
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* Discriminated request sent to create unsigned steps for one action.
|
|
483
|
+
*
|
|
484
|
+
* @public
|
|
485
|
+
*/
|
|
330
486
|
export type CreateActionRequest = {
|
|
331
487
|
[K in ActionType]: {
|
|
332
488
|
provider: string;
|
|
@@ -336,11 +492,19 @@ export type CreateActionRequest = {
|
|
|
336
492
|
params: ActionParamsMap[K];
|
|
337
493
|
};
|
|
338
494
|
}[ActionType];
|
|
339
|
-
/**
|
|
495
|
+
/**
|
|
496
|
+
* Response containing the unsigned steps created for an action request.
|
|
497
|
+
*
|
|
498
|
+
* @public
|
|
499
|
+
*/
|
|
340
500
|
export interface CreateActionResponse {
|
|
341
501
|
actions: ActionStep[];
|
|
342
502
|
}
|
|
343
|
-
/**
|
|
503
|
+
/**
|
|
504
|
+
* Discriminated request sent to execute signed steps for one action.
|
|
505
|
+
*
|
|
506
|
+
* @public
|
|
507
|
+
*/
|
|
344
508
|
export type ExecuteActionRequest = {
|
|
345
509
|
[K in ActionType]: {
|
|
346
510
|
provider: string;
|
|
@@ -350,7 +514,11 @@ export type ExecuteActionRequest = {
|
|
|
350
514
|
actions: SignedActionStep[];
|
|
351
515
|
};
|
|
352
516
|
}[ActionType];
|
|
353
|
-
/**
|
|
517
|
+
/**
|
|
518
|
+
* Response containing per-action execution results.
|
|
519
|
+
*
|
|
520
|
+
* @public
|
|
521
|
+
*/
|
|
354
522
|
export interface ExecuteActionResponse {
|
|
355
523
|
results: ActionResult[];
|
|
356
524
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,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E,CAAA;CACxB"}
|
package/dist/types/asset.d.ts
CHANGED
|
@@ -54,14 +54,11 @@ export interface DepositAsset {
|
|
|
54
54
|
address: Address;
|
|
55
55
|
/** ERC-20 decimals, used to scale deposit amounts. */
|
|
56
56
|
decimals: number;
|
|
57
|
-
/** Display ticker for UI labels; same semantics as {@link Asset.displaySymbol}. */
|
|
58
57
|
displaySymbol: string;
|
|
59
|
-
/** Token logo for UI; same semantics as {@link Asset.logoURI}. */
|
|
60
58
|
logoURI: string;
|
|
61
|
-
/** Optional longer display name; same semantics as {@link Asset.displayName}. */
|
|
62
59
|
displayName?: string;
|
|
63
60
|
}
|
|
64
|
-
/** @public */
|
|
61
|
+
/** Response containing the provider's normalized asset registry. @public */
|
|
65
62
|
export interface AssetsResponse {
|
|
66
63
|
assets: Asset[];
|
|
67
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,iHAAiH;IACjH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAA;IAChB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAA;IAChB,
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,iHAAiH;IACjH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAA;IAChB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB"}
|
package/dist/types/enums.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Numeric error codes returned by the perps API.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare enum PerpsErrorCode {
|
|
3
7
|
DefaultError = 2000,
|
|
4
8
|
ServerError = 2001,
|
|
@@ -24,12 +28,12 @@ export declare enum PerpsErrorCode {
|
|
|
24
28
|
PayloadMismatch = 2050,
|
|
25
29
|
RouteNotFound = 2060
|
|
26
30
|
}
|
|
27
|
-
/** @public */
|
|
31
|
+
/** Side of an order or execution, using provider wire values. @public */
|
|
28
32
|
export declare enum OrderSide {
|
|
29
33
|
BUY = "BUY",
|
|
30
34
|
SELL = "SELL"
|
|
31
35
|
}
|
|
32
|
-
/** @public */
|
|
36
|
+
/** Supported regular and trigger order kinds, using provider wire values. @public */
|
|
33
37
|
export declare enum OrderType {
|
|
34
38
|
MARKET = "MARKET",
|
|
35
39
|
LIMIT = "LIMIT",
|
|
@@ -39,24 +43,33 @@ export declare enum OrderType {
|
|
|
39
43
|
TAKE_PROFIT_LIMIT = "TAKE_PROFIT_LIMIT",
|
|
40
44
|
TRIGGER_ONLY = "TRIGGER_ONLY"
|
|
41
45
|
}
|
|
42
|
-
/** @public */
|
|
46
|
+
/** Direction of an open position. @public */
|
|
43
47
|
export declare enum PositionSide {
|
|
44
48
|
LONG = "LONG",
|
|
45
49
|
SHORT = "SHORT"
|
|
46
50
|
}
|
|
47
|
-
/** @public */
|
|
51
|
+
/** Margin allocation mode for a position. @public */
|
|
48
52
|
export declare enum MarginMode {
|
|
49
53
|
ISOLATED = "ISOLATED",
|
|
50
54
|
CROSS = "CROSS"
|
|
51
55
|
}
|
|
52
|
-
/** @public */
|
|
56
|
+
/** Per-market support for changing an open position's dedicated margin. @public */
|
|
57
|
+
export declare enum PositionMarginAdjustment {
|
|
58
|
+
/** The venue does not expose individual position margin. */
|
|
59
|
+
NONE = "NONE",
|
|
60
|
+
/** Margin can be added but cannot be removed. */
|
|
61
|
+
ADD_ONLY = "ADD_ONLY",
|
|
62
|
+
/** Margin can be added and removed. */
|
|
63
|
+
ADD_AND_REMOVE = "ADD_AND_REMOVE"
|
|
64
|
+
}
|
|
65
|
+
/** Provider order time-in-force policies. @public */
|
|
53
66
|
export declare enum TimeInForce {
|
|
54
67
|
GTC = "GTC",
|
|
55
68
|
IOC = "IOC",
|
|
56
69
|
POST_ONLY = "POST_ONLY",
|
|
57
70
|
GTT = "GTT"
|
|
58
71
|
}
|
|
59
|
-
/** @public */
|
|
72
|
+
/** Lifecycle status of a provider order. @public */
|
|
60
73
|
export declare enum OrderStatus {
|
|
61
74
|
PENDING = "PENDING",
|
|
62
75
|
OPEN = "OPEN",
|
|
@@ -67,19 +80,24 @@ export declare enum OrderStatus {
|
|
|
67
80
|
EXPIRED = "EXPIRED",
|
|
68
81
|
TRIGGERED = "TRIGGERED"
|
|
69
82
|
}
|
|
70
|
-
/** @public */
|
|
83
|
+
/** Lifecycle status of an execution/fill. @public */
|
|
71
84
|
export declare enum FillStatus {
|
|
72
85
|
FILLED = "FILLED",
|
|
73
86
|
PARTIALLY_FILLED = "PARTIALLY_FILLED",
|
|
74
87
|
CANCELLED = "CANCELLED",
|
|
75
88
|
REJECTED = "REJECTED"
|
|
76
89
|
}
|
|
77
|
-
/** @public */
|
|
90
|
+
/** Whether a fill supplied maker or taker liquidity. @public */
|
|
78
91
|
export declare enum LiquidityRole {
|
|
79
92
|
MAKER = "maker",
|
|
80
93
|
TAKER = "taker"
|
|
81
94
|
}
|
|
82
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Action identifiers used in setup, create-action, and execute-action
|
|
97
|
+
* requests. Values are the backend wire strings.
|
|
98
|
+
*
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
83
101
|
export declare enum ActionType {
|
|
84
102
|
APPROVE_AGENT = "approveAgent",
|
|
85
103
|
APPROVE_BUILDER_FEE = "approveBuilderFee",
|
|
@@ -110,23 +128,23 @@ export declare enum ActionType {
|
|
|
110
128
|
/** Provider-independent: sent with the `META_PROVIDER` sentinel, not a real provider key. */
|
|
111
129
|
META_ACCEPT_TERMS = "metaAcceptTerms"
|
|
112
130
|
}
|
|
113
|
-
/** @public */
|
|
131
|
+
/** Price relation that activates a trigger order. @public */
|
|
114
132
|
export declare enum TriggerCondition {
|
|
115
133
|
ABOVE = "ABOVE",
|
|
116
134
|
BELOW = "BELOW"
|
|
117
135
|
}
|
|
118
|
-
/** @public */
|
|
136
|
+
/** Take-profit or stop-loss trigger order classification. @public */
|
|
119
137
|
export declare enum TriggerOrderType {
|
|
120
138
|
TAKE_PROFIT = "TAKE_PROFIT",
|
|
121
139
|
STOP_LOSS = "STOP_LOSS"
|
|
122
140
|
}
|
|
123
|
-
/** @public */
|
|
141
|
+
/** Lifecycle status of a trigger order. @public */
|
|
124
142
|
export declare enum TriggerOrderStatus {
|
|
125
143
|
WAITING = "WAITING",
|
|
126
144
|
TRIGGERED = "TRIGGERED",
|
|
127
145
|
CANCELLED = "CANCELLED"
|
|
128
146
|
}
|
|
129
|
-
/** @public */
|
|
147
|
+
/** Account activity record categories. @public */
|
|
130
148
|
export declare enum ActivityType {
|
|
131
149
|
DEPOSIT = "DEPOSIT",
|
|
132
150
|
WITHDRAWAL = "WITHDRAWAL",
|
|
@@ -134,7 +152,7 @@ export declare enum ActivityType {
|
|
|
134
152
|
FUNDING = "FUNDING",
|
|
135
153
|
TRANSFER = "TRANSFER"
|
|
136
154
|
}
|
|
137
|
-
/** @public */
|
|
155
|
+
/** Human-readable classification of how a fill changed a position. @public */
|
|
138
156
|
export declare enum FillClassification {
|
|
139
157
|
OPENED_LONG = "Opened Long",
|
|
140
158
|
OPENED_SHORT = "Opened Short",
|
|
@@ -149,21 +167,21 @@ export declare enum FillClassification {
|
|
|
149
167
|
SPOT_BUY = "Spot Buy",
|
|
150
168
|
SPOT_SELL = "Spot Sell"
|
|
151
169
|
}
|
|
152
|
-
/** @public */
|
|
170
|
+
/** Classification emitted for a liquidation activity. @public */
|
|
153
171
|
export declare enum LiquidationClassification {
|
|
154
172
|
LIQUIDATED = "Liquidated"
|
|
155
173
|
}
|
|
156
|
-
/** @public */
|
|
174
|
+
/** Classification emitted for a funding activity. @public */
|
|
157
175
|
export declare enum FundingClassification {
|
|
158
176
|
FUNDING = "Funding"
|
|
159
177
|
}
|
|
160
|
-
/** @public */
|
|
178
|
+
/** Classification emitted for an inbound, outbound, or internal transfer. @public */
|
|
161
179
|
export declare enum TransferClassification {
|
|
162
180
|
DEPOSIT = "Deposit",
|
|
163
181
|
WITHDRAWAL = "Withdrawal",
|
|
164
182
|
TRANSFER = "Transfer"
|
|
165
183
|
}
|
|
166
|
-
/** @public */
|
|
184
|
+
/** Union of classifications emitted by all activity record categories. @public */
|
|
167
185
|
export type ActivityClassification = FillClassification | LiquidationClassification | FundingClassification | TransferClassification;
|
|
168
186
|
/**
|
|
169
187
|
* Who completes signing for an action.
|
|
@@ -178,7 +196,12 @@ export declare enum PerpsSigner {
|
|
|
178
196
|
USER = "USER",
|
|
179
197
|
SDK = "SDK"
|
|
180
198
|
}
|
|
181
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* Signing mechanisms supported by action steps. Values are serialized in
|
|
201
|
+
* provider metadata and action responses.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
182
205
|
export declare enum SigningMethod {
|
|
183
206
|
EIP712 = "eip712",
|
|
184
207
|
WASM_BLOB = "wasmBlob",
|