zklighter-perps 1.0.255 → 1.0.257

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.
@@ -216,6 +216,7 @@ models/SpotMarketStats.ts
216
216
  models/SpotOrderBookDetail.ts
217
217
  models/Status.ts
218
218
  models/Strategy.ts
219
+ models/SubAccountMetadata.ts
219
220
  models/SubAccounts.ts
220
221
  models/SystemConfig.ts
221
222
  models/Ticker.ts
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { SubAccountMetadata } from './SubAccountMetadata';
17
+ import {
18
+ SubAccountMetadataFromJSON,
19
+ SubAccountMetadataFromJSONTyped,
20
+ SubAccountMetadataToJSON,
21
+ } from './SubAccountMetadata';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -67,6 +74,12 @@ export interface AccountMetadata {
67
74
  * @memberof AccountMetadata
68
75
  */
69
76
  created_at: number;
77
+ /**
78
+ *
79
+ * @type {SubAccountMetadata}
80
+ * @memberof AccountMetadata
81
+ */
82
+ metadata: SubAccountMetadata;
70
83
  }
71
84
 
72
85
  /**
@@ -81,6 +94,7 @@ export function instanceOfAccountMetadata(value: object): value is AccountMetada
81
94
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
82
95
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
83
96
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
97
+ if (!('metadata' in value) || value['metadata'] === undefined) return false;
84
98
  return true;
85
99
  }
86
100
 
@@ -102,6 +116,7 @@ export function AccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boo
102
116
  'can_rfq': json['can_rfq'],
103
117
  'can_rfq_market_ids': json['can_rfq_market_ids'],
104
118
  'created_at': json['created_at'],
119
+ 'metadata': SubAccountMetadataFromJSON(json['metadata']),
105
120
  };
106
121
  }
107
122
 
@@ -119,6 +134,7 @@ export function AccountMetadataToJSON(value?: AccountMetadata | null): any {
119
134
  'can_rfq': value['can_rfq'],
120
135
  'can_rfq_market_ids': value['can_rfq_market_ids'],
121
136
  'created_at': value['created_at'],
137
+ 'metadata': SubAccountMetadataToJSON(value['metadata']),
122
138
  };
123
139
  }
124
140
 
@@ -49,6 +49,12 @@ import {
49
49
  PublicPoolShareFromJSONTyped,
50
50
  PublicPoolShareToJSON,
51
51
  } from './PublicPoolShare';
52
+ import type { SubAccountMetadata } from './SubAccountMetadata';
53
+ import {
54
+ SubAccountMetadataFromJSON,
55
+ SubAccountMetadataFromJSONTyped,
56
+ SubAccountMetadataToJSON,
57
+ } from './SubAccountMetadata';
52
58
 
53
59
  /**
54
60
  *
@@ -188,6 +194,12 @@ export interface DetailedAccount {
188
194
  * @memberof DetailedAccount
189
195
  */
190
196
  created_at: number;
197
+ /**
198
+ *
199
+ * @type {SubAccountMetadata}
200
+ * @memberof DetailedAccount
201
+ */
202
+ metadata: SubAccountMetadata;
191
203
  /**
192
204
  *
193
205
  * @type {Array<AccountPosition>}
@@ -274,6 +286,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
274
286
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
275
287
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
276
288
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
289
+ if (!('metadata' in value) || value['metadata'] === undefined) return false;
277
290
  if (!('positions' in value) || value['positions'] === undefined) return false;
278
291
  if (!('assets' in value) || value['assets'] === undefined) return false;
279
292
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
@@ -317,6 +330,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
317
330
  'can_rfq': json['can_rfq'],
318
331
  'can_rfq_market_ids': json['can_rfq_market_ids'],
319
332
  'created_at': json['created_at'],
333
+ 'metadata': SubAccountMetadataFromJSON(json['metadata']),
320
334
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
321
335
  'assets': ((json['assets'] as Array<any>).map(AccountAssetFromJSON)),
322
336
  'total_asset_value': json['total_asset_value'],
@@ -358,6 +372,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
358
372
  'can_rfq': value['can_rfq'],
359
373
  'can_rfq_market_ids': value['can_rfq_market_ids'],
360
374
  'created_at': value['created_at'],
375
+ 'metadata': SubAccountMetadataToJSON(value['metadata']),
361
376
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
362
377
  'assets': ((value['assets'] as Array<any>).map(AccountAssetToJSON)),
363
378
  'total_asset_value': value['total_asset_value'],
@@ -0,0 +1,61 @@
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 SubAccountMetadata
20
+ */
21
+ export interface SubAccountMetadata {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SubAccountMetadata
26
+ */
27
+ color: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the SubAccountMetadata interface.
32
+ */
33
+ export function instanceOfSubAccountMetadata(value: object): value is SubAccountMetadata {
34
+ if (!('color' in value) || value['color'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function SubAccountMetadataFromJSON(json: any): SubAccountMetadata {
39
+ return SubAccountMetadataFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function SubAccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubAccountMetadata {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'color': json['color'],
49
+ };
50
+ }
51
+
52
+ export function SubAccountMetadataToJSON(value?: SubAccountMetadata | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'color': value['color'],
59
+ };
60
+ }
61
+
@@ -116,7 +116,15 @@ export const TransferHistoryItemTypeEnum = {
116
116
  L2UnstakeAssetInflow: 'L2UnstakeAssetInflow',
117
117
  L2UnstakeAssetOutflow: 'L2UnstakeAssetOutflow',
118
118
  L2ForceBurnSharesInflow: 'L2ForceBurnSharesInflow',
119
- L2ForceBurnSharesOutflow: 'L2ForceBurnSharesOutflow'
119
+ L2ForceBurnSharesOutflow: 'L2ForceBurnSharesOutflow',
120
+ L1BurnSharesInflow: 'L1BurnSharesInflow',
121
+ L1BurnSharesOutflow: 'L1BurnSharesOutflow',
122
+ L1UnstakeAssetInflow: 'L1UnstakeAssetInflow',
123
+ L1UnstakeAssetOutflow: 'L1UnstakeAssetOutflow',
124
+ L2CreatePublicPoolInflow: 'L2CreatePublicPoolInflow',
125
+ L2CreatePublicPoolOutflow: 'L2CreatePublicPoolOutflow',
126
+ L2CreateStakingPoolInflow: 'L2CreateStakingPoolInflow',
127
+ L2CreateStakingPoolOutflow: 'L2CreateStakingPoolOutflow'
120
128
  } as const;
121
129
  export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
122
130
 
package/models/index.ts CHANGED
@@ -200,6 +200,7 @@ export * from './SpotMarketStats';
200
200
  export * from './SpotOrderBookDetail';
201
201
  export * from './Status';
202
202
  export * from './Strategy';
203
+ export * from './SubAccountMetadata';
203
204
  export * from './SubAccounts';
204
205
  export * from './SystemConfig';
205
206
  export * from './Ticker';
package/openapi.json CHANGED
@@ -5208,6 +5208,9 @@
5208
5208
  "created_at": {
5209
5209
  "type": "integer",
5210
5210
  "format": "int64"
5211
+ },
5212
+ "metadata": {
5213
+ "$ref": "#/definitions/SubAccountMetadata"
5211
5214
  }
5212
5215
  },
5213
5216
  "title": "AccountMetadata",
@@ -5219,7 +5222,8 @@
5219
5222
  "referral_points_percentage",
5220
5223
  "can_rfq",
5221
5224
  "can_rfq_market_ids",
5222
- "created_at"
5225
+ "created_at",
5226
+ "metadata"
5223
5227
  ]
5224
5228
  },
5225
5229
  "AccountMetadatas": {
@@ -6677,6 +6681,9 @@
6677
6681
  "type": "integer",
6678
6682
  "format": "int64"
6679
6683
  },
6684
+ "metadata": {
6685
+ "$ref": "#/definitions/SubAccountMetadata"
6686
+ },
6680
6687
  "positions": {
6681
6688
  "type": "array",
6682
6689
  "items": {
@@ -6749,6 +6756,7 @@
6749
6756
  "can_rfq",
6750
6757
  "can_rfq_market_ids",
6751
6758
  "created_at",
6759
+ "metadata",
6752
6760
  "positions",
6753
6761
  "assets",
6754
6762
  "total_asset_value",
@@ -13327,6 +13335,18 @@
13327
13335
  "collateral"
13328
13336
  ]
13329
13337
  },
13338
+ "SubAccountMetadata": {
13339
+ "type": "object",
13340
+ "properties": {
13341
+ "color": {
13342
+ "type": "string"
13343
+ }
13344
+ },
13345
+ "title": "SubAccountMetadata",
13346
+ "required": [
13347
+ "color"
13348
+ ]
13349
+ },
13330
13350
  "SubAccounts": {
13331
13351
  "type": "object",
13332
13352
  "properties": {
@@ -13972,7 +13992,15 @@
13972
13992
  "L2UnstakeAssetInflow",
13973
13993
  "L2UnstakeAssetOutflow",
13974
13994
  "L2ForceBurnSharesInflow",
13975
- "L2ForceBurnSharesOutflow"
13995
+ "L2ForceBurnSharesOutflow",
13996
+ "L1BurnSharesInflow",
13997
+ "L1BurnSharesOutflow",
13998
+ "L1UnstakeAssetInflow",
13999
+ "L1UnstakeAssetOutflow",
14000
+ "L2CreatePublicPoolInflow",
14001
+ "L2CreatePublicPoolOutflow",
14002
+ "L2CreateStakingPoolInflow",
14003
+ "L2CreateStakingPoolOutflow"
13976
14004
  ]
13977
14005
  },
13978
14006
  "from_l1_address": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.255",
3
+ "version": "1.0.257",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {