zklighter-perps 1.0.80 → 1.0.82

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.
@@ -111,6 +111,7 @@ models/TxHashes.ts
111
111
  models/Txs.ts
112
112
  models/ValidatorInfo.ts
113
113
  models/WithdrawHistory.ts
114
+ models/WithdrawHistoryCursor.ts
114
115
  models/WithdrawHistoryItem.ts
115
116
  models/ZkLighterInfo.ts
116
117
  models/index.ts
@@ -63,7 +63,7 @@ export interface BlockTxsRequest {
63
63
  }
64
64
 
65
65
  export interface DepositHistoryRequest {
66
- account_index: number;
66
+ l1_address: string;
67
67
  cursor?: string;
68
68
  filter?: DepositHistoryFilterEnum;
69
69
  }
@@ -300,17 +300,17 @@ export class TransactionApi extends runtime.BaseAPI {
300
300
  * deposit_history
301
301
  */
302
302
  async depositHistoryRaw(requestParameters: DepositHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositHistory>> {
303
- if (requestParameters['account_index'] == null) {
303
+ if (requestParameters['l1_address'] == null) {
304
304
  throw new runtime.RequiredError(
305
- 'account_index',
306
- 'Required parameter "account_index" was null or undefined when calling depositHistory().'
305
+ 'l1_address',
306
+ 'Required parameter "l1_address" was null or undefined when calling depositHistory().'
307
307
  );
308
308
  }
309
309
 
310
310
  const queryParameters: any = {};
311
311
 
312
- if (requestParameters['account_index'] != null) {
313
- queryParameters['account_index'] = requestParameters['account_index'];
312
+ if (requestParameters['l1_address'] != null) {
313
+ queryParameters['l1_address'] = requestParameters['l1_address'];
314
314
  }
315
315
 
316
316
  if (requestParameters['cursor'] != null) {
@@ -21,10 +21,10 @@ import { mapValues } from '../runtime';
21
21
  export interface ReqGetDepositHistory {
22
22
  /**
23
23
  *
24
- * @type {number}
24
+ * @type {string}
25
25
  * @memberof ReqGetDepositHistory
26
26
  */
27
- account_index: number;
27
+ l1_address: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -55,7 +55,7 @@ export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEn
55
55
  * Check if a given object implements the ReqGetDepositHistory interface.
56
56
  */
57
57
  export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
58
- if (!('account_index' in value) || value['account_index'] === undefined) return false;
58
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
59
59
  return true;
60
60
  }
61
61
 
@@ -69,7 +69,7 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
69
69
  }
70
70
  return {
71
71
 
72
- 'account_index': json['account_index'],
72
+ 'l1_address': json['l1_address'],
73
73
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
74
74
  'filter': json['filter'] == null ? undefined : json['filter'],
75
75
  };
@@ -81,7 +81,7 @@ export function ReqGetDepositHistoryToJSON(value?: ReqGetDepositHistory | null):
81
81
  }
82
82
  return {
83
83
 
84
- 'account_index': value['account_index'],
84
+ 'l1_address': value['l1_address'],
85
85
  'cursor': value['cursor'],
86
86
  'filter': value['filter'],
87
87
  };
@@ -19,6 +19,12 @@ import {
19
19
  WithdrawHistoryItemFromJSONTyped,
20
20
  WithdrawHistoryItemToJSON,
21
21
  } from './WithdrawHistoryItem';
22
+ import type { WithdrawHistoryCursor } from './WithdrawHistoryCursor';
23
+ import {
24
+ WithdrawHistoryCursorFromJSON,
25
+ WithdrawHistoryCursorFromJSONTyped,
26
+ WithdrawHistoryCursorToJSON,
27
+ } from './WithdrawHistoryCursor';
22
28
 
23
29
  /**
24
30
  *
@@ -46,10 +52,10 @@ export interface WithdrawHistory {
46
52
  withdraws: Array<WithdrawHistoryItem>;
47
53
  /**
48
54
  *
49
- * @type {string}
55
+ * @type {WithdrawHistoryCursor}
50
56
  * @memberof WithdrawHistory
51
57
  */
52
- cursor: string;
58
+ cursor: WithdrawHistoryCursor;
53
59
  }
54
60
 
55
61
  /**
@@ -75,7 +81,7 @@ export function WithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminator: boo
75
81
  'code': json['code'],
76
82
  'message': json['message'] == null ? undefined : json['message'],
77
83
  'withdraws': ((json['withdraws'] as Array<any>).map(WithdrawHistoryItemFromJSON)),
78
- 'cursor': json['cursor'],
84
+ 'cursor': WithdrawHistoryCursorFromJSON(json['cursor']),
79
85
  };
80
86
  }
81
87
 
@@ -88,7 +94,7 @@ export function WithdrawHistoryToJSON(value?: WithdrawHistory | null): any {
88
94
  'code': value['code'],
89
95
  'message': value['message'],
90
96
  'withdraws': ((value['withdraws'] as Array<any>).map(WithdrawHistoryItemToJSON)),
91
- 'cursor': value['cursor'],
97
+ 'cursor': WithdrawHistoryCursorToJSON(value['cursor']),
92
98
  };
93
99
  }
94
100
 
@@ -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 WithdrawHistoryCursor
20
+ */
21
+ export interface WithdrawHistoryCursor {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof WithdrawHistoryCursor
26
+ */
27
+ secure_id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof WithdrawHistoryCursor
32
+ */
33
+ fast_id: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the WithdrawHistoryCursor interface.
38
+ */
39
+ export function instanceOfWithdrawHistoryCursor(value: object): value is WithdrawHistoryCursor {
40
+ if (!('secure_id' in value) || value['secure_id'] === undefined) return false;
41
+ if (!('fast_id' in value) || value['fast_id'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function WithdrawHistoryCursorFromJSON(json: any): WithdrawHistoryCursor {
46
+ return WithdrawHistoryCursorFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function WithdrawHistoryCursorFromJSONTyped(json: any, ignoreDiscriminator: boolean): WithdrawHistoryCursor {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'secure_id': json['secure_id'],
56
+ 'fast_id': json['fast_id'],
57
+ };
58
+ }
59
+
60
+ export function WithdrawHistoryCursorToJSON(value?: WithdrawHistoryCursor | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'secure_id': value['secure_id'],
67
+ 'fast_id': value['fast_id'],
68
+ };
69
+ }
70
+
package/models/index.ts CHANGED
@@ -102,5 +102,6 @@ export * from './TxHashes';
102
102
  export * from './Txs';
103
103
  export * from './ValidatorInfo';
104
104
  export * from './WithdrawHistory';
105
+ export * from './WithdrawHistoryCursor';
105
106
  export * from './WithdrawHistoryItem';
106
107
  export * from './ZkLighterInfo';
package/openapi.json CHANGED
@@ -860,11 +860,10 @@
860
860
  },
861
861
  "parameters": [
862
862
  {
863
- "name": "account_index",
863
+ "name": "l1_address",
864
864
  "in": "query",
865
865
  "required": true,
866
- "type": "integer",
867
- "format": "int64"
866
+ "type": "string"
868
867
  },
869
868
  {
870
869
  "name": "cursor",
@@ -4990,9 +4989,8 @@
4990
4989
  "ReqGetDepositHistory": {
4991
4990
  "type": "object",
4992
4991
  "properties": {
4993
- "account_index": {
4994
- "type": "integer",
4995
- "format": "int64"
4992
+ "l1_address": {
4993
+ "type": "string"
4996
4994
  },
4997
4995
  "cursor": {
4998
4996
  "type": "string"
@@ -5008,7 +5006,7 @@
5008
5006
  },
5009
5007
  "title": "ReqGetDepositHistory",
5010
5008
  "required": [
5011
- "account_index"
5009
+ "l1_address"
5012
5010
  ]
5013
5011
  },
5014
5012
  "ReqGetExchangeStats": {
@@ -5973,7 +5971,7 @@
5973
5971
  }
5974
5972
  },
5975
5973
  "cursor": {
5976
- "type": "string"
5974
+ "$ref": "#/definitions/WithdrawHistoryCursor"
5977
5975
  }
5978
5976
  },
5979
5977
  "title": "WithdrawHistory",
@@ -5983,6 +5981,24 @@
5983
5981
  "cursor"
5984
5982
  ]
5985
5983
  },
5984
+ "WithdrawHistoryCursor": {
5985
+ "type": "object",
5986
+ "properties": {
5987
+ "secure_id": {
5988
+ "type": "string",
5989
+ "example": "1"
5990
+ },
5991
+ "fast_id": {
5992
+ "type": "string",
5993
+ "example": "1"
5994
+ }
5995
+ },
5996
+ "title": "WithdrawHistoryCursor",
5997
+ "required": [
5998
+ "secure_id",
5999
+ "fast_id"
6000
+ ]
6001
+ },
5986
6002
  "WithdrawHistoryItem": {
5987
6003
  "type": "object",
5988
6004
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {