zklighter-perps 1.0.66 → 1.0.68

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.
@@ -86,6 +86,7 @@ export interface PnlRequest {
86
86
  start_timestamp: number;
87
87
  end_timestamp: number;
88
88
  count_back: number;
89
+ ignore_transfers?: boolean;
89
90
  }
90
91
 
91
92
  export interface PublicPoolsRequest {
@@ -479,6 +480,10 @@ export class AccountApi extends runtime.BaseAPI {
479
480
  queryParameters['count_back'] = requestParameters['count_back'];
480
481
  }
481
482
 
483
+ if (requestParameters['ignore_transfers'] != null) {
484
+ queryParameters['ignore_transfers'] = requestParameters['ignore_transfers'];
485
+ }
486
+
482
487
  const headerParameters: runtime.HTTPHeaders = {};
483
488
 
484
489
  const response = await this.request({
package/apis/OrderApi.ts CHANGED
@@ -43,6 +43,7 @@ import {
43
43
  export interface AccountActiveOrdersRequest {
44
44
  account_index: number;
45
45
  market_id: number;
46
+ auth: string;
46
47
  }
47
48
 
48
49
  export interface AccountInactiveOrdersRequest {
@@ -114,6 +115,13 @@ export class OrderApi extends runtime.BaseAPI {
114
115
  );
115
116
  }
116
117
 
118
+ if (requestParameters['auth'] == null) {
119
+ throw new runtime.RequiredError(
120
+ 'auth',
121
+ 'Required parameter "auth" was null or undefined when calling accountActiveOrders().'
122
+ );
123
+ }
124
+
117
125
  const queryParameters: any = {};
118
126
 
119
127
  if (requestParameters['account_index'] != null) {
@@ -124,6 +132,10 @@ export class OrderApi extends runtime.BaseAPI {
124
132
  queryParameters['market_id'] = requestParameters['market_id'];
125
133
  }
126
134
 
135
+ if (requestParameters['auth'] != null) {
136
+ queryParameters['auth'] = requestParameters['auth'];
137
+ }
138
+
127
139
  const headerParameters: runtime.HTTPHeaders = {};
128
140
 
129
141
  const response = await this.request({
@@ -82,7 +82,7 @@ export interface SetAccountMetadataRequest {
82
82
  target_account_index: number;
83
83
  api_key_index: number;
84
84
  metadata: string;
85
- signature: string;
85
+ auth: string;
86
86
  }
87
87
 
88
88
  export interface TxRequest {
@@ -537,10 +537,10 @@ export class TransactionApi extends runtime.BaseAPI {
537
537
  );
538
538
  }
539
539
 
540
- if (requestParameters['signature'] == null) {
540
+ if (requestParameters['auth'] == null) {
541
541
  throw new runtime.RequiredError(
542
- 'signature',
543
- 'Required parameter "signature" was null or undefined when calling setAccountMetadata().'
542
+ 'auth',
543
+ 'Required parameter "auth" was null or undefined when calling setAccountMetadata().'
544
544
  );
545
545
  }
546
546
 
@@ -578,8 +578,8 @@ export class TransactionApi extends runtime.BaseAPI {
578
578
  formParams.append('metadata', requestParameters['metadata'] as any);
579
579
  }
580
580
 
581
- if (requestParameters['signature'] != null) {
582
- formParams.append('signature', requestParameters['signature'] as any);
581
+ if (requestParameters['auth'] != null) {
582
+ formParams.append('auth', requestParameters['auth'] as any);
583
583
  }
584
584
 
585
585
  const response = await this.request({
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface AccountStats
20
20
  */
21
21
  export interface AccountStats {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AccountStats
26
+ */
27
+ collateral: string;
22
28
  /**
23
29
  *
24
30
  * @type {string}
@@ -55,6 +61,7 @@ export interface AccountStats {
55
61
  * Check if a given object implements the AccountStats interface.
56
62
  */
57
63
  export function instanceOfAccountStats(value: object): value is AccountStats {
64
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
58
65
  if (!('portfolio_value' in value) || value['portfolio_value'] === undefined) return false;
59
66
  if (!('leverage' in value) || value['leverage'] === undefined) return false;
60
67
  if (!('available_balance' in value) || value['available_balance'] === undefined) return false;
@@ -73,6 +80,7 @@ export function AccountStatsFromJSONTyped(json: any, ignoreDiscriminator: boolea
73
80
  }
74
81
  return {
75
82
 
83
+ 'collateral': json['collateral'],
76
84
  'portfolio_value': json['portfolio_value'],
77
85
  'leverage': json['leverage'],
78
86
  'available_balance': json['available_balance'],
@@ -87,6 +95,7 @@ export function AccountStatsToJSON(value?: AccountStats | null): any {
87
95
  }
88
96
  return {
89
97
 
98
+ 'collateral': value['collateral'],
90
99
  'portfolio_value': value['portfolio_value'],
91
100
  'leverage': value['leverage'],
92
101
  'available_balance': value['available_balance'],
@@ -31,6 +31,12 @@ export interface ReqGetAccountActiveOrders {
31
31
  * @memberof ReqGetAccountActiveOrders
32
32
  */
33
33
  market_id: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetAccountActiveOrders
38
+ */
39
+ auth: string;
34
40
  }
35
41
 
36
42
  /**
@@ -39,6 +45,7 @@ export interface ReqGetAccountActiveOrders {
39
45
  export function instanceOfReqGetAccountActiveOrders(value: object): value is ReqGetAccountActiveOrders {
40
46
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
41
47
  if (!('market_id' in value) || value['market_id'] === undefined) return false;
48
+ if (!('auth' in value) || value['auth'] === undefined) return false;
42
49
  return true;
43
50
  }
44
51
 
@@ -54,6 +61,7 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
54
61
 
55
62
  'account_index': json['account_index'],
56
63
  'market_id': json['market_id'],
64
+ 'auth': json['auth'],
57
65
  };
58
66
  }
59
67
 
@@ -65,6 +73,7 @@ export function ReqGetAccountActiveOrdersToJSON(value?: ReqGetAccountActiveOrder
65
73
 
66
74
  'account_index': value['account_index'],
67
75
  'market_id': value['market_id'],
76
+ 'auth': value['auth'],
68
77
  };
69
78
  }
70
79
 
@@ -55,6 +55,12 @@ export interface ReqGetAccountPnL {
55
55
  * @memberof ReqGetAccountPnL
56
56
  */
57
57
  count_back: number;
58
+ /**
59
+ *
60
+ * @type {boolean}
61
+ * @memberof ReqGetAccountPnL
62
+ */
63
+ ignore_transfers?: boolean;
58
64
  }
59
65
 
60
66
 
@@ -109,6 +115,7 @@ export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: bo
109
115
  'start_timestamp': json['start_timestamp'],
110
116
  'end_timestamp': json['end_timestamp'],
111
117
  'count_back': json['count_back'],
118
+ 'ignore_transfers': json['ignore_transfers'] == null ? undefined : json['ignore_transfers'],
112
119
  };
113
120
  }
114
121
 
@@ -124,6 +131,7 @@ export function ReqGetAccountPnLToJSON(value?: ReqGetAccountPnL | null): any {
124
131
  'start_timestamp': value['start_timestamp'],
125
132
  'end_timestamp': value['end_timestamp'],
126
133
  'count_back': value['count_back'],
134
+ 'ignore_transfers': value['ignore_transfers'],
127
135
  };
128
136
  }
129
137
 
package/openapi.json CHANGED
@@ -116,6 +116,12 @@
116
116
  "required": true,
117
117
  "type": "integer",
118
118
  "format": "uint8"
119
+ },
120
+ {
121
+ "name": "auth",
122
+ "in": "query",
123
+ "required": true,
124
+ "type": "string"
119
125
  }
120
126
  ],
121
127
  "tags": [
@@ -1321,6 +1327,14 @@
1321
1327
  "required": true,
1322
1328
  "type": "integer",
1323
1329
  "format": "int64"
1330
+ },
1331
+ {
1332
+ "name": "ignore_transfers",
1333
+ "in": "query",
1334
+ "required": false,
1335
+ "type": "boolean",
1336
+ "format": "boolean",
1337
+ "default": "false"
1324
1338
  }
1325
1339
  ],
1326
1340
  "tags": [
@@ -2001,6 +2015,10 @@
2001
2015
  "AccountStats": {
2002
2016
  "type": "object",
2003
2017
  "properties": {
2018
+ "collateral": {
2019
+ "type": "string",
2020
+ "example": "199955"
2021
+ },
2004
2022
  "portfolio_value": {
2005
2023
  "type": "string",
2006
2024
  "example": "199955"
@@ -2024,6 +2042,7 @@
2024
2042
  },
2025
2043
  "title": "AccountStats",
2026
2044
  "required": [
2045
+ "collateral",
2027
2046
  "portfolio_value",
2028
2047
  "leverage",
2029
2048
  "available_balance",
@@ -3979,12 +3998,16 @@
3979
3998
  "market_id": {
3980
3999
  "type": "integer",
3981
4000
  "format": "uint8"
4001
+ },
4002
+ "auth": {
4003
+ "type": "string"
3982
4004
  }
3983
4005
  },
3984
4006
  "title": "ReqGetAccountActiveOrders",
3985
4007
  "required": [
3986
4008
  "account_index",
3987
- "market_id"
4009
+ "market_id",
4010
+ "auth"
3988
4011
  ]
3989
4012
  },
3990
4013
  "ReqGetAccountApiKeys": {
@@ -4132,6 +4155,11 @@
4132
4155
  "count_back": {
4133
4156
  "type": "integer",
4134
4157
  "format": "int64"
4158
+ },
4159
+ "ignore_transfers": {
4160
+ "type": "boolean",
4161
+ "format": "boolean",
4162
+ "default": "false"
4135
4163
  }
4136
4164
  },
4137
4165
  "title": "ReqGetAccountPnL",
@@ -4686,7 +4714,7 @@
4686
4714
  "metadata": {
4687
4715
  "type": "string"
4688
4716
  },
4689
- "signature": {
4717
+ "auth": {
4690
4718
  "type": "string"
4691
4719
  }
4692
4720
  },
@@ -4696,7 +4724,7 @@
4696
4724
  "target_account_index",
4697
4725
  "api_key_index",
4698
4726
  "metadata",
4699
- "signature"
4727
+ "auth"
4700
4728
  ]
4701
4729
  },
4702
4730
  "ResultCode": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {