zklighter-perps 1.0.143 → 1.0.144
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.
- package/.openapi-generator/FILES +2 -0
- package/apis/InfoApi.ts +54 -0
- package/models/ReqGetTransferFeeInfo.ts +76 -0
- package/models/TransferFeeInfo.ts +78 -0
- package/models/index.ts +2 -0
- package/openapi.json +98 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,76 @@
|
|
|
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 ReqGetTransferFeeInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetTransferFeeInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetTransferFeeInfo
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetTransferFeeInfo
|
|
32
|
+
*/
|
|
33
|
+
account_index?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqGetTransferFeeInfo
|
|
38
|
+
*/
|
|
39
|
+
to_account_index?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ReqGetTransferFeeInfo interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfReqGetTransferFeeInfo(value: object): value is ReqGetTransferFeeInfo {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ReqGetTransferFeeInfoFromJSON(json: any): ReqGetTransferFeeInfo {
|
|
50
|
+
return ReqGetTransferFeeInfoFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ReqGetTransferFeeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetTransferFeeInfo {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
60
|
+
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
61
|
+
'to_account_index': json['to_account_index'] == null ? undefined : json['to_account_index'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ReqGetTransferFeeInfoToJSON(value?: ReqGetTransferFeeInfo | null): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'auth': value['auth'],
|
|
72
|
+
'account_index': value['account_index'],
|
|
73
|
+
'to_account_index': value['to_account_index'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
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 TransferFeeInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface TransferFeeInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof TransferFeeInfo
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof TransferFeeInfo
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof TransferFeeInfo
|
|
38
|
+
*/
|
|
39
|
+
transfer_fee_usdc: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the TransferFeeInfo interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfTransferFeeInfo(value: object): value is TransferFeeInfo {
|
|
46
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
47
|
+
if (!('transfer_fee_usdc' in value) || value['transfer_fee_usdc'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function TransferFeeInfoFromJSON(json: any): TransferFeeInfo {
|
|
52
|
+
return TransferFeeInfoFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function TransferFeeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransferFeeInfo {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'code': json['code'],
|
|
62
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
63
|
+
'transfer_fee_usdc': json['transfer_fee_usdc'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function TransferFeeInfoToJSON(value?: TransferFeeInfo | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'code': value['code'],
|
|
74
|
+
'message': value['message'],
|
|
75
|
+
'transfer_fee_usdc': value['transfer_fee_usdc'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
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",
|
|
@@ -7078,6 +7135,25 @@
|
|
|
7078
7135
|
"limit"
|
|
7079
7136
|
]
|
|
7080
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
|
+
},
|
|
7081
7157
|
"ReqGetTransferHistory": {
|
|
7082
7158
|
"type": "object",
|
|
7083
7159
|
"properties": {
|
|
@@ -7757,6 +7833,28 @@
|
|
|
7757
7833
|
"trades"
|
|
7758
7834
|
]
|
|
7759
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": "int32"
|
|
7850
|
+
}
|
|
7851
|
+
},
|
|
7852
|
+
"title": "TransferFeeInfo",
|
|
7853
|
+
"required": [
|
|
7854
|
+
"code",
|
|
7855
|
+
"transfer_fee_usdc"
|
|
7856
|
+
]
|
|
7857
|
+
},
|
|
7760
7858
|
"TransferHistory": {
|
|
7761
7859
|
"type": "object",
|
|
7762
7860
|
"properties": {
|