zklighter-perps 1.0.145 → 1.0.146

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.
@@ -119,6 +119,7 @@ models/ReqGetRecentTrades.ts
119
119
  models/ReqGetReferralCode.ts
120
120
  models/ReqGetReferralPoints.ts
121
121
  models/ReqGetTrades.ts
122
+ models/ReqGetTransferFeeInfo.ts
122
123
  models/ReqGetTransferHistory.ts
123
124
  models/ReqGetTx.ts
124
125
  models/ReqGetWithdrawHistory.ts
@@ -138,6 +139,7 @@ models/SubAccounts.ts
138
139
  models/Ticker.ts
139
140
  models/Trade.ts
140
141
  models/Trades.ts
142
+ models/TransferFeeInfo.ts
141
143
  models/TransferHistory.ts
142
144
  models/TransferHistoryItem.ts
143
145
  models/Tx.ts
package/apis/InfoApi.ts CHANGED
@@ -18,6 +18,7 @@ import type {
18
18
  Layer1BasicInfo,
19
19
  RespWithdrawalDelay,
20
20
  ResultCode,
21
+ TransferFeeInfo,
21
22
  } from '../models/index';
22
23
  import {
23
24
  Layer1BasicInfoFromJSON,
@@ -26,8 +27,17 @@ import {
26
27
  RespWithdrawalDelayToJSON,
27
28
  ResultCodeFromJSON,
28
29
  ResultCodeToJSON,
30
+ TransferFeeInfoFromJSON,
31
+ TransferFeeInfoToJSON,
29
32
  } from '../models/index';
30
33
 
34
+ export interface TransferFeeInfoRequest {
35
+ authorization?: string;
36
+ auth?: string;
37
+ account_index?: number;
38
+ to_account_index?: number;
39
+ }
40
+
31
41
  /**
32
42
  *
33
43
  */
@@ -61,6 +71,50 @@ export class InfoApi extends runtime.BaseAPI {
61
71
  return await response.value();
62
72
  }
63
73
 
74
+ /**
75
+ * Transfer fee info
76
+ * transferFeeInfo
77
+ */
78
+ async transferFeeInfoRaw(requestParameters: TransferFeeInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransferFeeInfo>> {
79
+ const queryParameters: any = {};
80
+
81
+ if (requestParameters['auth'] != null) {
82
+ queryParameters['auth'] = requestParameters['auth'];
83
+ }
84
+
85
+ if (requestParameters['account_index'] != null) {
86
+ queryParameters['account_index'] = requestParameters['account_index'];
87
+ }
88
+
89
+ if (requestParameters['to_account_index'] != null) {
90
+ queryParameters['to_account_index'] = requestParameters['to_account_index'];
91
+ }
92
+
93
+ const headerParameters: runtime.HTTPHeaders = {};
94
+
95
+ if (requestParameters['authorization'] != null) {
96
+ headerParameters['authorization'] = String(requestParameters['authorization']);
97
+ }
98
+
99
+ const response = await this.request({
100
+ path: `/api/v1/transferFeeInfo`,
101
+ method: 'GET',
102
+ headers: headerParameters,
103
+ query: queryParameters,
104
+ }, initOverrides);
105
+
106
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransferFeeInfoFromJSON(jsonValue));
107
+ }
108
+
109
+ /**
110
+ * Transfer fee info
111
+ * transferFeeInfo
112
+ */
113
+ async transferFeeInfo(requestParameters: TransferFeeInfoRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransferFeeInfo> {
114
+ const response = await this.transferFeeInfoRaw(requestParameters, initOverrides);
115
+ return await response.value();
116
+ }
117
+
64
118
  /**
65
119
  * Withdrawal delay in seconds
66
120
  * withdrawalDelay
package/models/Account.ts CHANGED
@@ -85,12 +85,6 @@ export interface Account {
85
85
  * @memberof Account
86
86
  */
87
87
  collateral: string;
88
- /**
89
- *
90
- * @type {string}
91
- * @memberof Account
92
- */
93
- referral_code: string;
94
88
  }
95
89
 
96
90
  /**
@@ -107,7 +101,6 @@ export function instanceOfAccount(value: object): value is Account {
107
101
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
108
102
  if (!('status' in value) || value['status'] === undefined) return false;
109
103
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
110
- if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
111
104
  return true;
112
105
  }
113
106
 
@@ -132,7 +125,6 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
132
125
  'pending_order_count': json['pending_order_count'],
133
126
  'status': json['status'],
134
127
  'collateral': json['collateral'],
135
- 'referral_code': json['referral_code'],
136
128
  };
137
129
  }
138
130
 
@@ -153,7 +145,6 @@ export function AccountToJSON(value?: Account | null): any {
153
145
  'pending_order_count': value['pending_order_count'],
154
146
  'status': value['status'],
155
147
  'collateral': value['collateral'],
156
- 'referral_code': value['referral_code'],
157
148
  };
158
149
  }
159
150
 
@@ -104,12 +104,6 @@ export interface DetailedAccount {
104
104
  * @memberof DetailedAccount
105
105
  */
106
106
  collateral: string;
107
- /**
108
- *
109
- * @type {string}
110
- * @memberof DetailedAccount
111
- */
112
- referral_code: string;
113
107
  /**
114
108
  *
115
109
  * @type {number}
@@ -186,7 +180,6 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
186
180
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
187
181
  if (!('status' in value) || value['status'] === undefined) return false;
188
182
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
189
- if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
190
183
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
191
184
  if (!('name' in value) || value['name'] === undefined) return false;
192
185
  if (!('description' in value) || value['description'] === undefined) return false;
@@ -221,7 +214,6 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
221
214
  'pending_order_count': json['pending_order_count'],
222
215
  'status': json['status'],
223
216
  'collateral': json['collateral'],
224
- 'referral_code': json['referral_code'],
225
217
  'account_index': json['account_index'],
226
218
  'name': json['name'],
227
219
  'description': json['description'],
@@ -252,7 +244,6 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
252
244
  'pending_order_count': value['pending_order_count'],
253
245
  'status': value['status'],
254
246
  'collateral': value['collateral'],
255
- 'referral_code': value['referral_code'],
256
247
  'account_index': value['account_index'],
257
248
  'name': value['name'],
258
249
  'description': value['description'],
@@ -98,12 +98,6 @@ export interface PublicPool {
98
98
  * @memberof PublicPool
99
99
  */
100
100
  collateral: string;
101
- /**
102
- *
103
- * @type {string}
104
- * @memberof PublicPool
105
- */
106
- referral_code: string;
107
101
  /**
108
102
  *
109
103
  * @type {number}
@@ -174,7 +168,6 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
174
168
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
175
169
  if (!('status' in value) || value['status'] === undefined) return false;
176
170
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
177
- if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
178
171
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
179
172
  if (!('name' in value) || value['name'] === undefined) return false;
180
173
  if (!('description' in value) || value['description'] === undefined) return false;
@@ -207,7 +200,6 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
207
200
  'pending_order_count': json['pending_order_count'],
208
201
  'status': json['status'],
209
202
  'collateral': json['collateral'],
210
- 'referral_code': json['referral_code'],
211
203
  'account_index': json['account_index'],
212
204
  'name': json['name'],
213
205
  'description': json['description'],
@@ -237,7 +229,6 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
237
229
  'pending_order_count': value['pending_order_count'],
238
230
  'status': value['status'],
239
231
  'collateral': value['collateral'],
240
- 'referral_code': value['referral_code'],
241
232
  'account_index': value['account_index'],
242
233
  'name': value['name'],
243
234
  'description': value['description'],
package/models/index.ts CHANGED
@@ -107,6 +107,7 @@ export * from './ReqGetRecentTrades';
107
107
  export * from './ReqGetReferralCode';
108
108
  export * from './ReqGetReferralPoints';
109
109
  export * from './ReqGetTrades';
110
+ export * from './ReqGetTransferFeeInfo';
110
111
  export * from './ReqGetTransferHistory';
111
112
  export * from './ReqGetTx';
112
113
  export * from './ReqGetWithdrawHistory';
@@ -126,6 +127,7 @@ export * from './SubAccounts';
126
127
  export * from './Ticker';
127
128
  export * from './Trade';
128
129
  export * from './Trades';
130
+ export * from './TransferFeeInfo';
129
131
  export * from './TransferHistory';
130
132
  export * from './TransferHistoryItem';
131
133
  export * from './Tx';
package/openapi.json CHANGED
@@ -2678,6 +2678,63 @@
2678
2678
  "description": "Get transfer history"
2679
2679
  }
2680
2680
  },
2681
+ "/api/v1/transferFeeInfo": {
2682
+ "get": {
2683
+ "summary": "transferFeeInfo",
2684
+ "operationId": "transferFeeInfo",
2685
+ "responses": {
2686
+ "200": {
2687
+ "description": "A successful response.",
2688
+ "schema": {
2689
+ "$ref": "#/definitions/TransferFeeInfo"
2690
+ }
2691
+ },
2692
+ "400": {
2693
+ "description": "Bad request",
2694
+ "schema": {
2695
+ "$ref": "#/definitions/ResultCode"
2696
+ }
2697
+ }
2698
+ },
2699
+ "parameters": [
2700
+ {
2701
+ "name": "authorization",
2702
+ "in": "header",
2703
+ "required": false,
2704
+ "type": "string"
2705
+ },
2706
+ {
2707
+ "name": "auth",
2708
+ "in": "query",
2709
+ "required": false,
2710
+ "type": "string"
2711
+ },
2712
+ {
2713
+ "name": "account_index",
2714
+ "in": "query",
2715
+ "required": false,
2716
+ "type": "integer",
2717
+ "format": "int64",
2718
+ "default": "-1"
2719
+ },
2720
+ {
2721
+ "name": "to_account_index",
2722
+ "in": "query",
2723
+ "required": false,
2724
+ "type": "integer",
2725
+ "format": "int64",
2726
+ "default": "-1"
2727
+ }
2728
+ ],
2729
+ "tags": [
2730
+ "info"
2731
+ ],
2732
+ "consumes": [
2733
+ "multipart/form-data"
2734
+ ],
2735
+ "description": "Transfer fee info"
2736
+ }
2737
+ },
2681
2738
  "/api/v1/tx": {
2682
2739
  "get": {
2683
2740
  "summary": "tx",
@@ -2973,10 +3030,6 @@
2973
3030
  "collateral": {
2974
3031
  "type": "string",
2975
3032
  "example": "46342"
2976
- },
2977
- "referral_code": {
2978
- "type": "string",
2979
- "example": "ABC123"
2980
3033
  }
2981
3034
  },
2982
3035
  "title": "Account",
@@ -2990,8 +3043,7 @@
2990
3043
  "total_isolated_order_count",
2991
3044
  "pending_order_count",
2992
3045
  "status",
2993
- "collateral",
2994
- "referral_code"
3046
+ "collateral"
2995
3047
  ]
2996
3048
  },
2997
3049
  "AccountApiKeys": {
@@ -4043,10 +4095,6 @@
4043
4095
  "type": "string",
4044
4096
  "example": "46342"
4045
4097
  },
4046
- "referral_code": {
4047
- "type": "string",
4048
- "example": "ABC123"
4049
- },
4050
4098
  "account_index": {
4051
4099
  "type": "integer",
4052
4100
  "format": "int64"
@@ -4102,7 +4150,6 @@
4102
4150
  "pending_order_count",
4103
4151
  "status",
4104
4152
  "collateral",
4105
- "referral_code",
4106
4153
  "account_index",
4107
4154
  "name",
4108
4155
  "description",
@@ -5768,10 +5815,6 @@
5768
5815
  "type": "string",
5769
5816
  "example": "46342"
5770
5817
  },
5771
- "referral_code": {
5772
- "type": "string",
5773
- "example": "ABC123"
5774
- },
5775
5818
  "account_index": {
5776
5819
  "type": "integer",
5777
5820
  "format": "int64"
@@ -5818,7 +5861,6 @@
5818
5861
  "pending_order_count",
5819
5862
  "status",
5820
5863
  "collateral",
5821
- "referral_code",
5822
5864
  "account_index",
5823
5865
  "name",
5824
5866
  "description",
@@ -7093,6 +7135,25 @@
7093
7135
  "limit"
7094
7136
  ]
7095
7137
  },
7138
+ "ReqGetTransferFeeInfo": {
7139
+ "type": "object",
7140
+ "properties": {
7141
+ "auth": {
7142
+ "type": "string"
7143
+ },
7144
+ "account_index": {
7145
+ "type": "integer",
7146
+ "format": "int64",
7147
+ "default": "-1"
7148
+ },
7149
+ "to_account_index": {
7150
+ "type": "integer",
7151
+ "format": "int64",
7152
+ "default": "-1"
7153
+ }
7154
+ },
7155
+ "title": "ReqGetTransferFeeInfo"
7156
+ },
7096
7157
  "ReqGetTransferHistory": {
7097
7158
  "type": "object",
7098
7159
  "properties": {
@@ -7772,6 +7833,28 @@
7772
7833
  "trades"
7773
7834
  ]
7774
7835
  },
7836
+ "TransferFeeInfo": {
7837
+ "type": "object",
7838
+ "properties": {
7839
+ "code": {
7840
+ "type": "integer",
7841
+ "format": "int32",
7842
+ "example": "200"
7843
+ },
7844
+ "message": {
7845
+ "type": "string"
7846
+ },
7847
+ "transfer_fee_usdc": {
7848
+ "type": "integer",
7849
+ "format": "int64"
7850
+ }
7851
+ },
7852
+ "title": "TransferFeeInfo",
7853
+ "required": [
7854
+ "code",
7855
+ "transfer_fee_usdc"
7856
+ ]
7857
+ },
7775
7858
  "TransferHistory": {
7776
7859
  "type": "object",
7777
7860
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.145",
3
+ "version": "1.0.146",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {