zklighter-perps 1.0.114 → 1.0.116

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.
@@ -81,20 +81,20 @@ export interface LeaderboardRequest {
81
81
  }
82
82
 
83
83
  export interface PnlRequest {
84
- auth: string;
85
84
  by: PnlByEnum;
86
85
  value: string;
87
86
  resolution: PnlResolutionEnum;
88
87
  start_timestamp: number;
89
88
  end_timestamp: number;
90
89
  count_back: number;
90
+ auth?: string;
91
91
  ignore_transfers?: boolean;
92
92
  }
93
93
 
94
94
  export interface PositionFundingRequest {
95
- auth: string;
96
95
  account_index: number;
97
96
  limit: number;
97
+ auth?: string;
98
98
  market_id?: number;
99
99
  cursor?: string;
100
100
  side?: PositionFundingSideEnum;
@@ -409,13 +409,6 @@ export class AccountApi extends runtime.BaseAPI {
409
409
  * pnl
410
410
  */
411
411
  async pnlRaw(requestParameters: PnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPnL>> {
412
- if (requestParameters['auth'] == null) {
413
- throw new runtime.RequiredError(
414
- 'auth',
415
- 'Required parameter "auth" was null or undefined when calling pnl().'
416
- );
417
- }
418
-
419
412
  if (requestParameters['by'] == null) {
420
413
  throw new runtime.RequiredError(
421
414
  'by',
@@ -518,13 +511,6 @@ export class AccountApi extends runtime.BaseAPI {
518
511
  * positionFunding
519
512
  */
520
513
  async positionFundingRaw(requestParameters: PositionFundingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PositionFundings>> {
521
- if (requestParameters['auth'] == null) {
522
- throw new runtime.RequiredError(
523
- 'auth',
524
- 'Required parameter "auth" was null or undefined when calling positionFunding().'
525
- );
526
- }
527
-
528
514
  if (requestParameters['account_index'] == null) {
529
515
  throw new runtime.RequiredError(
530
516
  'account_index',
package/apis/OrderApi.ts CHANGED
@@ -85,6 +85,7 @@ export interface RecentTradesRequest {
85
85
  export interface TradesRequest {
86
86
  sort_by: TradesSortByEnum;
87
87
  limit: number;
88
+ auth?: string;
88
89
  market_id?: number;
89
90
  account_index?: number;
90
91
  order_index?: number;
@@ -526,6 +527,10 @@ export class OrderApi extends runtime.BaseAPI {
526
527
 
527
528
  const queryParameters: any = {};
528
529
 
530
+ if (requestParameters['auth'] != null) {
531
+ queryParameters['auth'] = requestParameters['auth'];
532
+ }
533
+
529
534
  if (requestParameters['market_id'] != null) {
530
535
  queryParameters['market_id'] = requestParameters['market_id'];
531
536
  }
@@ -24,7 +24,7 @@ export interface ReqGetAccountPnL {
24
24
  * @type {string}
25
25
  * @memberof ReqGetAccountPnL
26
26
  */
27
- auth: string;
27
+ auth?: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -96,7 +96,6 @@ export type ReqGetAccountPnLResolutionEnum = typeof ReqGetAccountPnLResolutionEn
96
96
  * Check if a given object implements the ReqGetAccountPnL interface.
97
97
  */
98
98
  export function instanceOfReqGetAccountPnL(value: object): value is ReqGetAccountPnL {
99
- if (!('auth' in value) || value['auth'] === undefined) return false;
100
99
  if (!('by' in value) || value['by'] === undefined) return false;
101
100
  if (!('value' in value) || value['value'] === undefined) return false;
102
101
  if (!('resolution' in value) || value['resolution'] === undefined) return false;
@@ -116,7 +115,7 @@ export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: bo
116
115
  }
117
116
  return {
118
117
 
119
- 'auth': json['auth'],
118
+ 'auth': json['auth'] == null ? undefined : json['auth'],
120
119
  'by': json['by'],
121
120
  'value': json['value'],
122
121
  'resolution': json['resolution'],
@@ -24,7 +24,7 @@ export interface ReqGetPositionFunding {
24
24
  * @type {string}
25
25
  * @memberof ReqGetPositionFunding
26
26
  */
27
- auth: string;
27
+ auth?: string;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -73,7 +73,6 @@ export type ReqGetPositionFundingSideEnum = typeof ReqGetPositionFundingSideEnum
73
73
  * Check if a given object implements the ReqGetPositionFunding interface.
74
74
  */
75
75
  export function instanceOfReqGetPositionFunding(value: object): value is ReqGetPositionFunding {
76
- if (!('auth' in value) || value['auth'] === undefined) return false;
77
76
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
78
77
  if (!('limit' in value) || value['limit'] === undefined) return false;
79
78
  return true;
@@ -89,7 +88,7 @@ export function ReqGetPositionFundingFromJSONTyped(json: any, ignoreDiscriminato
89
88
  }
90
89
  return {
91
90
 
92
- 'auth': json['auth'],
91
+ 'auth': json['auth'] == null ? undefined : json['auth'],
93
92
  'account_index': json['account_index'],
94
93
  'market_id': json['market_id'] == null ? undefined : json['market_id'],
95
94
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetTrades
20
20
  */
21
21
  export interface ReqGetTrades {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetTrades
26
+ */
27
+ auth?: string;
22
28
  /**
23
29
  *
24
30
  * @type {number}
@@ -115,6 +121,7 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
115
121
  }
116
122
  return {
117
123
 
124
+ 'auth': json['auth'] == null ? undefined : json['auth'],
118
125
  'market_id': json['market_id'] == null ? undefined : json['market_id'],
119
126
  'account_index': json['account_index'] == null ? undefined : json['account_index'],
120
127
  'order_index': json['order_index'] == null ? undefined : json['order_index'],
@@ -133,6 +140,7 @@ export function ReqGetTradesToJSON(value?: ReqGetTrades | null): any {
133
140
  }
134
141
  return {
135
142
 
143
+ 'auth': value['auth'],
136
144
  'market_id': value['market_id'],
137
145
  'account_index': value['account_index'],
138
146
  'order_index': value['order_index'],
package/openapi.json CHANGED
@@ -1616,7 +1616,7 @@
1616
1616
  {
1617
1617
  "name": "auth",
1618
1618
  "in": "query",
1619
- "required": true,
1619
+ "required": false,
1620
1620
  "type": "string"
1621
1621
  },
1622
1622
  {
@@ -1713,7 +1713,7 @@
1713
1713
  {
1714
1714
  "name": "auth",
1715
1715
  "in": "query",
1716
- "required": true,
1716
+ "required": false,
1717
1717
  "type": "string"
1718
1718
  },
1719
1719
  {
@@ -2165,6 +2165,12 @@
2165
2165
  }
2166
2166
  },
2167
2167
  "parameters": [
2168
+ {
2169
+ "name": "auth",
2170
+ "in": "query",
2171
+ "required": false,
2172
+ "type": "string"
2173
+ },
2168
2174
  {
2169
2175
  "name": "market_id",
2170
2176
  "in": "query",
@@ -5633,7 +5639,6 @@
5633
5639
  },
5634
5640
  "title": "ReqGetAccountPnL",
5635
5641
  "required": [
5636
- "auth",
5637
5642
  "by",
5638
5643
  "value",
5639
5644
  "resolution",
@@ -6022,7 +6027,6 @@
6022
6027
  },
6023
6028
  "title": "ReqGetPositionFunding",
6024
6029
  "required": [
6025
- "auth",
6026
6030
  "account_index",
6027
6031
  "limit"
6028
6032
  ]
@@ -6178,6 +6182,9 @@
6178
6182
  "ReqGetTrades": {
6179
6183
  "type": "object",
6180
6184
  "properties": {
6185
+ "auth": {
6186
+ "type": "string"
6187
+ },
6181
6188
  "market_id": {
6182
6189
  "type": "integer",
6183
6190
  "format": "uint8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.114",
3
+ "version": "1.0.116",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {