zklighter-perps 1.0.111 → 1.0.112

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.
@@ -91,6 +91,7 @@ models/ReqGetBlockTxs.ts
91
91
  models/ReqGetByAccount.ts
92
92
  models/ReqGetCandlesticks.ts
93
93
  models/ReqGetDepositHistory.ts
94
+ models/ReqGetFastWithdrawInfo.ts
94
95
  models/ReqGetFeeBucket.ts
95
96
  models/ReqGetFundings.ts
96
97
  models/ReqGetL1Tx.ts
package/apis/BridgeApi.ts CHANGED
@@ -59,6 +59,11 @@ export interface FastwithdrawRequest {
59
59
  auth: string;
60
60
  }
61
61
 
62
+ export interface FastwithdrawInfoRequest {
63
+ account_index: number;
64
+ auth: string;
65
+ }
66
+
62
67
  /**
63
68
  *
64
69
  */
@@ -384,9 +389,31 @@ export class BridgeApi extends runtime.BaseAPI {
384
389
  * Get fast withdraw info
385
390
  * fastwithdraw_info
386
391
  */
387
- async fastwithdrawInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetFastwithdrawalInfo>> {
392
+ async fastwithdrawInfoRaw(requestParameters: FastwithdrawInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetFastwithdrawalInfo>> {
393
+ if (requestParameters['account_index'] == null) {
394
+ throw new runtime.RequiredError(
395
+ 'account_index',
396
+ 'Required parameter "account_index" was null or undefined when calling fastwithdrawInfo().'
397
+ );
398
+ }
399
+
400
+ if (requestParameters['auth'] == null) {
401
+ throw new runtime.RequiredError(
402
+ 'auth',
403
+ 'Required parameter "auth" was null or undefined when calling fastwithdrawInfo().'
404
+ );
405
+ }
406
+
388
407
  const queryParameters: any = {};
389
408
 
409
+ if (requestParameters['account_index'] != null) {
410
+ queryParameters['account_index'] = requestParameters['account_index'];
411
+ }
412
+
413
+ if (requestParameters['auth'] != null) {
414
+ queryParameters['auth'] = requestParameters['auth'];
415
+ }
416
+
390
417
  const headerParameters: runtime.HTTPHeaders = {};
391
418
 
392
419
  const response = await this.request({
@@ -403,8 +430,8 @@ export class BridgeApi extends runtime.BaseAPI {
403
430
  * Get fast withdraw info
404
431
  * fastwithdraw_info
405
432
  */
406
- async fastwithdrawInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetFastwithdrawalInfo> {
407
- const response = await this.fastwithdrawInfoRaw(initOverrides);
433
+ async fastwithdrawInfo(requestParameters: FastwithdrawInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetFastwithdrawalInfo> {
434
+ const response = await this.fastwithdrawInfoRaw(requestParameters, initOverrides);
408
435
  return await response.value();
409
436
  }
410
437
 
@@ -63,6 +63,8 @@ export interface BlockTxsRequest {
63
63
  }
64
64
 
65
65
  export interface DepositHistoryRequest {
66
+ account_index: number;
67
+ auth: string;
66
68
  l1_address: string;
67
69
  cursor?: string;
68
70
  filter?: DepositHistoryFilterEnum;
@@ -113,6 +115,7 @@ export interface TxsRequest {
113
115
 
114
116
  export interface WithdrawHistoryRequest {
115
117
  account_index: number;
118
+ auth: string;
116
119
  cursor?: string;
117
120
  filter?: WithdrawHistoryFilterEnum;
118
121
  }
@@ -300,6 +303,20 @@ export class TransactionApi extends runtime.BaseAPI {
300
303
  * deposit_history
301
304
  */
302
305
  async depositHistoryRaw(requestParameters: DepositHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositHistory>> {
306
+ if (requestParameters['account_index'] == null) {
307
+ throw new runtime.RequiredError(
308
+ 'account_index',
309
+ 'Required parameter "account_index" was null or undefined when calling depositHistory().'
310
+ );
311
+ }
312
+
313
+ if (requestParameters['auth'] == null) {
314
+ throw new runtime.RequiredError(
315
+ 'auth',
316
+ 'Required parameter "auth" was null or undefined when calling depositHistory().'
317
+ );
318
+ }
319
+
303
320
  if (requestParameters['l1_address'] == null) {
304
321
  throw new runtime.RequiredError(
305
322
  'l1_address',
@@ -309,6 +326,14 @@ export class TransactionApi extends runtime.BaseAPI {
309
326
 
310
327
  const queryParameters: any = {};
311
328
 
329
+ if (requestParameters['account_index'] != null) {
330
+ queryParameters['account_index'] = requestParameters['account_index'];
331
+ }
332
+
333
+ if (requestParameters['auth'] != null) {
334
+ queryParameters['auth'] = requestParameters['auth'];
335
+ }
336
+
312
337
  if (requestParameters['l1_address'] != null) {
313
338
  queryParameters['l1_address'] = requestParameters['l1_address'];
314
339
  }
@@ -811,12 +836,23 @@ export class TransactionApi extends runtime.BaseAPI {
811
836
  );
812
837
  }
813
838
 
839
+ if (requestParameters['auth'] == null) {
840
+ throw new runtime.RequiredError(
841
+ 'auth',
842
+ 'Required parameter "auth" was null or undefined when calling withdrawHistory().'
843
+ );
844
+ }
845
+
814
846
  const queryParameters: any = {};
815
847
 
816
848
  if (requestParameters['account_index'] != null) {
817
849
  queryParameters['account_index'] = requestParameters['account_index'];
818
850
  }
819
851
 
852
+ if (requestParameters['auth'] != null) {
853
+ queryParameters['auth'] = requestParameters['auth'];
854
+ }
855
+
820
856
  if (requestParameters['cursor'] != null) {
821
857
  queryParameters['cursor'] = requestParameters['cursor'];
822
858
  }
@@ -19,6 +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
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetDepositHistory
32
+ */
33
+ auth: string;
22
34
  /**
23
35
  *
24
36
  * @type {string}
@@ -55,6 +67,8 @@ export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEn
55
67
  * Check if a given object implements the ReqGetDepositHistory interface.
56
68
  */
57
69
  export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
70
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
71
+ if (!('auth' in value) || value['auth'] === undefined) return false;
58
72
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
59
73
  return true;
60
74
  }
@@ -69,6 +83,8 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
69
83
  }
70
84
  return {
71
85
 
86
+ 'account_index': json['account_index'],
87
+ 'auth': json['auth'],
72
88
  'l1_address': json['l1_address'],
73
89
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
74
90
  'filter': json['filter'] == null ? undefined : json['filter'],
@@ -81,6 +97,8 @@ export function ReqGetDepositHistoryToJSON(value?: ReqGetDepositHistory | null):
81
97
  }
82
98
  return {
83
99
 
100
+ 'account_index': value['account_index'],
101
+ 'auth': value['auth'],
84
102
  'l1_address': value['l1_address'],
85
103
  'cursor': value['cursor'],
86
104
  'filter': value['filter'],
@@ -0,0 +1,70 @@
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 ReqGetFastWithdrawInfo
20
+ */
21
+ export interface ReqGetFastWithdrawInfo {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetFastWithdrawInfo
26
+ */
27
+ account_index: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetFastWithdrawInfo
32
+ */
33
+ auth: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ReqGetFastWithdrawInfo interface.
38
+ */
39
+ export function instanceOfReqGetFastWithdrawInfo(value: object): value is ReqGetFastWithdrawInfo {
40
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
41
+ if (!('auth' in value) || value['auth'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ReqGetFastWithdrawInfoFromJSON(json: any): ReqGetFastWithdrawInfo {
46
+ return ReqGetFastWithdrawInfoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ReqGetFastWithdrawInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetFastWithdrawInfo {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'account_index': json['account_index'],
56
+ 'auth': json['auth'],
57
+ };
58
+ }
59
+
60
+ export function ReqGetFastWithdrawInfoToJSON(value?: ReqGetFastWithdrawInfo | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'account_index': value['account_index'],
67
+ 'auth': value['auth'],
68
+ };
69
+ }
70
+
@@ -25,6 +25,12 @@ export interface ReqGetWithdrawHistory {
25
25
  * @memberof ReqGetWithdrawHistory
26
26
  */
27
27
  account_index: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetWithdrawHistory
32
+ */
33
+ auth: string;
28
34
  /**
29
35
  *
30
36
  * @type {string}
@@ -56,6 +62,7 @@ export type ReqGetWithdrawHistoryFilterEnum = typeof ReqGetWithdrawHistoryFilter
56
62
  */
57
63
  export function instanceOfReqGetWithdrawHistory(value: object): value is ReqGetWithdrawHistory {
58
64
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
65
+ if (!('auth' in value) || value['auth'] === undefined) return false;
59
66
  return true;
60
67
  }
61
68
 
@@ -70,6 +77,7 @@ export function ReqGetWithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminato
70
77
  return {
71
78
 
72
79
  'account_index': json['account_index'],
80
+ 'auth': json['auth'],
73
81
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
74
82
  'filter': json['filter'] == null ? undefined : json['filter'],
75
83
  };
@@ -82,6 +90,7 @@ export function ReqGetWithdrawHistoryToJSON(value?: ReqGetWithdrawHistory | null
82
90
  return {
83
91
 
84
92
  'account_index': value['account_index'],
93
+ 'auth': value['auth'],
85
94
  'cursor': value['cursor'],
86
95
  'filter': value['filter'],
87
96
  };
package/models/index.ts CHANGED
@@ -79,6 +79,7 @@ export * from './ReqGetBlockTxs';
79
79
  export * from './ReqGetByAccount';
80
80
  export * from './ReqGetCandlesticks';
81
81
  export * from './ReqGetDepositHistory';
82
+ export * from './ReqGetFastWithdrawInfo';
82
83
  export * from './ReqGetFeeBucket';
83
84
  export * from './ReqGetFundings';
84
85
  export * from './ReqGetL1Tx';
package/openapi.json CHANGED
@@ -899,6 +899,19 @@
899
899
  }
900
900
  },
901
901
  "parameters": [
902
+ {
903
+ "name": "account_index",
904
+ "in": "query",
905
+ "required": true,
906
+ "type": "integer",
907
+ "format": "int64"
908
+ },
909
+ {
910
+ "name": "auth",
911
+ "in": "query",
912
+ "required": true,
913
+ "type": "string"
914
+ },
902
915
  {
903
916
  "name": "l1_address",
904
917
  "in": "query",
@@ -1094,9 +1107,27 @@
1094
1107
  }
1095
1108
  }
1096
1109
  },
1110
+ "parameters": [
1111
+ {
1112
+ "name": "account_index",
1113
+ "in": "query",
1114
+ "required": true,
1115
+ "type": "integer",
1116
+ "format": "int64"
1117
+ },
1118
+ {
1119
+ "name": "auth",
1120
+ "in": "query",
1121
+ "required": true,
1122
+ "type": "string"
1123
+ }
1124
+ ],
1097
1125
  "tags": [
1098
1126
  "bridge"
1099
1127
  ],
1128
+ "consumes": [
1129
+ "multipart/form-data"
1130
+ ],
1100
1131
  "description": "Get fast withdraw info"
1101
1132
  }
1102
1133
  },
@@ -2433,6 +2464,12 @@
2433
2464
  "type": "integer",
2434
2465
  "format": "int64"
2435
2466
  },
2467
+ {
2468
+ "name": "auth",
2469
+ "in": "query",
2470
+ "required": true,
2471
+ "type": "string"
2472
+ },
2436
2473
  {
2437
2474
  "name": "cursor",
2438
2475
  "in": "query",
@@ -5872,6 +5909,13 @@
5872
5909
  "ReqGetDepositHistory": {
5873
5910
  "type": "object",
5874
5911
  "properties": {
5912
+ "account_index": {
5913
+ "type": "integer",
5914
+ "format": "int64"
5915
+ },
5916
+ "auth": {
5917
+ "type": "string"
5918
+ },
5875
5919
  "l1_address": {
5876
5920
  "type": "string"
5877
5921
  },
@@ -5889,6 +5933,8 @@
5889
5933
  },
5890
5934
  "title": "ReqGetDepositHistory",
5891
5935
  "required": [
5936
+ "account_index",
5937
+ "auth",
5892
5938
  "l1_address"
5893
5939
  ]
5894
5940
  },
@@ -5896,6 +5942,23 @@
5896
5942
  "type": "object",
5897
5943
  "title": "ReqGetExchangeStats"
5898
5944
  },
5945
+ "ReqGetFastWithdrawInfo": {
5946
+ "type": "object",
5947
+ "properties": {
5948
+ "account_index": {
5949
+ "type": "integer",
5950
+ "format": "int64"
5951
+ },
5952
+ "auth": {
5953
+ "type": "string"
5954
+ }
5955
+ },
5956
+ "title": "ReqGetFastWithdrawInfo",
5957
+ "required": [
5958
+ "account_index",
5959
+ "auth"
5960
+ ]
5961
+ },
5899
5962
  "ReqGetFeeBucket": {
5900
5963
  "type": "object",
5901
5964
  "properties": {
@@ -6320,6 +6383,9 @@
6320
6383
  "type": "integer",
6321
6384
  "format": "int64"
6322
6385
  },
6386
+ "auth": {
6387
+ "type": "string"
6388
+ },
6323
6389
  "cursor": {
6324
6390
  "type": "string"
6325
6391
  },
@@ -6334,7 +6400,8 @@
6334
6400
  },
6335
6401
  "title": "ReqGetWithdrawHistory",
6336
6402
  "required": [
6337
- "account_index"
6403
+ "account_index",
6404
+ "auth"
6338
6405
  ]
6339
6406
  },
6340
6407
  "ReqIsWhitelisted": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.111",
3
+ "version": "1.0.112",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {