zklighter-perps 1.0.240 → 1.0.241

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/models/Asset.ts CHANGED
@@ -91,6 +91,12 @@ export interface Asset {
91
91
  * @memberof Asset
92
92
  */
93
93
  liquidation_threshold: string;
94
+ /**
95
+ *
96
+ * @type {string}
97
+ * @memberof Asset
98
+ */
99
+ liquidation_factor: string;
94
100
  /**
95
101
  *
96
102
  * @type {string}
@@ -144,6 +150,7 @@ export function instanceOfAsset(value: object): value is Asset {
144
150
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
145
151
  if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
146
152
  if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
153
+ if (!('liquidation_factor' in value) || value['liquidation_factor'] === undefined) return false;
147
154
  if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
148
155
  if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
149
156
  if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
@@ -173,6 +180,7 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
173
180
  'l1_address': json['l1_address'],
174
181
  'loan_to_value': json['loan_to_value'],
175
182
  'liquidation_threshold': json['liquidation_threshold'],
183
+ 'liquidation_factor': json['liquidation_factor'],
176
184
  'liquidation_fee': json['liquidation_fee'],
177
185
  'global_supply_cap': json['global_supply_cap'],
178
186
  'user_supply_cap': json['user_supply_cap'],
@@ -198,6 +206,7 @@ export function AssetToJSON(value?: Asset | null): any {
198
206
  'l1_address': value['l1_address'],
199
207
  'loan_to_value': value['loan_to_value'],
200
208
  'liquidation_threshold': value['liquidation_threshold'],
209
+ 'liquidation_factor': value['liquidation_factor'],
201
210
  'liquidation_fee': value['liquidation_fee'],
202
211
  'global_supply_cap': value['global_supply_cap'],
203
212
  'user_supply_cap': value['user_supply_cap'],
@@ -31,6 +31,12 @@ export interface AssetStats {
31
31
  * @memberof AssetStats
32
32
  */
33
33
  index_price: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AssetStats
38
+ */
39
+ total_supplied: string;
34
40
  }
35
41
 
36
42
  /**
@@ -39,6 +45,7 @@ export interface AssetStats {
39
45
  export function instanceOfAssetStats(value: object): value is AssetStats {
40
46
  if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
41
47
  if (!('index_price' in value) || value['index_price'] === undefined) return false;
48
+ if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
42
49
  return true;
43
50
  }
44
51
 
@@ -54,6 +61,7 @@ export function AssetStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean)
54
61
 
55
62
  'asset_id': json['asset_id'],
56
63
  'index_price': json['index_price'],
64
+ 'total_supplied': json['total_supplied'],
57
65
  };
58
66
  }
59
67
 
@@ -65,6 +73,7 @@ export function AssetStatsToJSON(value?: AssetStats | null): any {
65
73
 
66
74
  'asset_id': value['asset_id'],
67
75
  'index_price': value['index_price'],
76
+ 'total_supplied': value['total_supplied'],
68
77
  };
69
78
  }
70
79
 
@@ -30,31 +30,49 @@ export interface RiskParameters {
30
30
  * @type {string}
31
31
  * @memberof RiskParameters
32
32
  */
33
- collateral: string;
33
+ total_account_value: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof RiskParameters
38
38
  */
39
- total_account_value: string;
39
+ initial_margin_req: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof RiskParameters
44
44
  */
45
- initial_margin_req: string;
45
+ maintenance_margin_req: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof RiskParameters
50
50
  */
51
- maintenance_margin_req: string;
51
+ close_out_margin_req: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof RiskParameters
56
56
  */
57
- close_out_margin_req: string;
57
+ total_account_liquidation_threshold: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof RiskParameters
62
+ */
63
+ collateral: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof RiskParameters
68
+ */
69
+ usdc_collateral_with_funding: string;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof RiskParameters
74
+ */
75
+ usdc_portfolio_value: string;
58
76
  }
59
77
 
60
78
  /**
@@ -62,11 +80,14 @@ export interface RiskParameters {
62
80
  */
63
81
  export function instanceOfRiskParameters(value: object): value is RiskParameters {
64
82
  if (!('market_id' in value) || value['market_id'] === undefined) return false;
65
- if (!('collateral' in value) || value['collateral'] === undefined) return false;
66
83
  if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
67
84
  if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
68
85
  if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
69
86
  if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
87
+ if (!('total_account_liquidation_threshold' in value) || value['total_account_liquidation_threshold'] === undefined) return false;
88
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
89
+ if (!('usdc_collateral_with_funding' in value) || value['usdc_collateral_with_funding'] === undefined) return false;
90
+ if (!('usdc_portfolio_value' in value) || value['usdc_portfolio_value'] === undefined) return false;
70
91
  return true;
71
92
  }
72
93
 
@@ -81,11 +102,14 @@ export function RiskParametersFromJSONTyped(json: any, ignoreDiscriminator: bool
81
102
  return {
82
103
 
83
104
  'market_id': json['market_id'],
84
- 'collateral': json['collateral'],
85
105
  'total_account_value': json['total_account_value'],
86
106
  'initial_margin_req': json['initial_margin_req'],
87
107
  'maintenance_margin_req': json['maintenance_margin_req'],
88
108
  'close_out_margin_req': json['close_out_margin_req'],
109
+ 'total_account_liquidation_threshold': json['total_account_liquidation_threshold'],
110
+ 'collateral': json['collateral'],
111
+ 'usdc_collateral_with_funding': json['usdc_collateral_with_funding'],
112
+ 'usdc_portfolio_value': json['usdc_portfolio_value'],
89
113
  };
90
114
  }
91
115
 
@@ -96,11 +120,14 @@ export function RiskParametersToJSON(value?: RiskParameters | null): any {
96
120
  return {
97
121
 
98
122
  'market_id': value['market_id'],
99
- 'collateral': value['collateral'],
100
123
  'total_account_value': value['total_account_value'],
101
124
  'initial_margin_req': value['initial_margin_req'],
102
125
  'maintenance_margin_req': value['maintenance_margin_req'],
103
126
  'close_out_margin_req': value['close_out_margin_req'],
127
+ 'total_account_liquidation_threshold': value['total_account_liquidation_threshold'],
128
+ 'collateral': value['collateral'],
129
+ 'usdc_collateral_with_funding': value['usdc_collateral_with_funding'],
130
+ 'usdc_portfolio_value': value['usdc_portfolio_value'],
104
131
  };
105
132
  }
106
133
 
package/openapi.json CHANGED
@@ -5601,6 +5601,10 @@
5601
5601
  "type": "string",
5602
5602
  "example": "0.8"
5603
5603
  },
5604
+ "liquidation_factor": {
5605
+ "type": "string",
5606
+ "example": "0.9"
5607
+ },
5604
5608
  "liquidation_fee": {
5605
5609
  "type": "string",
5606
5610
  "example": "0.01"
@@ -5632,6 +5636,7 @@
5632
5636
  "l1_address",
5633
5637
  "loan_to_value",
5634
5638
  "liquidation_threshold",
5639
+ "liquidation_factor",
5635
5640
  "liquidation_fee",
5636
5641
  "global_supply_cap",
5637
5642
  "user_supply_cap",
@@ -5673,12 +5678,17 @@
5673
5678
  "index_price": {
5674
5679
  "type": "string",
5675
5680
  "example": "3024.66"
5681
+ },
5682
+ "total_supplied": {
5683
+ "type": "string",
5684
+ "example": "100"
5676
5685
  }
5677
5686
  },
5678
5687
  "title": "AssetStats",
5679
5688
  "required": [
5680
5689
  "asset_id",
5681
- "index_price"
5690
+ "index_price",
5691
+ "total_supplied"
5682
5692
  ]
5683
5693
  },
5684
5694
  "Auth": {
@@ -12483,9 +12493,6 @@
12483
12493
  "type": "integer",
12484
12494
  "format": "int16"
12485
12495
  },
12486
- "collateral": {
12487
- "type": "string"
12488
- },
12489
12496
  "total_account_value": {
12490
12497
  "type": "string"
12491
12498
  },
@@ -12497,16 +12504,31 @@
12497
12504
  },
12498
12505
  "close_out_margin_req": {
12499
12506
  "type": "string"
12507
+ },
12508
+ "total_account_liquidation_threshold": {
12509
+ "type": "string"
12510
+ },
12511
+ "collateral": {
12512
+ "type": "string"
12513
+ },
12514
+ "usdc_collateral_with_funding": {
12515
+ "type": "string"
12516
+ },
12517
+ "usdc_portfolio_value": {
12518
+ "type": "string"
12500
12519
  }
12501
12520
  },
12502
12521
  "title": "RiskParameters",
12503
12522
  "required": [
12504
12523
  "market_id",
12505
- "collateral",
12506
12524
  "total_account_value",
12507
12525
  "initial_margin_req",
12508
12526
  "maintenance_margin_req",
12509
- "close_out_margin_req"
12527
+ "close_out_margin_req",
12528
+ "total_account_liquidation_threshold",
12529
+ "collateral",
12530
+ "usdc_collateral_with_funding",
12531
+ "usdc_portfolio_value"
12510
12532
  ]
12511
12533
  },
12512
12534
  "SharePrice": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.240",
3
+ "version": "1.0.241",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {