zklighter-perps 1.0.241 → 1.0.243

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.
@@ -13,12 +13,24 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { AccountAsset } from './AccountAsset';
17
+ import {
18
+ AccountAssetFromJSON,
19
+ AccountAssetFromJSONTyped,
20
+ AccountAssetToJSON,
21
+ } from './AccountAsset';
16
22
  import type { AccountPosition } from './AccountPosition';
17
23
  import {
18
24
  AccountPositionFromJSON,
19
25
  AccountPositionFromJSONTyped,
20
26
  AccountPositionToJSON,
21
27
  } from './AccountPosition';
28
+ import type { Mapint16string } from './Mapint16string';
29
+ import {
30
+ Mapint16stringFromJSON,
31
+ Mapint16stringFromJSONTyped,
32
+ Mapint16stringToJSON,
33
+ } from './Mapint16string';
22
34
  import type { RiskInfo } from './RiskInfo';
23
35
  import {
24
36
  RiskInfoFromJSON,
@@ -56,6 +68,18 @@ export interface LiquidationInfo {
56
68
  * @memberof LiquidationInfo
57
69
  */
58
70
  mark_prices: { [key: string]: number; };
71
+ /**
72
+ *
73
+ * @type {Array<AccountAsset>}
74
+ * @memberof LiquidationInfo
75
+ */
76
+ assets: Array<AccountAsset>;
77
+ /**
78
+ *
79
+ * @type {Mapint16string}
80
+ * @memberof LiquidationInfo
81
+ */
82
+ asset_index_prices: Mapint16string;
59
83
  }
60
84
 
61
85
  /**
@@ -66,6 +90,8 @@ export function instanceOfLiquidationInfo(value: object): value is LiquidationIn
66
90
  if (!('risk_info_before' in value) || value['risk_info_before'] === undefined) return false;
67
91
  if (!('risk_info_after' in value) || value['risk_info_after'] === undefined) return false;
68
92
  if (!('mark_prices' in value) || value['mark_prices'] === undefined) return false;
93
+ if (!('assets' in value) || value['assets'] === undefined) return false;
94
+ if (!('asset_index_prices' in value) || value['asset_index_prices'] === undefined) return false;
69
95
  return true;
70
96
  }
71
97
 
@@ -83,6 +109,8 @@ export function LiquidationInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
83
109
  'risk_info_before': RiskInfoFromJSON(json['risk_info_before']),
84
110
  'risk_info_after': RiskInfoFromJSON(json['risk_info_after']),
85
111
  'mark_prices': json['mark_prices'],
112
+ 'assets': ((json['assets'] as Array<any>).map(AccountAssetFromJSON)),
113
+ 'asset_index_prices': Mapint16stringFromJSON(json['asset_index_prices']),
86
114
  };
87
115
  }
88
116
 
@@ -96,6 +124,8 @@ export function LiquidationInfoToJSON(value?: LiquidationInfo | null): any {
96
124
  'risk_info_before': RiskInfoToJSON(value['risk_info_before']),
97
125
  'risk_info_after': RiskInfoToJSON(value['risk_info_after']),
98
126
  'mark_prices': value['mark_prices'],
127
+ 'assets': ((value['assets'] as Array<any>).map(AccountAssetToJSON)),
128
+ 'asset_index_prices': Mapint16stringToJSON(value['asset_index_prices']),
99
129
  };
100
130
  }
101
131
 
package/openapi.json CHANGED
@@ -7652,6 +7652,15 @@
7652
7652
  "type": "number",
7653
7653
  "format": "double"
7654
7654
  }
7655
+ },
7656
+ "assets": {
7657
+ "type": "array",
7658
+ "items": {
7659
+ "$ref": "#/definitions/AccountAsset"
7660
+ }
7661
+ },
7662
+ "asset_index_prices": {
7663
+ "$ref": "#/definitions/mapint16string"
7655
7664
  }
7656
7665
  },
7657
7666
  "title": "LiquidationInfo",
@@ -7659,7 +7668,9 @@
7659
7668
  "positions",
7660
7669
  "risk_info_before",
7661
7670
  "risk_info_after",
7662
- "mark_prices"
7671
+ "mark_prices",
7672
+ "assets",
7673
+ "asset_index_prices"
7663
7674
  ]
7664
7675
  },
7665
7676
  "LiquidationInfos": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.241",
3
+ "version": "1.0.243",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {