zklighter-perps 1.0.196 → 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/PendingUnlock.ts +79 -0
- package/models/PublicPoolShare.ts +9 -0
- package/models/TransferHistoryItem.ts +3 -1
- package/models/index.ts +1 -0
- package/openapi.json +43 -3
- 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
|
|
|
@@ -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
|
|
|
@@ -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": {
|
|
@@ -7053,6 +7060,31 @@
|
|
|
7053
7060
|
"orders"
|
|
7054
7061
|
]
|
|
7055
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
|
+
},
|
|
7056
7088
|
"PerpsMarketStats": {
|
|
7057
7089
|
"type": "object",
|
|
7058
7090
|
"properties": {
|
|
@@ -7732,6 +7764,11 @@
|
|
|
7732
7764
|
"principal_amount": {
|
|
7733
7765
|
"type": "string",
|
|
7734
7766
|
"example": "3000"
|
|
7767
|
+
},
|
|
7768
|
+
"entry_timestamp": {
|
|
7769
|
+
"type": "integer",
|
|
7770
|
+
"format": "int64",
|
|
7771
|
+
"example": "3600000"
|
|
7735
7772
|
}
|
|
7736
7773
|
},
|
|
7737
7774
|
"title": "PublicPoolShare",
|
|
@@ -7739,7 +7776,8 @@
|
|
|
7739
7776
|
"public_pool_index",
|
|
7740
7777
|
"shares_amount",
|
|
7741
7778
|
"entry_usdc",
|
|
7742
|
-
"principal_amount"
|
|
7779
|
+
"principal_amount",
|
|
7780
|
+
"entry_timestamp"
|
|
7743
7781
|
]
|
|
7744
7782
|
},
|
|
7745
7783
|
"ReferralCode": {
|
|
@@ -10597,7 +10635,9 @@
|
|
|
10597
10635
|
"L2StakeAssetInflow",
|
|
10598
10636
|
"L2StakeAssetOutflow",
|
|
10599
10637
|
"L2UnstakeAssetInflow",
|
|
10600
|
-
"L2UnstakeAssetOutflow"
|
|
10638
|
+
"L2UnstakeAssetOutflow",
|
|
10639
|
+
"L2ForceBurnSharesInflow",
|
|
10640
|
+
"L2ForceBurnSharesOutflow"
|
|
10601
10641
|
]
|
|
10602
10642
|
},
|
|
10603
10643
|
"from_l1_address": {
|