zklighter-perps 1.0.32 → 1.0.34
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 +5 -3
- package/apis/AccountApi.ts +58 -0
- package/apis/InfoApi.ts +0 -46
- package/apis/TransactionApi.ts +94 -73
- package/models/AccountMetadata.ts +70 -0
- package/models/DetailedAccount.ts +33 -0
- package/models/PublicPool.ts +166 -0
- package/models/PublicPoolInfo.ts +97 -0
- package/models/PublicPools.ts +85 -0
- package/models/ReqGetPublicPools.ts +70 -0
- package/models/index.ts +5 -3
- package/openapi.json +273 -115
- package/package.json +1 -1
|
@@ -0,0 +1,166 @@
|
|
|
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
|
+
import type { PublicPoolInfo } from './PublicPoolInfo';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolInfoFromJSON,
|
|
19
|
+
PublicPoolInfoFromJSONTyped,
|
|
20
|
+
PublicPoolInfoToJSON,
|
|
21
|
+
} from './PublicPoolInfo';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PublicPool
|
|
27
|
+
*/
|
|
28
|
+
export interface PublicPool {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof PublicPool
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicPool
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof PublicPool
|
|
45
|
+
*/
|
|
46
|
+
account_type: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PublicPool
|
|
51
|
+
*/
|
|
52
|
+
index: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof PublicPool
|
|
57
|
+
*/
|
|
58
|
+
l1_address: string;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof PublicPool
|
|
63
|
+
*/
|
|
64
|
+
cancel_all_time: number;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof PublicPool
|
|
69
|
+
*/
|
|
70
|
+
open_order_count: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPool
|
|
75
|
+
*/
|
|
76
|
+
status: number;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof PublicPool
|
|
81
|
+
*/
|
|
82
|
+
collateral: string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof PublicPool
|
|
87
|
+
*/
|
|
88
|
+
name: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof PublicPool
|
|
93
|
+
*/
|
|
94
|
+
description: string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {PublicPoolInfo}
|
|
98
|
+
* @memberof PublicPool
|
|
99
|
+
*/
|
|
100
|
+
pool_info: PublicPoolInfo;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the PublicPool interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfPublicPool(value: object): value is PublicPool {
|
|
107
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
108
|
+
if (!('account_type' in value) || value['account_type'] === undefined) return false;
|
|
109
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
110
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
111
|
+
if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
|
|
112
|
+
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
113
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
114
|
+
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
115
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
116
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
117
|
+
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function PublicPoolFromJSON(json: any): PublicPool {
|
|
122
|
+
return PublicPoolFromJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPool {
|
|
126
|
+
if (json == null) {
|
|
127
|
+
return json;
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
|
|
131
|
+
'code': json['code'],
|
|
132
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
133
|
+
'account_type': json['account_type'],
|
|
134
|
+
'index': json['index'],
|
|
135
|
+
'l1_address': json['l1_address'],
|
|
136
|
+
'cancel_all_time': json['cancel_all_time'],
|
|
137
|
+
'open_order_count': json['open_order_count'],
|
|
138
|
+
'status': json['status'],
|
|
139
|
+
'collateral': json['collateral'],
|
|
140
|
+
'name': json['name'],
|
|
141
|
+
'description': json['description'],
|
|
142
|
+
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function PublicPoolToJSON(value?: PublicPool | null): any {
|
|
147
|
+
if (value == null) {
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
|
|
152
|
+
'code': value['code'],
|
|
153
|
+
'message': value['message'],
|
|
154
|
+
'account_type': value['account_type'],
|
|
155
|
+
'index': value['index'],
|
|
156
|
+
'l1_address': value['l1_address'],
|
|
157
|
+
'cancel_all_time': value['cancel_all_time'],
|
|
158
|
+
'open_order_count': value['open_order_count'],
|
|
159
|
+
'status': value['status'],
|
|
160
|
+
'collateral': value['collateral'],
|
|
161
|
+
'name': value['name'],
|
|
162
|
+
'description': value['description'],
|
|
163
|
+
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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 PublicPoolInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface PublicPoolInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PublicPoolInfo
|
|
26
|
+
*/
|
|
27
|
+
ppi_s: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PublicPoolInfo
|
|
32
|
+
*/
|
|
33
|
+
ppi_of: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PublicPoolInfo
|
|
38
|
+
*/
|
|
39
|
+
ppi_mosr: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof PublicPoolInfo
|
|
44
|
+
*/
|
|
45
|
+
ppi_tsa: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PublicPoolInfo
|
|
50
|
+
*/
|
|
51
|
+
ppi_os: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the PublicPoolInfo interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo {
|
|
58
|
+
if (!('ppi_s' in value) || value['ppi_s'] === undefined) return false;
|
|
59
|
+
if (!('ppi_of' in value) || value['ppi_of'] === undefined) return false;
|
|
60
|
+
if (!('ppi_mosr' in value) || value['ppi_mosr'] === undefined) return false;
|
|
61
|
+
if (!('ppi_tsa' in value) || value['ppi_tsa'] === undefined) return false;
|
|
62
|
+
if (!('ppi_os' in value) || value['ppi_os'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PublicPoolInfoFromJSON(json: any): PublicPoolInfo {
|
|
67
|
+
return PublicPoolInfoFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPoolInfo {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'ppi_s': json['ppi_s'],
|
|
77
|
+
'ppi_of': json['ppi_of'],
|
|
78
|
+
'ppi_mosr': json['ppi_mosr'],
|
|
79
|
+
'ppi_tsa': json['ppi_tsa'],
|
|
80
|
+
'ppi_os': json['ppi_os'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'ppi_s': value['ppi_s'],
|
|
91
|
+
'ppi_of': value['ppi_of'],
|
|
92
|
+
'ppi_mosr': value['ppi_mosr'],
|
|
93
|
+
'ppi_tsa': value['ppi_tsa'],
|
|
94
|
+
'ppi_os': value['ppi_os'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
import type { PublicPool } from './PublicPool';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolFromJSON,
|
|
19
|
+
PublicPoolFromJSONTyped,
|
|
20
|
+
PublicPoolToJSON,
|
|
21
|
+
} from './PublicPool';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PublicPools
|
|
27
|
+
*/
|
|
28
|
+
export interface PublicPools {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof PublicPools
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicPools
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<PublicPool>}
|
|
44
|
+
* @memberof PublicPools
|
|
45
|
+
*/
|
|
46
|
+
public_pools: Array<PublicPool>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the PublicPools interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfPublicPools(value: object): value is PublicPools {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('public_pools' in value) || value['public_pools'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function PublicPoolsFromJSON(json: any): PublicPools {
|
|
59
|
+
return PublicPoolsFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function PublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPools {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'public_pools': ((json['public_pools'] as Array<any>).map(PublicPoolFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function PublicPoolsToJSON(value?: PublicPools | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'public_pools': ((value['public_pools'] as Array<any>).map(PublicPoolToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -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 ReqGetPublicPools
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetPublicPools {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ReqGetPublicPools
|
|
26
|
+
*/
|
|
27
|
+
index: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetPublicPools
|
|
32
|
+
*/
|
|
33
|
+
limit: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ReqGetPublicPools interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfReqGetPublicPools(value: object): value is ReqGetPublicPools {
|
|
40
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
41
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ReqGetPublicPoolsFromJSON(json: any): ReqGetPublicPools {
|
|
46
|
+
return ReqGetPublicPoolsFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ReqGetPublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPublicPools {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'index': json['index'],
|
|
56
|
+
'limit': json['limit'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ReqGetPublicPoolsToJSON(value?: ReqGetPublicPools | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'index': value['index'],
|
|
67
|
+
'limit': value['limit'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/models/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './Account';
|
|
4
4
|
export * from './AccountApiKeys';
|
|
5
5
|
export * from './AccountMarketStats';
|
|
6
|
+
export * from './AccountMetadata';
|
|
6
7
|
export * from './AccountPnL';
|
|
7
8
|
export * from './AccountPosition';
|
|
8
9
|
export * from './AccountStats';
|
|
@@ -39,7 +40,10 @@ export * from './Orders';
|
|
|
39
40
|
export * from './Permission';
|
|
40
41
|
export * from './PnLEntry';
|
|
41
42
|
export * from './PriceLevel';
|
|
43
|
+
export * from './PublicPool';
|
|
44
|
+
export * from './PublicPoolInfo';
|
|
42
45
|
export * from './PublicPoolShare';
|
|
46
|
+
export * from './PublicPools';
|
|
43
47
|
export * from './ReqDoFaucet';
|
|
44
48
|
export * from './ReqGetAccount';
|
|
45
49
|
export * from './ReqGetAccountActiveOrders';
|
|
@@ -61,6 +65,7 @@ export * from './ReqGetOrderBookDetails';
|
|
|
61
65
|
export * from './ReqGetOrderBookOrders';
|
|
62
66
|
export * from './ReqGetOrderBooks';
|
|
63
67
|
export * from './ReqGetPermission';
|
|
68
|
+
export * from './ReqGetPublicPools';
|
|
64
69
|
export * from './ReqGetRangeWithCursor';
|
|
65
70
|
export * from './ReqGetRangeWithIndex';
|
|
66
71
|
export * from './ReqGetRangeWithIndexSortable';
|
|
@@ -69,12 +74,9 @@ export * from './ReqGetRollbacks';
|
|
|
69
74
|
export * from './ReqGetTrades';
|
|
70
75
|
export * from './ReqGetTx';
|
|
71
76
|
export * from './ReqMarkNotifRead';
|
|
72
|
-
export * from './ReqSearch';
|
|
73
77
|
export * from './ResultCode';
|
|
74
78
|
export * from './Rollback';
|
|
75
79
|
export * from './Rollbacks';
|
|
76
|
-
export * from './Search';
|
|
77
|
-
export * from './SignBody';
|
|
78
80
|
export * from './SimpleOrder';
|
|
79
81
|
export * from './Status';
|
|
80
82
|
export * from './SubAccounts';
|