zklighter-perps 1.0.195 → 1.0.197
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/.openapi-generator/FILES +1 -0
- package/models/DetailedAccount.ts +15 -0
- package/models/ExecuteStat.ts +9 -9
- package/models/PendingUnlock.ts +79 -0
- package/models/PublicPoolShare.ts +9 -0
- package/models/SlippageResult.ts +27 -0
- package/models/TransferHistoryItem.ts +3 -1
- package/models/index.ts +1 -0
- package/openapi.json +63 -4
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
AccountAssetFromJSONTyped,
|
|
20
20
|
AccountAssetToJSON,
|
|
21
21
|
} from './AccountAsset';
|
|
22
|
+
import type { PendingUnlock } from './PendingUnlock';
|
|
23
|
+
import {
|
|
24
|
+
PendingUnlockFromJSON,
|
|
25
|
+
PendingUnlockFromJSONTyped,
|
|
26
|
+
PendingUnlockToJSON,
|
|
27
|
+
} from './PendingUnlock';
|
|
22
28
|
import type { AccountPosition } from './AccountPosition';
|
|
23
29
|
import {
|
|
24
30
|
AccountPositionFromJSON,
|
|
@@ -188,6 +194,12 @@ export interface DetailedAccount {
|
|
|
188
194
|
* @memberof DetailedAccount
|
|
189
195
|
*/
|
|
190
196
|
shares: Array<PublicPoolShare>;
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @type {Array<PendingUnlock>}
|
|
200
|
+
* @memberof DetailedAccount
|
|
201
|
+
*/
|
|
202
|
+
pending_unlocks: Array<PendingUnlock>;
|
|
191
203
|
}
|
|
192
204
|
|
|
193
205
|
/**
|
|
@@ -217,6 +229,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
217
229
|
if (!('cross_asset_value' in value) || value['cross_asset_value'] === undefined) return false;
|
|
218
230
|
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
219
231
|
if (!('shares' in value) || value['shares'] === undefined) return false;
|
|
232
|
+
if (!('pending_unlocks' in value) || value['pending_unlocks'] === undefined) return false;
|
|
220
233
|
return true;
|
|
221
234
|
}
|
|
222
235
|
|
|
@@ -254,6 +267,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
254
267
|
'cross_asset_value': json['cross_asset_value'],
|
|
255
268
|
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
256
269
|
'shares': ((json['shares'] as Array<any>).map(PublicPoolShareFromJSON)),
|
|
270
|
+
'pending_unlocks': ((json['pending_unlocks'] as Array<any>).map(PendingUnlockFromJSON)),
|
|
257
271
|
};
|
|
258
272
|
}
|
|
259
273
|
|
|
@@ -287,6 +301,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
287
301
|
'cross_asset_value': value['cross_asset_value'],
|
|
288
302
|
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
289
303
|
'shares': ((value['shares'] as Array<any>).map(PublicPoolShareToJSON)),
|
|
304
|
+
'pending_unlocks': ((value['pending_unlocks'] as Array<any>).map(PendingUnlockToJSON)),
|
|
290
305
|
};
|
|
291
306
|
}
|
|
292
307
|
|
package/models/ExecuteStat.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { SlippageResult } from './SlippageResult';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
SlippageResultFromJSON,
|
|
19
|
+
SlippageResultFromJSONTyped,
|
|
20
|
+
SlippageResultToJSON,
|
|
21
|
+
} from './SlippageResult';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -34,10 +34,10 @@ export interface ExecuteStat {
|
|
|
34
34
|
timestamp: number;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {Array<SlippageResult>}
|
|
38
38
|
* @memberof ExecuteStat
|
|
39
39
|
*/
|
|
40
|
-
slippage:
|
|
40
|
+
slippage: Array<SlippageResult>;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -60,7 +60,7 @@ export function ExecuteStatFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
60
60
|
return {
|
|
61
61
|
|
|
62
62
|
'timestamp': json['timestamp'],
|
|
63
|
-
'slippage':
|
|
63
|
+
'slippage': ((json['slippage'] as Array<any>).map(SlippageResultFromJSON)),
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -71,7 +71,7 @@ export function ExecuteStatToJSON(value?: ExecuteStat | null): any {
|
|
|
71
71
|
return {
|
|
72
72
|
|
|
73
73
|
'timestamp': value['timestamp'],
|
|
74
|
-
'slippage':
|
|
74
|
+
'slippage': ((value['slippage'] as Array<any>).map(SlippageResultToJSON)),
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PendingUnlock
|
|
20
|
+
*/
|
|
21
|
+
export interface PendingUnlock {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PendingUnlock
|
|
26
|
+
*/
|
|
27
|
+
apw_rt: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PendingUnlock
|
|
32
|
+
*/
|
|
33
|
+
apw_asi: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PendingUnlock
|
|
38
|
+
*/
|
|
39
|
+
apw_amt: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the PendingUnlock interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfPendingUnlock(value: object): value is PendingUnlock {
|
|
46
|
+
if (!('apw_rt' in value) || value['apw_rt'] === undefined) return false;
|
|
47
|
+
if (!('apw_asi' in value) || value['apw_asi'] === undefined) return false;
|
|
48
|
+
if (!('apw_amt' in value) || value['apw_amt'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PendingUnlockFromJSON(json: any): PendingUnlock {
|
|
53
|
+
return PendingUnlockFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function PendingUnlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): PendingUnlock {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'apw_rt': json['apw_rt'],
|
|
63
|
+
'apw_asi': json['apw_asi'],
|
|
64
|
+
'apw_amt': json['apw_amt'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function PendingUnlockToJSON(value?: PendingUnlock | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'apw_rt': value['apw_rt'],
|
|
75
|
+
'apw_asi': value['apw_asi'],
|
|
76
|
+
'apw_amt': value['apw_amt'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -43,6 +43,12 @@ export interface PublicPoolShare {
|
|
|
43
43
|
* @memberof PublicPoolShare
|
|
44
44
|
*/
|
|
45
45
|
principal_amount: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PublicPoolShare
|
|
50
|
+
*/
|
|
51
|
+
entry_timestamp: number;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
/**
|
|
@@ -53,6 +59,7 @@ export function instanceOfPublicPoolShare(value: object): value is PublicPoolSha
|
|
|
53
59
|
if (!('shares_amount' in value) || value['shares_amount'] === undefined) return false;
|
|
54
60
|
if (!('entry_usdc' in value) || value['entry_usdc'] === undefined) return false;
|
|
55
61
|
if (!('principal_amount' in value) || value['principal_amount'] === undefined) return false;
|
|
62
|
+
if (!('entry_timestamp' in value) || value['entry_timestamp'] === undefined) return false;
|
|
56
63
|
return true;
|
|
57
64
|
}
|
|
58
65
|
|
|
@@ -70,6 +77,7 @@ export function PublicPoolShareFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
70
77
|
'shares_amount': json['shares_amount'],
|
|
71
78
|
'entry_usdc': json['entry_usdc'],
|
|
72
79
|
'principal_amount': json['principal_amount'],
|
|
80
|
+
'entry_timestamp': json['entry_timestamp'],
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -83,6 +91,7 @@ export function PublicPoolShareToJSON(value?: PublicPoolShare | null): any {
|
|
|
83
91
|
'shares_amount': value['shares_amount'],
|
|
84
92
|
'entry_usdc': value['entry_usdc'],
|
|
85
93
|
'principal_amount': value['principal_amount'],
|
|
94
|
+
'entry_timestamp': value['entry_timestamp'],
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
97
|
|
package/models/SlippageResult.ts
CHANGED
|
@@ -19,6 +19,24 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface SlippageResult
|
|
20
20
|
*/
|
|
21
21
|
export interface SlippageResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SlippageResult
|
|
26
|
+
*/
|
|
27
|
+
exchange: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SlippageResult
|
|
32
|
+
*/
|
|
33
|
+
market: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SlippageResult
|
|
38
|
+
*/
|
|
39
|
+
size_usd: number;
|
|
22
40
|
/**
|
|
23
41
|
*
|
|
24
42
|
* @type {number}
|
|
@@ -37,6 +55,9 @@ export interface SlippageResult {
|
|
|
37
55
|
* Check if a given object implements the SlippageResult interface.
|
|
38
56
|
*/
|
|
39
57
|
export function instanceOfSlippageResult(value: object): value is SlippageResult {
|
|
58
|
+
if (!('exchange' in value) || value['exchange'] === undefined) return false;
|
|
59
|
+
if (!('market' in value) || value['market'] === undefined) return false;
|
|
60
|
+
if (!('size_usd' in value) || value['size_usd'] === undefined) return false;
|
|
40
61
|
if (!('avg_slippage' in value) || value['avg_slippage'] === undefined) return false;
|
|
41
62
|
if (!('data_count' in value) || value['data_count'] === undefined) return false;
|
|
42
63
|
return true;
|
|
@@ -52,6 +73,9 @@ export function SlippageResultFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
52
73
|
}
|
|
53
74
|
return {
|
|
54
75
|
|
|
76
|
+
'exchange': json['exchange'],
|
|
77
|
+
'market': json['market'],
|
|
78
|
+
'size_usd': json['size_usd'],
|
|
55
79
|
'avg_slippage': json['avg_slippage'],
|
|
56
80
|
'data_count': json['data_count'],
|
|
57
81
|
};
|
|
@@ -63,6 +87,9 @@ export function SlippageResultToJSON(value?: SlippageResult | null): any {
|
|
|
63
87
|
}
|
|
64
88
|
return {
|
|
65
89
|
|
|
90
|
+
'exchange': value['exchange'],
|
|
91
|
+
'market': value['market'],
|
|
92
|
+
'size_usd': value['size_usd'],
|
|
66
93
|
'avg_slippage': value['avg_slippage'],
|
|
67
94
|
'data_count': value['data_count'],
|
|
68
95
|
};
|
|
@@ -114,7 +114,9 @@ export const TransferHistoryItemTypeEnum = {
|
|
|
114
114
|
L2StakeAssetInflow: 'L2StakeAssetInflow',
|
|
115
115
|
L2StakeAssetOutflow: 'L2StakeAssetOutflow',
|
|
116
116
|
L2UnstakeAssetInflow: 'L2UnstakeAssetInflow',
|
|
117
|
-
L2UnstakeAssetOutflow: 'L2UnstakeAssetOutflow'
|
|
117
|
+
L2UnstakeAssetOutflow: 'L2UnstakeAssetOutflow',
|
|
118
|
+
L2ForceBurnSharesInflow: 'L2ForceBurnSharesInflow',
|
|
119
|
+
L2ForceBurnSharesOutflow: 'L2ForceBurnSharesOutflow'
|
|
118
120
|
} as const;
|
|
119
121
|
export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
|
|
120
122
|
|
package/models/index.ts
CHANGED
|
@@ -76,6 +76,7 @@ export * from './OrderBookOrders';
|
|
|
76
76
|
export * from './OrderBookStats';
|
|
77
77
|
export * from './OrderBooks';
|
|
78
78
|
export * from './Orders';
|
|
79
|
+
export * from './PendingUnlock';
|
|
79
80
|
export * from './PerpsMarketStats';
|
|
80
81
|
export * from './PerpsOrderBookDetail';
|
|
81
82
|
export * from './PnLEntry';
|
package/openapi.json
CHANGED
|
@@ -5360,6 +5360,12 @@
|
|
|
5360
5360
|
"items": {
|
|
5361
5361
|
"$ref": "#/definitions/PublicPoolShare"
|
|
5362
5362
|
}
|
|
5363
|
+
},
|
|
5364
|
+
"pending_unlocks": {
|
|
5365
|
+
"type": "array",
|
|
5366
|
+
"items": {
|
|
5367
|
+
"$ref": "#/definitions/PendingUnlock"
|
|
5368
|
+
}
|
|
5363
5369
|
}
|
|
5364
5370
|
},
|
|
5365
5371
|
"title": "DetailedAccount",
|
|
@@ -5386,7 +5392,8 @@
|
|
|
5386
5392
|
"total_asset_value",
|
|
5387
5393
|
"cross_asset_value",
|
|
5388
5394
|
"pool_info",
|
|
5389
|
-
"shares"
|
|
5395
|
+
"shares",
|
|
5396
|
+
"pending_unlocks"
|
|
5390
5397
|
]
|
|
5391
5398
|
},
|
|
5392
5399
|
"DetailedAccounts": {
|
|
@@ -5705,7 +5712,10 @@
|
|
|
5705
5712
|
"example": "1640995200"
|
|
5706
5713
|
},
|
|
5707
5714
|
"slippage": {
|
|
5708
|
-
"
|
|
5715
|
+
"type": "array",
|
|
5716
|
+
"items": {
|
|
5717
|
+
"$ref": "#/definitions/SlippageResult"
|
|
5718
|
+
}
|
|
5709
5719
|
}
|
|
5710
5720
|
},
|
|
5711
5721
|
"title": "ExecuteStat",
|
|
@@ -7050,6 +7060,31 @@
|
|
|
7050
7060
|
"orders"
|
|
7051
7061
|
]
|
|
7052
7062
|
},
|
|
7063
|
+
"PendingUnlock": {
|
|
7064
|
+
"type": "object",
|
|
7065
|
+
"properties": {
|
|
7066
|
+
"apw_rt": {
|
|
7067
|
+
"type": "integer",
|
|
7068
|
+
"format": "int64",
|
|
7069
|
+
"example": "1"
|
|
7070
|
+
},
|
|
7071
|
+
"apw_asi": {
|
|
7072
|
+
"type": "integer",
|
|
7073
|
+
"format": "int16",
|
|
7074
|
+
"example": "1"
|
|
7075
|
+
},
|
|
7076
|
+
"apw_amt": {
|
|
7077
|
+
"type": "string",
|
|
7078
|
+
"example": "1"
|
|
7079
|
+
}
|
|
7080
|
+
},
|
|
7081
|
+
"title": "PendingUnlock",
|
|
7082
|
+
"required": [
|
|
7083
|
+
"apw_rt",
|
|
7084
|
+
"apw_asi",
|
|
7085
|
+
"apw_amt"
|
|
7086
|
+
]
|
|
7087
|
+
},
|
|
7053
7088
|
"PerpsMarketStats": {
|
|
7054
7089
|
"type": "object",
|
|
7055
7090
|
"properties": {
|
|
@@ -7729,6 +7764,11 @@
|
|
|
7729
7764
|
"principal_amount": {
|
|
7730
7765
|
"type": "string",
|
|
7731
7766
|
"example": "3000"
|
|
7767
|
+
},
|
|
7768
|
+
"entry_timestamp": {
|
|
7769
|
+
"type": "integer",
|
|
7770
|
+
"format": "int64",
|
|
7771
|
+
"example": "3600000"
|
|
7732
7772
|
}
|
|
7733
7773
|
},
|
|
7734
7774
|
"title": "PublicPoolShare",
|
|
@@ -7736,7 +7776,8 @@
|
|
|
7736
7776
|
"public_pool_index",
|
|
7737
7777
|
"shares_amount",
|
|
7738
7778
|
"entry_usdc",
|
|
7739
|
-
"principal_amount"
|
|
7779
|
+
"principal_amount",
|
|
7780
|
+
"entry_timestamp"
|
|
7740
7781
|
]
|
|
7741
7782
|
},
|
|
7742
7783
|
"ReferralCode": {
|
|
@@ -9981,6 +10022,19 @@
|
|
|
9981
10022
|
"SlippageResult": {
|
|
9982
10023
|
"type": "object",
|
|
9983
10024
|
"properties": {
|
|
10025
|
+
"exchange": {
|
|
10026
|
+
"type": "string",
|
|
10027
|
+
"example": "lighter"
|
|
10028
|
+
},
|
|
10029
|
+
"market": {
|
|
10030
|
+
"type": "string",
|
|
10031
|
+
"example": "ETH"
|
|
10032
|
+
},
|
|
10033
|
+
"size_usd": {
|
|
10034
|
+
"type": "integer",
|
|
10035
|
+
"format": "int64",
|
|
10036
|
+
"example": "1000"
|
|
10037
|
+
},
|
|
9984
10038
|
"avg_slippage": {
|
|
9985
10039
|
"type": "number",
|
|
9986
10040
|
"format": "double",
|
|
@@ -9994,6 +10048,9 @@
|
|
|
9994
10048
|
},
|
|
9995
10049
|
"title": "SlippageResult",
|
|
9996
10050
|
"required": [
|
|
10051
|
+
"exchange",
|
|
10052
|
+
"market",
|
|
10053
|
+
"size_usd",
|
|
9997
10054
|
"avg_slippage",
|
|
9998
10055
|
"data_count"
|
|
9999
10056
|
]
|
|
@@ -10578,7 +10635,9 @@
|
|
|
10578
10635
|
"L2StakeAssetInflow",
|
|
10579
10636
|
"L2StakeAssetOutflow",
|
|
10580
10637
|
"L2UnstakeAssetInflow",
|
|
10581
|
-
"L2UnstakeAssetOutflow"
|
|
10638
|
+
"L2UnstakeAssetOutflow",
|
|
10639
|
+
"L2ForceBurnSharesInflow",
|
|
10640
|
+
"L2ForceBurnSharesOutflow"
|
|
10582
10641
|
]
|
|
10583
10642
|
},
|
|
10584
10643
|
"from_l1_address": {
|