zklighter-perps 1.0.135 → 1.0.137
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 +1 -0
- package/apis/InfoApi.ts +31 -0
- package/models/RespWithdrawalDelay.ts +61 -0
- package/models/TransferHistoryItem.ts +27 -0
- package/models/index.ts +1 -0
- package/openapi.json +56 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/InfoApi.ts
CHANGED
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Layer1BasicInfo,
|
|
19
|
+
RespWithdrawalDelay,
|
|
19
20
|
ResultCode,
|
|
20
21
|
} from '../models/index';
|
|
21
22
|
import {
|
|
22
23
|
Layer1BasicInfoFromJSON,
|
|
23
24
|
Layer1BasicInfoToJSON,
|
|
25
|
+
RespWithdrawalDelayFromJSON,
|
|
26
|
+
RespWithdrawalDelayToJSON,
|
|
24
27
|
ResultCodeFromJSON,
|
|
25
28
|
ResultCodeToJSON,
|
|
26
29
|
} from '../models/index';
|
|
@@ -58,4 +61,32 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
58
61
|
return await response.value();
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Withdrawal delay in seconds
|
|
66
|
+
* withdrawalDelay
|
|
67
|
+
*/
|
|
68
|
+
async withdrawalDelayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespWithdrawalDelay>> {
|
|
69
|
+
const queryParameters: any = {};
|
|
70
|
+
|
|
71
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
72
|
+
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/api/v1/withdrawalDelay`,
|
|
75
|
+
method: 'GET',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
}, initOverrides);
|
|
79
|
+
|
|
80
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespWithdrawalDelayFromJSON(jsonValue));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Withdrawal delay in seconds
|
|
85
|
+
* withdrawalDelay
|
|
86
|
+
*/
|
|
87
|
+
async withdrawalDelay(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespWithdrawalDelay> {
|
|
88
|
+
const response = await this.withdrawalDelayRaw(initOverrides);
|
|
89
|
+
return await response.value();
|
|
90
|
+
}
|
|
91
|
+
|
|
61
92
|
}
|
|
@@ -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 RespWithdrawalDelay
|
|
20
|
+
*/
|
|
21
|
+
export interface RespWithdrawalDelay {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespWithdrawalDelay
|
|
26
|
+
*/
|
|
27
|
+
seconds: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the RespWithdrawalDelay interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfRespWithdrawalDelay(value: object): value is RespWithdrawalDelay {
|
|
34
|
+
if (!('seconds' in value) || value['seconds'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function RespWithdrawalDelayFromJSON(json: any): RespWithdrawalDelay {
|
|
39
|
+
return RespWithdrawalDelayFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function RespWithdrawalDelayFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespWithdrawalDelay {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'seconds': json['seconds'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function RespWithdrawalDelayToJSON(value?: RespWithdrawalDelay | null): any {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
|
|
58
|
+
'seconds': value['seconds'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
@@ -43,6 +43,24 @@ export interface TransferHistoryItem {
|
|
|
43
43
|
* @memberof TransferHistoryItem
|
|
44
44
|
*/
|
|
45
45
|
type: TransferHistoryItemTypeEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof TransferHistoryItem
|
|
50
|
+
*/
|
|
51
|
+
from_account_index: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof TransferHistoryItem
|
|
56
|
+
*/
|
|
57
|
+
to_account_index: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof TransferHistoryItem
|
|
62
|
+
*/
|
|
63
|
+
tx_hash: string;
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
|
|
@@ -64,6 +82,9 @@ export function instanceOfTransferHistoryItem(value: object): value is TransferH
|
|
|
64
82
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
65
83
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
66
84
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
85
|
+
if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false;
|
|
86
|
+
if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false;
|
|
87
|
+
if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
|
|
67
88
|
return true;
|
|
68
89
|
}
|
|
69
90
|
|
|
@@ -81,6 +102,9 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
81
102
|
'amount': json['amount'],
|
|
82
103
|
'timestamp': json['timestamp'],
|
|
83
104
|
'type': json['type'],
|
|
105
|
+
'from_account_index': json['from_account_index'],
|
|
106
|
+
'to_account_index': json['to_account_index'],
|
|
107
|
+
'tx_hash': json['tx_hash'],
|
|
84
108
|
};
|
|
85
109
|
}
|
|
86
110
|
|
|
@@ -94,6 +118,9 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
|
|
|
94
118
|
'amount': value['amount'],
|
|
95
119
|
'timestamp': value['timestamp'],
|
|
96
120
|
'type': value['type'],
|
|
121
|
+
'from_account_index': value['from_account_index'],
|
|
122
|
+
'to_account_index': value['to_account_index'],
|
|
123
|
+
'tx_hash': value['tx_hash'],
|
|
97
124
|
};
|
|
98
125
|
}
|
|
99
126
|
|
package/models/index.ts
CHANGED
|
@@ -114,6 +114,7 @@ export * from './ReqIsWhitelisted';
|
|
|
114
114
|
export * from './RespChangeAccountTier';
|
|
115
115
|
export * from './RespGetFastBridgeInfo';
|
|
116
116
|
export * from './RespGetFastwithdrawalInfo';
|
|
117
|
+
export * from './RespWithdrawalDelay';
|
|
117
118
|
export * from './ResultCode';
|
|
118
119
|
export * from './RiskInfo';
|
|
119
120
|
export * from './RiskParameters';
|
package/openapi.json
CHANGED
|
@@ -2869,6 +2869,30 @@
|
|
|
2869
2869
|
"description": "Get withdraw history"
|
|
2870
2870
|
}
|
|
2871
2871
|
},
|
|
2872
|
+
"/api/v1/withdrawalDelay": {
|
|
2873
|
+
"get": {
|
|
2874
|
+
"summary": "withdrawalDelay",
|
|
2875
|
+
"operationId": "withdrawalDelay",
|
|
2876
|
+
"responses": {
|
|
2877
|
+
"200": {
|
|
2878
|
+
"description": "A successful response.",
|
|
2879
|
+
"schema": {
|
|
2880
|
+
"$ref": "#/definitions/RespWithdrawalDelay"
|
|
2881
|
+
}
|
|
2882
|
+
},
|
|
2883
|
+
"400": {
|
|
2884
|
+
"description": "Bad request",
|
|
2885
|
+
"schema": {
|
|
2886
|
+
"$ref": "#/definitions/ResultCode"
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
"tags": [
|
|
2891
|
+
"info"
|
|
2892
|
+
],
|
|
2893
|
+
"description": "Withdrawal delay in seconds"
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2872
2896
|
"/info": {
|
|
2873
2897
|
"get": {
|
|
2874
2898
|
"summary": "info",
|
|
@@ -7288,6 +7312,20 @@
|
|
|
7288
7312
|
"max_withdrawal_amount"
|
|
7289
7313
|
]
|
|
7290
7314
|
},
|
|
7315
|
+
"RespWithdrawalDelay": {
|
|
7316
|
+
"type": "object",
|
|
7317
|
+
"properties": {
|
|
7318
|
+
"seconds": {
|
|
7319
|
+
"type": "integer",
|
|
7320
|
+
"format": "int64",
|
|
7321
|
+
"example": "86400"
|
|
7322
|
+
}
|
|
7323
|
+
},
|
|
7324
|
+
"title": "RespWithdrawalDelay",
|
|
7325
|
+
"required": [
|
|
7326
|
+
"seconds"
|
|
7327
|
+
]
|
|
7328
|
+
},
|
|
7291
7329
|
"ResultCode": {
|
|
7292
7330
|
"type": "object",
|
|
7293
7331
|
"properties": {
|
|
@@ -7704,6 +7742,20 @@
|
|
|
7704
7742
|
"l2_transfer_inflow",
|
|
7705
7743
|
"l2_transfer_outflow"
|
|
7706
7744
|
]
|
|
7745
|
+
},
|
|
7746
|
+
"from_account_index": {
|
|
7747
|
+
"type": "integer",
|
|
7748
|
+
"format": "int64",
|
|
7749
|
+
"example": "1"
|
|
7750
|
+
},
|
|
7751
|
+
"to_account_index": {
|
|
7752
|
+
"type": "integer",
|
|
7753
|
+
"format": "int64",
|
|
7754
|
+
"example": "1"
|
|
7755
|
+
},
|
|
7756
|
+
"tx_hash": {
|
|
7757
|
+
"type": "string",
|
|
7758
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
7707
7759
|
}
|
|
7708
7760
|
},
|
|
7709
7761
|
"title": "TransferHistoryItem",
|
|
@@ -7711,7 +7763,10 @@
|
|
|
7711
7763
|
"id",
|
|
7712
7764
|
"amount",
|
|
7713
7765
|
"timestamp",
|
|
7714
|
-
"type"
|
|
7766
|
+
"type",
|
|
7767
|
+
"from_account_index",
|
|
7768
|
+
"to_account_index",
|
|
7769
|
+
"tx_hash"
|
|
7715
7770
|
]
|
|
7716
7771
|
},
|
|
7717
7772
|
"Tx": {
|