zklighter-perps 1.0.184 → 1.0.185

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.
@@ -50,10 +50,10 @@ export interface AccountTxsRequest {
50
50
  limit: number;
51
51
  by: AccountTxsByEnum;
52
52
  value: string;
53
- authorization?: string;
54
53
  index?: number;
55
- types?: Array<number>;
54
+ authorization?: string;
56
55
  auth?: string;
56
+ types?: Array<number>;
57
57
  }
58
58
 
59
59
  export interface BlockTxsRequest {
@@ -173,20 +173,20 @@ export class TransactionApi extends runtime.BaseAPI {
173
173
  queryParameters['value'] = requestParameters['value'];
174
174
  }
175
175
 
176
- if (requestParameters['types'] != null) {
177
- queryParameters['types'] = requestParameters['types']!.join(runtime.COLLECTION_FORMATS["csv"]);
176
+ if (requestParameters['authorization'] != null) {
177
+ queryParameters['authorization'] = requestParameters['authorization'];
178
178
  }
179
179
 
180
180
  if (requestParameters['auth'] != null) {
181
181
  queryParameters['auth'] = requestParameters['auth'];
182
182
  }
183
183
 
184
- const headerParameters: runtime.HTTPHeaders = {};
185
-
186
- if (requestParameters['authorization'] != null) {
187
- headerParameters['authorization'] = String(requestParameters['authorization']);
184
+ if (requestParameters['types'] != null) {
185
+ queryParameters['types'] = requestParameters['types']!.join(runtime.COLLECTION_FORMATS["csv"]);
188
186
  }
189
187
 
188
+ const headerParameters: runtime.HTTPHeaders = {};
189
+
190
190
  const response = await this.request({
191
191
  path: `/api/v1/accountTxs`,
192
192
  method: 'GET',
@@ -277,14 +277,18 @@ export class TransactionApi extends runtime.BaseAPI {
277
277
 
278
278
  const queryParameters: any = {};
279
279
 
280
- if (requestParameters['account_index'] != null) {
281
- queryParameters['account_index'] = requestParameters['account_index'];
280
+ if (requestParameters['authorization'] != null) {
281
+ queryParameters['authorization'] = requestParameters['authorization'];
282
282
  }
283
283
 
284
284
  if (requestParameters['auth'] != null) {
285
285
  queryParameters['auth'] = requestParameters['auth'];
286
286
  }
287
287
 
288
+ if (requestParameters['account_index'] != null) {
289
+ queryParameters['account_index'] = requestParameters['account_index'];
290
+ }
291
+
288
292
  if (requestParameters['l1_address'] != null) {
289
293
  queryParameters['l1_address'] = requestParameters['l1_address'];
290
294
  }
@@ -299,10 +303,6 @@ export class TransactionApi extends runtime.BaseAPI {
299
303
 
300
304
  const headerParameters: runtime.HTTPHeaders = {};
301
305
 
302
- if (requestParameters['authorization'] != null) {
303
- headerParameters['authorization'] = String(requestParameters['authorization']);
304
- }
305
-
306
306
  const response = await this.request({
307
307
  path: `/api/v1/deposit/history`,
308
308
  method: 'GET',
@@ -615,24 +615,24 @@ export class TransactionApi extends runtime.BaseAPI {
615
615
 
616
616
  const queryParameters: any = {};
617
617
 
618
- if (requestParameters['account_index'] != null) {
619
- queryParameters['account_index'] = requestParameters['account_index'];
618
+ if (requestParameters['authorization'] != null) {
619
+ queryParameters['authorization'] = requestParameters['authorization'];
620
620
  }
621
621
 
622
622
  if (requestParameters['auth'] != null) {
623
623
  queryParameters['auth'] = requestParameters['auth'];
624
624
  }
625
625
 
626
+ if (requestParameters['account_index'] != null) {
627
+ queryParameters['account_index'] = requestParameters['account_index'];
628
+ }
629
+
626
630
  if (requestParameters['cursor'] != null) {
627
631
  queryParameters['cursor'] = requestParameters['cursor'];
628
632
  }
629
633
 
630
634
  const headerParameters: runtime.HTTPHeaders = {};
631
635
 
632
- if (requestParameters['authorization'] != null) {
633
- headerParameters['authorization'] = String(requestParameters['authorization']);
634
- }
635
-
636
636
  const response = await this.request({
637
637
  path: `/api/v1/transfer/history`,
638
638
  method: 'GET',
@@ -798,14 +798,18 @@ export class TransactionApi extends runtime.BaseAPI {
798
798
 
799
799
  const queryParameters: any = {};
800
800
 
801
- if (requestParameters['account_index'] != null) {
802
- queryParameters['account_index'] = requestParameters['account_index'];
801
+ if (requestParameters['authorization'] != null) {
802
+ queryParameters['authorization'] = requestParameters['authorization'];
803
803
  }
804
804
 
805
805
  if (requestParameters['auth'] != null) {
806
806
  queryParameters['auth'] = requestParameters['auth'];
807
807
  }
808
808
 
809
+ if (requestParameters['account_index'] != null) {
810
+ queryParameters['account_index'] = requestParameters['account_index'];
811
+ }
812
+
809
813
  if (requestParameters['cursor'] != null) {
810
814
  queryParameters['cursor'] = requestParameters['cursor'];
811
815
  }
@@ -816,10 +820,6 @@ export class TransactionApi extends runtime.BaseAPI {
816
820
 
817
821
  const headerParameters: runtime.HTTPHeaders = {};
818
822
 
819
- if (requestParameters['authorization'] != null) {
820
- headerParameters['authorization'] = String(requestParameters['authorization']);
821
- }
822
-
823
823
  const response = await this.request({
824
824
  path: `/api/v1/withdraw/history`,
825
825
  method: 'GET',
@@ -0,0 +1,124 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApiToken
20
+ */
21
+ export interface ApiToken {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ApiToken
26
+ */
27
+ token_id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiToken
32
+ */
33
+ api_token: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ApiToken
38
+ */
39
+ name: string;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof ApiToken
44
+ */
45
+ account_index: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof ApiToken
50
+ */
51
+ expiry: number;
52
+ /**
53
+ *
54
+ * @type {boolean}
55
+ * @memberof ApiToken
56
+ */
57
+ sub_account_access: boolean;
58
+ /**
59
+ *
60
+ * @type {boolean}
61
+ * @memberof ApiToken
62
+ */
63
+ revoked: boolean;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof ApiToken
68
+ */
69
+ scopes: string;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the ApiToken interface.
74
+ */
75
+ export function instanceOfApiToken(value: object): value is ApiToken {
76
+ if (!('token_id' in value) || value['token_id'] === undefined) return false;
77
+ if (!('api_token' in value) || value['api_token'] === undefined) return false;
78
+ if (!('name' in value) || value['name'] === undefined) return false;
79
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
80
+ if (!('expiry' in value) || value['expiry'] === undefined) return false;
81
+ if (!('sub_account_access' in value) || value['sub_account_access'] === undefined) return false;
82
+ if (!('revoked' in value) || value['revoked'] === undefined) return false;
83
+ if (!('scopes' in value) || value['scopes'] === undefined) return false;
84
+ return true;
85
+ }
86
+
87
+ export function ApiTokenFromJSON(json: any): ApiToken {
88
+ return ApiTokenFromJSONTyped(json, false);
89
+ }
90
+
91
+ export function ApiTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiToken {
92
+ if (json == null) {
93
+ return json;
94
+ }
95
+ return {
96
+
97
+ 'token_id': json['token_id'],
98
+ 'api_token': json['api_token'],
99
+ 'name': json['name'],
100
+ 'account_index': json['account_index'],
101
+ 'expiry': json['expiry'],
102
+ 'sub_account_access': json['sub_account_access'],
103
+ 'revoked': json['revoked'],
104
+ 'scopes': json['scopes'],
105
+ };
106
+ }
107
+
108
+ export function ApiTokenToJSON(value?: ApiToken | null): any {
109
+ if (value == null) {
110
+ return value;
111
+ }
112
+ return {
113
+
114
+ 'token_id': value['token_id'],
115
+ 'api_token': value['api_token'],
116
+ 'name': value['name'],
117
+ 'account_index': value['account_index'],
118
+ 'expiry': value['expiry'],
119
+ 'sub_account_access': value['sub_account_access'],
120
+ 'revoked': value['revoked'],
121
+ 'scopes': value['scopes'],
122
+ };
123
+ }
124
+
package/models/Auth.ts ADDED
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface Auth
20
+ */
21
+ export interface Auth {
22
+ /**
23
+ * made optional to support header auth clients
24
+ * @type {string}
25
+ * @memberof Auth
26
+ */
27
+ auth: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the Auth interface.
32
+ */
33
+ export function instanceOfAuth(value: object): value is Auth {
34
+ if (!('auth' in value) || value['auth'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AuthFromJSON(json: any): Auth {
39
+ return AuthFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Auth {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'auth': json['auth'],
49
+ };
50
+ }
51
+
52
+ export function AuthToJSON(value?: Auth | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'auth': value['auth'],
59
+ };
60
+ }
61
+
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqExportData {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqExportData
26
26
  */
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetAccountActiveOrders
20
20
  */
21
21
  export interface ReqGetAccountActiveOrders {
22
+ /**
23
+ * made optional to support header auth clients
24
+ * @type {string}
25
+ * @memberof ReqGetAccountActiveOrders
26
+ */
27
+ auth?: string;
22
28
  /**
23
29
  *
24
30
  * @type {number}
@@ -31,12 +37,6 @@ export interface ReqGetAccountActiveOrders {
31
37
  * @memberof ReqGetAccountActiveOrders
32
38
  */
33
39
  market_id: number;
34
- /**
35
- * made optional to support header auth clients
36
- * @type {string}
37
- * @memberof ReqGetAccountActiveOrders
38
- */
39
- auth?: string;
40
40
  }
41
41
 
42
42
  /**
@@ -58,9 +58,9 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
58
58
  }
59
59
  return {
60
60
 
61
+ 'auth': json['auth'] == null ? undefined : json['auth'],
61
62
  'account_index': json['account_index'],
62
63
  'market_id': json['market_id'],
63
- 'auth': json['auth'] == null ? undefined : json['auth'],
64
64
  };
65
65
  }
66
66
 
@@ -70,9 +70,9 @@ export function ReqGetAccountActiveOrdersToJSON(value?: ReqGetAccountActiveOrder
70
70
  }
71
71
  return {
72
72
 
73
+ 'auth': value['auth'],
73
74
  'account_index': value['account_index'],
74
75
  'market_id': value['market_id'],
75
- 'auth': value['auth'],
76
76
  };
77
77
  }
78
78
 
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetAccountPnL {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetAccountPnL
26
26
  */
@@ -44,17 +44,17 @@ export interface ReqGetAccountTxs {
44
44
  */
45
45
  value?: string;
46
46
  /**
47
- *
48
- * @type {Array<number>}
47
+ * made optional to support header auth clients
48
+ * @type {string}
49
49
  * @memberof ReqGetAccountTxs
50
50
  */
51
- types?: Array<number>;
51
+ auth?: string;
52
52
  /**
53
53
  *
54
- * @type {string}
54
+ * @type {Array<number>}
55
55
  * @memberof ReqGetAccountTxs
56
56
  */
57
- auth?: string;
57
+ types?: Array<number>;
58
58
  }
59
59
 
60
60
 
@@ -88,8 +88,8 @@ export function ReqGetAccountTxsFromJSONTyped(json: any, ignoreDiscriminator: bo
88
88
  'limit': json['limit'] == null ? undefined : json['limit'],
89
89
  'by': json['by'] == null ? undefined : json['by'],
90
90
  'value': json['value'] == null ? undefined : json['value'],
91
- 'types': json['types'] == null ? undefined : json['types'],
92
91
  'auth': json['auth'] == null ? undefined : json['auth'],
92
+ 'types': json['types'] == null ? undefined : json['types'],
93
93
  };
94
94
  }
95
95
 
@@ -103,8 +103,8 @@ export function ReqGetAccountTxsToJSON(value?: ReqGetAccountTxs | null): any {
103
103
  'limit': value['limit'],
104
104
  'by': value['by'],
105
105
  'value': value['value'],
106
- 'types': value['types'],
107
106
  'auth': value['auth'],
107
+ 'types': value['types'],
108
108
  };
109
109
  }
110
110
 
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ReqGetApiTokens
20
+ */
21
+ export interface ReqGetApiTokens {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetApiTokens
26
+ */
27
+ account_index: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ReqGetApiTokens interface.
32
+ */
33
+ export function instanceOfReqGetApiTokens(value: object): value is ReqGetApiTokens {
34
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ReqGetApiTokensFromJSON(json: any): ReqGetApiTokens {
39
+ return ReqGetApiTokensFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ReqGetApiTokensFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetApiTokens {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'account_index': json['account_index'],
49
+ };
50
+ }
51
+
52
+ export function ReqGetApiTokensToJSON(value?: ReqGetApiTokens | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'account_index': value['account_index'],
59
+ };
60
+ }
61
+
@@ -19,18 +19,18 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetDepositHistory
20
20
  */
21
21
  export interface ReqGetDepositHistory {
22
- /**
23
- *
24
- * @type {number}
25
- * @memberof ReqGetDepositHistory
26
- */
27
- account_index: number;
28
22
  /**
29
23
  * made optional to support header auth clients
30
24
  * @type {string}
31
25
  * @memberof ReqGetDepositHistory
32
26
  */
33
27
  auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetDepositHistory
32
+ */
33
+ account_index: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -82,8 +82,8 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
82
82
  }
83
83
  return {
84
84
 
85
- 'account_index': json['account_index'],
86
85
  'auth': json['auth'] == null ? undefined : json['auth'],
86
+ 'account_index': json['account_index'],
87
87
  'l1_address': json['l1_address'],
88
88
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
89
89
  'filter': json['filter'] == null ? undefined : json['filter'],
@@ -96,8 +96,8 @@ export function ReqGetDepositHistoryToJSON(value?: ReqGetDepositHistory | null):
96
96
  }
97
97
  return {
98
98
 
99
- 'account_index': value['account_index'],
100
99
  'auth': value['auth'],
100
+ 'account_index': value['account_index'],
101
101
  'l1_address': value['l1_address'],
102
102
  'cursor': value['cursor'],
103
103
  'filter': value['filter'],
@@ -19,18 +19,18 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetFastWithdrawInfo
20
20
  */
21
21
  export interface ReqGetFastWithdrawInfo {
22
- /**
23
- *
24
- * @type {number}
25
- * @memberof ReqGetFastWithdrawInfo
26
- */
27
- account_index: number;
28
22
  /**
29
23
  * made optional to support header auth clients
30
24
  * @type {string}
31
25
  * @memberof ReqGetFastWithdrawInfo
32
26
  */
33
27
  auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetFastWithdrawInfo
32
+ */
33
+ account_index: number;
34
34
  }
35
35
 
36
36
  /**
@@ -51,8 +51,8 @@ export function ReqGetFastWithdrawInfoFromJSONTyped(json: any, ignoreDiscriminat
51
51
  }
52
52
  return {
53
53
 
54
- 'account_index': json['account_index'],
55
54
  'auth': json['auth'] == null ? undefined : json['auth'],
55
+ 'account_index': json['account_index'],
56
56
  };
57
57
  }
58
58
 
@@ -62,8 +62,8 @@ export function ReqGetFastWithdrawInfoToJSON(value?: ReqGetFastWithdrawInfo | nu
62
62
  }
63
63
  return {
64
64
 
65
- 'account_index': value['account_index'],
66
65
  'auth': value['auth'],
66
+ 'account_index': value['account_index'],
67
67
  };
68
68
  }
69
69
 
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetPositionFunding {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetPositionFunding
26
26
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetPublicPoolsMetadata {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetPublicPoolsMetadata
26
26
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetTrades {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetTrades
26
26
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetTransferFeeInfo {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetTransferFeeInfo
26
26
  */
@@ -19,18 +19,18 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetTransferHistory
20
20
  */
21
21
  export interface ReqGetTransferHistory {
22
- /**
23
- *
24
- * @type {number}
25
- * @memberof ReqGetTransferHistory
26
- */
27
- account_index: number;
28
22
  /**
29
23
  * made optional to support header auth clients
30
24
  * @type {string}
31
25
  * @memberof ReqGetTransferHistory
32
26
  */
33
27
  auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetTransferHistory
32
+ */
33
+ account_index: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -57,8 +57,8 @@ export function ReqGetTransferHistoryFromJSONTyped(json: any, ignoreDiscriminato
57
57
  }
58
58
  return {
59
59
 
60
- 'account_index': json['account_index'],
61
60
  'auth': json['auth'] == null ? undefined : json['auth'],
61
+ 'account_index': json['account_index'],
62
62
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
63
63
  };
64
64
  }
@@ -69,8 +69,8 @@ export function ReqGetTransferHistoryToJSON(value?: ReqGetTransferHistory | null
69
69
  }
70
70
  return {
71
71
 
72
- 'account_index': value['account_index'],
73
72
  'auth': value['auth'],
73
+ 'account_index': value['account_index'],
74
74
  'cursor': value['cursor'],
75
75
  };
76
76
  }