zklighter-perps 1.0.177 → 1.0.179

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.
@@ -70,6 +70,8 @@ export interface ReferralUseRequest {
70
70
  l1_address: string;
71
71
  referral_code: string;
72
72
  x: string;
73
+ authorization?: string;
74
+ auth?: string;
73
75
  discord?: string;
74
76
  telegram?: string;
75
77
  signature?: string;
@@ -412,6 +414,10 @@ export class ReferralApi extends runtime.BaseAPI {
412
414
 
413
415
  const headerParameters: runtime.HTTPHeaders = {};
414
416
 
417
+ if (requestParameters['authorization'] != null) {
418
+ headerParameters['authorization'] = String(requestParameters['authorization']);
419
+ }
420
+
415
421
  const consumes: runtime.Consume[] = [
416
422
  { contentType: 'multipart/form-data' },
417
423
  ];
@@ -426,6 +432,10 @@ export class ReferralApi extends runtime.BaseAPI {
426
432
  formParams = new URLSearchParams();
427
433
  }
428
434
 
435
+ if (requestParameters['auth'] != null) {
436
+ formParams.append('auth', requestParameters['auth'] as any);
437
+ }
438
+
429
439
  if (requestParameters['l1_address'] != null) {
430
440
  formParams.append('l1_address', requestParameters['l1_address'] as any);
431
441
  }
@@ -37,6 +37,12 @@ export interface Announcement {
37
37
  * @memberof Announcement
38
38
  */
39
39
  created_at: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof Announcement
44
+ */
45
+ expired_at: number;
40
46
  }
41
47
 
42
48
  /**
@@ -46,6 +52,7 @@ export function instanceOfAnnouncement(value: object): value is Announcement {
46
52
  if (!('title' in value) || value['title'] === undefined) return false;
47
53
  if (!('content' in value) || value['content'] === undefined) return false;
48
54
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
55
+ if (!('expired_at' in value) || value['expired_at'] === undefined) return false;
49
56
  return true;
50
57
  }
51
58
 
@@ -62,6 +69,7 @@ export function AnnouncementFromJSONTyped(json: any, ignoreDiscriminator: boolea
62
69
  'title': json['title'],
63
70
  'content': json['content'],
64
71
  'created_at': json['created_at'],
72
+ 'expired_at': json['expired_at'],
65
73
  };
66
74
  }
67
75
 
@@ -74,6 +82,7 @@ export function AnnouncementToJSON(value?: Announcement | null): any {
74
82
  'title': value['title'],
75
83
  'content': value['content'],
76
84
  'created_at': value['created_at'],
85
+ 'expired_at': value['expired_at'],
77
86
  };
78
87
  }
79
88
 
@@ -68,6 +68,12 @@ export interface PublicPoolInfo {
68
68
  * @memberof PublicPoolInfo
69
69
  */
70
70
  annual_percentage_yield: number;
71
+ /**
72
+ *
73
+ * @type {number}
74
+ * @memberof PublicPoolInfo
75
+ */
76
+ sharpe_ratio: number;
71
77
  /**
72
78
  *
73
79
  * @type {Array<DailyReturn>}
@@ -92,6 +98,7 @@ export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo
92
98
  if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
93
99
  if (!('operator_shares' in value) || value['operator_shares'] === undefined) return false;
94
100
  if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
101
+ if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
95
102
  if (!('daily_returns' in value) || value['daily_returns'] === undefined) return false;
96
103
  if (!('share_prices' in value) || value['share_prices'] === undefined) return false;
97
104
  return true;
@@ -113,6 +120,7 @@ export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: bool
113
120
  'total_shares': json['total_shares'],
114
121
  'operator_shares': json['operator_shares'],
115
122
  'annual_percentage_yield': json['annual_percentage_yield'],
123
+ 'sharpe_ratio': json['sharpe_ratio'],
116
124
  'daily_returns': ((json['daily_returns'] as Array<any>).map(DailyReturnFromJSON)),
117
125
  'share_prices': ((json['share_prices'] as Array<any>).map(SharePriceFromJSON)),
118
126
  };
@@ -130,6 +138,7 @@ export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
130
138
  'total_shares': value['total_shares'],
131
139
  'operator_shares': value['operator_shares'],
132
140
  'annual_percentage_yield': value['annual_percentage_yield'],
141
+ 'sharpe_ratio': value['sharpe_ratio'],
133
142
  'daily_returns': ((value['daily_returns'] as Array<any>).map(DailyReturnToJSON)),
134
143
  'share_prices': ((value['share_prices'] as Array<any>).map(SharePriceToJSON)),
135
144
  };
@@ -44,6 +44,12 @@ export interface PublicPoolMetadata {
44
44
  * @memberof PublicPoolMetadata
45
45
  */
46
46
  account_index: number;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof PublicPoolMetadata
51
+ */
52
+ created_at: number;
47
53
  /**
48
54
  *
49
55
  * @type {number}
@@ -74,6 +80,12 @@ export interface PublicPoolMetadata {
74
80
  * @memberof PublicPoolMetadata
75
81
  */
76
82
  annual_percentage_yield: number;
83
+ /**
84
+ *
85
+ * @type {number}
86
+ * @memberof PublicPoolMetadata
87
+ */
88
+ sharpe_ratio: number;
77
89
  /**
78
90
  *
79
91
  * @type {number}
@@ -112,11 +124,13 @@ export interface PublicPoolMetadata {
112
124
  export function instanceOfPublicPoolMetadata(value: object): value is PublicPoolMetadata {
113
125
  if (!('code' in value) || value['code'] === undefined) return false;
114
126
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
127
+ if (!('created_at' in value) || value['created_at'] === undefined) return false;
115
128
  if (!('master_account_index' in value) || value['master_account_index'] === undefined) return false;
116
129
  if (!('account_type' in value) || value['account_type'] === undefined) return false;
117
130
  if (!('name' in value) || value['name'] === undefined) return false;
118
131
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
119
132
  if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
133
+ if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
120
134
  if (!('status' in value) || value['status'] === undefined) return false;
121
135
  if (!('operator_fee' in value) || value['operator_fee'] === undefined) return false;
122
136
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
@@ -137,11 +151,13 @@ export function PublicPoolMetadataFromJSONTyped(json: any, ignoreDiscriminator:
137
151
  'code': json['code'],
138
152
  'message': json['message'] == null ? undefined : json['message'],
139
153
  'account_index': json['account_index'],
154
+ 'created_at': json['created_at'],
140
155
  'master_account_index': json['master_account_index'],
141
156
  'account_type': json['account_type'],
142
157
  'name': json['name'],
143
158
  'l1_address': json['l1_address'],
144
159
  'annual_percentage_yield': json['annual_percentage_yield'],
160
+ 'sharpe_ratio': json['sharpe_ratio'],
145
161
  'status': json['status'],
146
162
  'operator_fee': json['operator_fee'],
147
163
  'total_asset_value': json['total_asset_value'],
@@ -159,11 +175,13 @@ export function PublicPoolMetadataToJSON(value?: PublicPoolMetadata | null): any
159
175
  'code': value['code'],
160
176
  'message': value['message'],
161
177
  'account_index': value['account_index'],
178
+ 'created_at': value['created_at'],
162
179
  'master_account_index': value['master_account_index'],
163
180
  'account_type': value['account_type'],
164
181
  'name': value['name'],
165
182
  'l1_address': value['l1_address'],
166
183
  'annual_percentage_yield': value['annual_percentage_yield'],
184
+ 'sharpe_ratio': value['sharpe_ratio'],
167
185
  'status': value['status'],
168
186
  'operator_fee': value['operator_fee'],
169
187
  'total_asset_value': value['total_asset_value'],
package/models/Trade.ts CHANGED
@@ -73,6 +73,18 @@ export interface Trade {
73
73
  * @memberof Trade
74
74
  */
75
75
  bid_id: number;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof Trade
80
+ */
81
+ ask_client_id: number;
82
+ /**
83
+ *
84
+ * @type {number}
85
+ * @memberof Trade
86
+ */
87
+ bid_client_id: number;
76
88
  /**
77
89
  *
78
90
  * @type {number}
@@ -191,6 +203,8 @@ export function instanceOfTrade(value: object): value is Trade {
191
203
  if (!('usd_amount' in value) || value['usd_amount'] === undefined) return false;
192
204
  if (!('ask_id' in value) || value['ask_id'] === undefined) return false;
193
205
  if (!('bid_id' in value) || value['bid_id'] === undefined) return false;
206
+ if (!('ask_client_id' in value) || value['ask_client_id'] === undefined) return false;
207
+ if (!('bid_client_id' in value) || value['bid_client_id'] === undefined) return false;
194
208
  if (!('ask_account_id' in value) || value['ask_account_id'] === undefined) return false;
195
209
  if (!('bid_account_id' in value) || value['bid_account_id'] === undefined) return false;
196
210
  if (!('is_maker_ask' in value) || value['is_maker_ask'] === undefined) return false;
@@ -226,6 +240,8 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
226
240
  'usd_amount': json['usd_amount'],
227
241
  'ask_id': json['ask_id'],
228
242
  'bid_id': json['bid_id'],
243
+ 'ask_client_id': json['ask_client_id'],
244
+ 'bid_client_id': json['bid_client_id'],
229
245
  'ask_account_id': json['ask_account_id'],
230
246
  'bid_account_id': json['bid_account_id'],
231
247
  'is_maker_ask': json['is_maker_ask'],
@@ -259,6 +275,8 @@ export function TradeToJSON(value?: Trade | null): any {
259
275
  'usd_amount': value['usd_amount'],
260
276
  'ask_id': value['ask_id'],
261
277
  'bid_id': value['bid_id'],
278
+ 'ask_client_id': value['ask_client_id'],
279
+ 'bid_client_id': value['bid_client_id'],
262
280
  'ask_account_id': value['ask_account_id'],
263
281
  'bid_account_id': value['bid_account_id'],
264
282
  'is_maker_ask': value['is_maker_ask'],
package/openapi.json CHANGED
@@ -2480,6 +2480,13 @@
2480
2480
  }
2481
2481
  },
2482
2482
  "parameters": [
2483
+ {
2484
+ "name": "authorization",
2485
+ "description": " make required after integ is done",
2486
+ "in": "header",
2487
+ "required": false,
2488
+ "type": "string"
2489
+ },
2483
2490
  {
2484
2491
  "name": "body",
2485
2492
  "in": "body",
@@ -3673,13 +3680,18 @@
3673
3680
  "created_at": {
3674
3681
  "type": "integer",
3675
3682
  "format": "int64"
3683
+ },
3684
+ "expired_at": {
3685
+ "type": "integer",
3686
+ "format": "int64"
3676
3687
  }
3677
3688
  },
3678
3689
  "title": "Announcement",
3679
3690
  "required": [
3680
3691
  "title",
3681
3692
  "content",
3682
- "created_at"
3693
+ "created_at",
3694
+ "expired_at"
3683
3695
  ]
3684
3696
  },
3685
3697
  "Announcements": {
@@ -6355,6 +6367,11 @@
6355
6367
  "format": "double",
6356
6368
  "example": "20.5000"
6357
6369
  },
6370
+ "sharpe_ratio": {
6371
+ "type": "number",
6372
+ "format": "double",
6373
+ "example": "1.5"
6374
+ },
6358
6375
  "daily_returns": {
6359
6376
  "type": "array",
6360
6377
  "items": {
@@ -6376,6 +6393,7 @@
6376
6393
  "total_shares",
6377
6394
  "operator_shares",
6378
6395
  "annual_percentage_yield",
6396
+ "sharpe_ratio",
6379
6397
  "daily_returns",
6380
6398
  "share_prices"
6381
6399
  ]
@@ -6396,6 +6414,10 @@
6396
6414
  "format": "int64",
6397
6415
  "example": "3"
6398
6416
  },
6417
+ "created_at": {
6418
+ "type": "integer",
6419
+ "format": "int64"
6420
+ },
6399
6421
  "master_account_index": {
6400
6422
  "type": "integer",
6401
6423
  "format": "int64",
@@ -6418,6 +6440,11 @@
6418
6440
  "format": "double",
6419
6441
  "example": "20.5000"
6420
6442
  },
6443
+ "sharpe_ratio": {
6444
+ "type": "number",
6445
+ "format": "double",
6446
+ "example": "1.5"
6447
+ },
6421
6448
  "status": {
6422
6449
  "type": "integer",
6423
6450
  "format": "uint8",
@@ -6444,11 +6471,13 @@
6444
6471
  "required": [
6445
6472
  "code",
6446
6473
  "account_index",
6474
+ "created_at",
6447
6475
  "master_account_index",
6448
6476
  "account_type",
6449
6477
  "name",
6450
6478
  "l1_address",
6451
6479
  "annual_percentage_yield",
6480
+ "sharpe_ratio",
6452
6481
  "status",
6453
6482
  "operator_fee",
6454
6483
  "total_asset_value",
@@ -7860,6 +7889,10 @@
7860
7889
  "ReqUseReferralCode": {
7861
7890
  "type": "object",
7862
7891
  "properties": {
7892
+ "auth": {
7893
+ "type": "string",
7894
+ "description": " made optional to support header auth clients"
7895
+ },
7863
7896
  "l1_address": {
7864
7897
  "type": "string"
7865
7898
  },
@@ -8413,6 +8446,16 @@
8413
8446
  "format": "int64",
8414
8447
  "example": "245"
8415
8448
  },
8449
+ "ask_client_id": {
8450
+ "type": "integer",
8451
+ "format": "int64",
8452
+ "example": "145"
8453
+ },
8454
+ "bid_client_id": {
8455
+ "type": "integer",
8456
+ "format": "int64",
8457
+ "example": "245"
8458
+ },
8416
8459
  "ask_account_id": {
8417
8460
  "type": "integer",
8418
8461
  "format": "int64",
@@ -8496,6 +8539,8 @@
8496
8539
  "usd_amount",
8497
8540
  "ask_id",
8498
8541
  "bid_id",
8542
+ "ask_client_id",
8543
+ "bid_client_id",
8499
8544
  "ask_account_id",
8500
8545
  "bid_account_id",
8501
8546
  "is_maker_ask",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.177",
3
+ "version": "1.0.179",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {