zklighter-perps 1.0.199 → 1.0.200
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/PendingUnlock.ts +12 -12
- package/models/SystemConfig.ts +105 -0
- package/models/index.ts +1 -0
- package/openapi.json +72 -7
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/InfoApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
Layer1BasicInfo,
|
|
19
19
|
RespWithdrawalDelay,
|
|
20
20
|
ResultCode,
|
|
21
|
+
SystemConfig,
|
|
21
22
|
TransferFeeInfo,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
@@ -27,6 +28,8 @@ import {
|
|
|
27
28
|
RespWithdrawalDelayToJSON,
|
|
28
29
|
ResultCodeFromJSON,
|
|
29
30
|
ResultCodeToJSON,
|
|
31
|
+
SystemConfigFromJSON,
|
|
32
|
+
SystemConfigToJSON,
|
|
30
33
|
TransferFeeInfoFromJSON,
|
|
31
34
|
TransferFeeInfoToJSON,
|
|
32
35
|
} from '../models/index';
|
|
@@ -71,6 +74,34 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
71
74
|
return await response.value();
|
|
72
75
|
}
|
|
73
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Get system configuration including pool indexes and lockup/cooldown periods
|
|
79
|
+
* systemConfig
|
|
80
|
+
*/
|
|
81
|
+
async systemConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemConfig>> {
|
|
82
|
+
const queryParameters: any = {};
|
|
83
|
+
|
|
84
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
85
|
+
|
|
86
|
+
const response = await this.request({
|
|
87
|
+
path: `/api/v1/systemConfig`,
|
|
88
|
+
method: 'GET',
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
|
|
93
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigFromJSON(jsonValue));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Get system configuration including pool indexes and lockup/cooldown periods
|
|
98
|
+
* systemConfig
|
|
99
|
+
*/
|
|
100
|
+
async systemConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemConfig> {
|
|
101
|
+
const response = await this.systemConfigRaw(initOverrides);
|
|
102
|
+
return await response.value();
|
|
103
|
+
}
|
|
104
|
+
|
|
74
105
|
/**
|
|
75
106
|
* Transfer fee info
|
|
76
107
|
* transferFeeInfo
|
package/models/PendingUnlock.ts
CHANGED
|
@@ -24,28 +24,28 @@ export interface PendingUnlock {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof PendingUnlock
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
unlock_timestamp: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof PendingUnlock
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
asset_index: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof PendingUnlock
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
amount: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Check if a given object implements the PendingUnlock interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfPendingUnlock(value: object): value is PendingUnlock {
|
|
46
|
-
if (!('
|
|
47
|
-
if (!('
|
|
48
|
-
if (!('
|
|
46
|
+
if (!('unlock_timestamp' in value) || value['unlock_timestamp'] === undefined) return false;
|
|
47
|
+
if (!('asset_index' in value) || value['asset_index'] === undefined) return false;
|
|
48
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
49
49
|
return true;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -59,9 +59,9 @@ export function PendingUnlockFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
59
59
|
}
|
|
60
60
|
return {
|
|
61
61
|
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
62
|
+
'unlock_timestamp': json['unlock_timestamp'],
|
|
63
|
+
'asset_index': json['asset_index'],
|
|
64
|
+
'amount': json['amount'],
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -71,9 +71,9 @@ export function PendingUnlockToJSON(value?: PendingUnlock | null): any {
|
|
|
71
71
|
}
|
|
72
72
|
return {
|
|
73
73
|
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
74
|
+
'unlock_timestamp': value['unlock_timestamp'],
|
|
75
|
+
'asset_index': value['asset_index'],
|
|
76
|
+
'amount': value['amount'],
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -0,0 +1,105 @@
|
|
|
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 SystemConfig
|
|
20
|
+
*/
|
|
21
|
+
export interface SystemConfig {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof SystemConfig
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SystemConfig
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SystemConfig
|
|
38
|
+
*/
|
|
39
|
+
liquidity_pool_index: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SystemConfig
|
|
44
|
+
*/
|
|
45
|
+
staking_pool_index: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SystemConfig
|
|
50
|
+
*/
|
|
51
|
+
liquidity_pool_cooldown_period: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof SystemConfig
|
|
56
|
+
*/
|
|
57
|
+
staking_pool_lockup_period: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the SystemConfig interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfSystemConfig(value: object): value is SystemConfig {
|
|
64
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
65
|
+
if (!('liquidity_pool_index' in value) || value['liquidity_pool_index'] === undefined) return false;
|
|
66
|
+
if (!('staking_pool_index' in value) || value['staking_pool_index'] === undefined) return false;
|
|
67
|
+
if (!('liquidity_pool_cooldown_period' in value) || value['liquidity_pool_cooldown_period'] === undefined) return false;
|
|
68
|
+
if (!('staking_pool_lockup_period' in value) || value['staking_pool_lockup_period'] === undefined) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function SystemConfigFromJSON(json: any): SystemConfig {
|
|
73
|
+
return SystemConfigFromJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SystemConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemConfig {
|
|
77
|
+
if (json == null) {
|
|
78
|
+
return json;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'code': json['code'],
|
|
83
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
84
|
+
'liquidity_pool_index': json['liquidity_pool_index'],
|
|
85
|
+
'staking_pool_index': json['staking_pool_index'],
|
|
86
|
+
'liquidity_pool_cooldown_period': json['liquidity_pool_cooldown_period'],
|
|
87
|
+
'staking_pool_lockup_period': json['staking_pool_lockup_period'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function SystemConfigToJSON(value?: SystemConfig | null): any {
|
|
92
|
+
if (value == null) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'code': value['code'],
|
|
98
|
+
'message': value['message'],
|
|
99
|
+
'liquidity_pool_index': value['liquidity_pool_index'],
|
|
100
|
+
'staking_pool_index': value['staking_pool_index'],
|
|
101
|
+
'liquidity_pool_cooldown_period': value['liquidity_pool_cooldown_period'],
|
|
102
|
+
'staking_pool_lockup_period': value['staking_pool_lockup_period'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
package/models/index.ts
CHANGED
|
@@ -164,6 +164,7 @@ export * from './SpotMarketStats';
|
|
|
164
164
|
export * from './SpotOrderBookDetail';
|
|
165
165
|
export * from './Status';
|
|
166
166
|
export * from './SubAccounts';
|
|
167
|
+
export * from './SystemConfig';
|
|
167
168
|
export * from './Ticker';
|
|
168
169
|
export * from './Trade';
|
|
169
170
|
export * from './Trades';
|
package/openapi.json
CHANGED
|
@@ -3059,6 +3059,30 @@
|
|
|
3059
3059
|
"description": "Set account metadata"
|
|
3060
3060
|
}
|
|
3061
3061
|
},
|
|
3062
|
+
"/api/v1/systemConfig": {
|
|
3063
|
+
"get": {
|
|
3064
|
+
"summary": "systemConfig",
|
|
3065
|
+
"operationId": "systemConfig",
|
|
3066
|
+
"responses": {
|
|
3067
|
+
"200": {
|
|
3068
|
+
"description": "A successful response.",
|
|
3069
|
+
"schema": {
|
|
3070
|
+
"$ref": "#/definitions/SystemConfig"
|
|
3071
|
+
}
|
|
3072
|
+
},
|
|
3073
|
+
"400": {
|
|
3074
|
+
"description": "Bad request",
|
|
3075
|
+
"schema": {
|
|
3076
|
+
"$ref": "#/definitions/ResultCode"
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
"tags": [
|
|
3081
|
+
"info"
|
|
3082
|
+
],
|
|
3083
|
+
"description": "Get system configuration including pool indexes and lockup/cooldown periods"
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3062
3086
|
"/api/v1/tokens": {
|
|
3063
3087
|
"get": {
|
|
3064
3088
|
"summary": "tokens",
|
|
@@ -7062,26 +7086,26 @@
|
|
|
7062
7086
|
"PendingUnlock": {
|
|
7063
7087
|
"type": "object",
|
|
7064
7088
|
"properties": {
|
|
7065
|
-
"
|
|
7089
|
+
"unlock_timestamp": {
|
|
7066
7090
|
"type": "integer",
|
|
7067
7091
|
"format": "int64",
|
|
7068
|
-
"example": "
|
|
7092
|
+
"example": "1640995200"
|
|
7069
7093
|
},
|
|
7070
|
-
"
|
|
7094
|
+
"asset_index": {
|
|
7071
7095
|
"type": "integer",
|
|
7072
7096
|
"format": "int16",
|
|
7073
7097
|
"example": "1"
|
|
7074
7098
|
},
|
|
7075
|
-
"
|
|
7099
|
+
"amount": {
|
|
7076
7100
|
"type": "string",
|
|
7077
7101
|
"example": "1"
|
|
7078
7102
|
}
|
|
7079
7103
|
},
|
|
7080
7104
|
"title": "PendingUnlock",
|
|
7081
7105
|
"required": [
|
|
7082
|
-
"
|
|
7083
|
-
"
|
|
7084
|
-
"
|
|
7106
|
+
"unlock_timestamp",
|
|
7107
|
+
"asset_index",
|
|
7108
|
+
"amount"
|
|
7085
7109
|
]
|
|
7086
7110
|
},
|
|
7087
7111
|
"PerpsMarketStats": {
|
|
@@ -10334,6 +10358,47 @@
|
|
|
10334
10358
|
"sub_accounts"
|
|
10335
10359
|
]
|
|
10336
10360
|
},
|
|
10361
|
+
"SystemConfig": {
|
|
10362
|
+
"type": "object",
|
|
10363
|
+
"properties": {
|
|
10364
|
+
"code": {
|
|
10365
|
+
"type": "integer",
|
|
10366
|
+
"format": "int32",
|
|
10367
|
+
"example": "200"
|
|
10368
|
+
},
|
|
10369
|
+
"message": {
|
|
10370
|
+
"type": "string"
|
|
10371
|
+
},
|
|
10372
|
+
"liquidity_pool_index": {
|
|
10373
|
+
"type": "integer",
|
|
10374
|
+
"format": "int64",
|
|
10375
|
+
"example": "1"
|
|
10376
|
+
},
|
|
10377
|
+
"staking_pool_index": {
|
|
10378
|
+
"type": "integer",
|
|
10379
|
+
"format": "int64",
|
|
10380
|
+
"example": "2"
|
|
10381
|
+
},
|
|
10382
|
+
"liquidity_pool_cooldown_period": {
|
|
10383
|
+
"type": "integer",
|
|
10384
|
+
"format": "int64",
|
|
10385
|
+
"example": "86400"
|
|
10386
|
+
},
|
|
10387
|
+
"staking_pool_lockup_period": {
|
|
10388
|
+
"type": "integer",
|
|
10389
|
+
"format": "int64",
|
|
10390
|
+
"example": "604800"
|
|
10391
|
+
}
|
|
10392
|
+
},
|
|
10393
|
+
"title": "SystemConfig",
|
|
10394
|
+
"required": [
|
|
10395
|
+
"code",
|
|
10396
|
+
"liquidity_pool_index",
|
|
10397
|
+
"staking_pool_index",
|
|
10398
|
+
"liquidity_pool_cooldown_period",
|
|
10399
|
+
"staking_pool_lockup_period"
|
|
10400
|
+
]
|
|
10401
|
+
},
|
|
10337
10402
|
"Ticker": {
|
|
10338
10403
|
"type": "object",
|
|
10339
10404
|
"properties": {
|