zklighter-perps 1.0.178 → 1.0.180
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/GeoApi.ts +58 -0
- package/apis/index.ts +1 -0
- package/models/EnrichedTx.ts +9 -0
- package/models/PublicPoolInfo.ts +9 -0
- package/models/PublicPoolMetadata.ts +18 -0
- package/models/Tx.ts +9 -0
- package/openapi.json +54 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/GeoApi.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ResultCode,
|
|
19
|
+
} from '../models/index';
|
|
20
|
+
import {
|
|
21
|
+
ResultCodeFromJSON,
|
|
22
|
+
ResultCodeToJSON,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class GeoApi extends runtime.BaseAPI {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get geo location
|
|
32
|
+
* geoLocation
|
|
33
|
+
*/
|
|
34
|
+
async geoLocationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
35
|
+
const queryParameters: any = {};
|
|
36
|
+
|
|
37
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
38
|
+
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: `/api/v1/geoLocation`,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get geo location
|
|
51
|
+
* geoLocation
|
|
52
|
+
*/
|
|
53
|
+
async geoLocation(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
54
|
+
const response = await this.geoLocationRaw(initOverrides);
|
|
55
|
+
return await response.value();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
package/apis/index.ts
CHANGED
package/models/EnrichedTx.ts
CHANGED
|
@@ -121,6 +121,12 @@ export interface EnrichedTx {
|
|
|
121
121
|
* @memberof EnrichedTx
|
|
122
122
|
*/
|
|
123
123
|
parent_hash: string;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof EnrichedTx
|
|
128
|
+
*/
|
|
129
|
+
api_key_index: number;
|
|
124
130
|
/**
|
|
125
131
|
*
|
|
126
132
|
* @type {number}
|
|
@@ -155,6 +161,7 @@ export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
|
|
|
155
161
|
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
156
162
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
157
163
|
if (!('parent_hash' in value) || value['parent_hash'] === undefined) return false;
|
|
164
|
+
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
158
165
|
if (!('committed_at' in value) || value['committed_at'] === undefined) return false;
|
|
159
166
|
if (!('verified_at' in value) || value['verified_at'] === undefined) return false;
|
|
160
167
|
return true;
|
|
@@ -187,6 +194,7 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
187
194
|
'executed_at': json['executed_at'],
|
|
188
195
|
'sequence_index': json['sequence_index'],
|
|
189
196
|
'parent_hash': json['parent_hash'],
|
|
197
|
+
'api_key_index': json['api_key_index'],
|
|
190
198
|
'committed_at': json['committed_at'],
|
|
191
199
|
'verified_at': json['verified_at'],
|
|
192
200
|
};
|
|
@@ -215,6 +223,7 @@ export function EnrichedTxToJSON(value?: EnrichedTx | null): any {
|
|
|
215
223
|
'executed_at': value['executed_at'],
|
|
216
224
|
'sequence_index': value['sequence_index'],
|
|
217
225
|
'parent_hash': value['parent_hash'],
|
|
226
|
+
'api_key_index': value['api_key_index'],
|
|
218
227
|
'committed_at': value['committed_at'],
|
|
219
228
|
'verified_at': value['verified_at'],
|
|
220
229
|
};
|
package/models/PublicPoolInfo.ts
CHANGED
|
@@ -68,6 +68,12 @@ export interface PublicPoolInfo {
|
|
|
68
68
|
* @memberof PublicPoolInfo
|
|
69
69
|
*/
|
|
70
70
|
annual_percentage_yield: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPoolInfo
|
|
75
|
+
*/
|
|
76
|
+
sharpe_ratio: number;
|
|
71
77
|
/**
|
|
72
78
|
*
|
|
73
79
|
* @type {Array<DailyReturn>}
|
|
@@ -92,6 +98,7 @@ export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo
|
|
|
92
98
|
if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
|
|
93
99
|
if (!('operator_shares' in value) || value['operator_shares'] === undefined) return false;
|
|
94
100
|
if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
|
|
101
|
+
if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
|
|
95
102
|
if (!('daily_returns' in value) || value['daily_returns'] === undefined) return false;
|
|
96
103
|
if (!('share_prices' in value) || value['share_prices'] === undefined) return false;
|
|
97
104
|
return true;
|
|
@@ -113,6 +120,7 @@ export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
113
120
|
'total_shares': json['total_shares'],
|
|
114
121
|
'operator_shares': json['operator_shares'],
|
|
115
122
|
'annual_percentage_yield': json['annual_percentage_yield'],
|
|
123
|
+
'sharpe_ratio': json['sharpe_ratio'],
|
|
116
124
|
'daily_returns': ((json['daily_returns'] as Array<any>).map(DailyReturnFromJSON)),
|
|
117
125
|
'share_prices': ((json['share_prices'] as Array<any>).map(SharePriceFromJSON)),
|
|
118
126
|
};
|
|
@@ -130,6 +138,7 @@ export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
|
|
|
130
138
|
'total_shares': value['total_shares'],
|
|
131
139
|
'operator_shares': value['operator_shares'],
|
|
132
140
|
'annual_percentage_yield': value['annual_percentage_yield'],
|
|
141
|
+
'sharpe_ratio': value['sharpe_ratio'],
|
|
133
142
|
'daily_returns': ((value['daily_returns'] as Array<any>).map(DailyReturnToJSON)),
|
|
134
143
|
'share_prices': ((value['share_prices'] as Array<any>).map(SharePriceToJSON)),
|
|
135
144
|
};
|
|
@@ -44,6 +44,12 @@ export interface PublicPoolMetadata {
|
|
|
44
44
|
* @memberof PublicPoolMetadata
|
|
45
45
|
*/
|
|
46
46
|
account_index: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PublicPoolMetadata
|
|
51
|
+
*/
|
|
52
|
+
created_at: number;
|
|
47
53
|
/**
|
|
48
54
|
*
|
|
49
55
|
* @type {number}
|
|
@@ -74,6 +80,12 @@ export interface PublicPoolMetadata {
|
|
|
74
80
|
* @memberof PublicPoolMetadata
|
|
75
81
|
*/
|
|
76
82
|
annual_percentage_yield: number;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof PublicPoolMetadata
|
|
87
|
+
*/
|
|
88
|
+
sharpe_ratio: number;
|
|
77
89
|
/**
|
|
78
90
|
*
|
|
79
91
|
* @type {number}
|
|
@@ -112,11 +124,13 @@ export interface PublicPoolMetadata {
|
|
|
112
124
|
export function instanceOfPublicPoolMetadata(value: object): value is PublicPoolMetadata {
|
|
113
125
|
if (!('code' in value) || value['code'] === undefined) return false;
|
|
114
126
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
127
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
115
128
|
if (!('master_account_index' in value) || value['master_account_index'] === undefined) return false;
|
|
116
129
|
if (!('account_type' in value) || value['account_type'] === undefined) return false;
|
|
117
130
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
118
131
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
119
132
|
if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
|
|
133
|
+
if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
|
|
120
134
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
121
135
|
if (!('operator_fee' in value) || value['operator_fee'] === undefined) return false;
|
|
122
136
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
@@ -137,11 +151,13 @@ export function PublicPoolMetadataFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
137
151
|
'code': json['code'],
|
|
138
152
|
'message': json['message'] == null ? undefined : json['message'],
|
|
139
153
|
'account_index': json['account_index'],
|
|
154
|
+
'created_at': json['created_at'],
|
|
140
155
|
'master_account_index': json['master_account_index'],
|
|
141
156
|
'account_type': json['account_type'],
|
|
142
157
|
'name': json['name'],
|
|
143
158
|
'l1_address': json['l1_address'],
|
|
144
159
|
'annual_percentage_yield': json['annual_percentage_yield'],
|
|
160
|
+
'sharpe_ratio': json['sharpe_ratio'],
|
|
145
161
|
'status': json['status'],
|
|
146
162
|
'operator_fee': json['operator_fee'],
|
|
147
163
|
'total_asset_value': json['total_asset_value'],
|
|
@@ -159,11 +175,13 @@ export function PublicPoolMetadataToJSON(value?: PublicPoolMetadata | null): any
|
|
|
159
175
|
'code': value['code'],
|
|
160
176
|
'message': value['message'],
|
|
161
177
|
'account_index': value['account_index'],
|
|
178
|
+
'created_at': value['created_at'],
|
|
162
179
|
'master_account_index': value['master_account_index'],
|
|
163
180
|
'account_type': value['account_type'],
|
|
164
181
|
'name': value['name'],
|
|
165
182
|
'l1_address': value['l1_address'],
|
|
166
183
|
'annual_percentage_yield': value['annual_percentage_yield'],
|
|
184
|
+
'sharpe_ratio': value['sharpe_ratio'],
|
|
167
185
|
'status': value['status'],
|
|
168
186
|
'operator_fee': value['operator_fee'],
|
|
169
187
|
'total_asset_value': value['total_asset_value'],
|
package/models/Tx.ts
CHANGED
|
@@ -109,6 +109,12 @@ export interface Tx {
|
|
|
109
109
|
* @memberof Tx
|
|
110
110
|
*/
|
|
111
111
|
parent_hash: string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {number}
|
|
115
|
+
* @memberof Tx
|
|
116
|
+
*/
|
|
117
|
+
api_key_index: number;
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
/**
|
|
@@ -130,6 +136,7 @@ export function instanceOfTx(value: object): value is Tx {
|
|
|
130
136
|
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
131
137
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
132
138
|
if (!('parent_hash' in value) || value['parent_hash'] === undefined) return false;
|
|
139
|
+
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
133
140
|
return true;
|
|
134
141
|
}
|
|
135
142
|
|
|
@@ -158,6 +165,7 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
|
|
|
158
165
|
'executed_at': json['executed_at'],
|
|
159
166
|
'sequence_index': json['sequence_index'],
|
|
160
167
|
'parent_hash': json['parent_hash'],
|
|
168
|
+
'api_key_index': json['api_key_index'],
|
|
161
169
|
};
|
|
162
170
|
}
|
|
163
171
|
|
|
@@ -182,6 +190,7 @@ export function TxToJSON(value?: Tx | null): any {
|
|
|
182
190
|
'executed_at': value['executed_at'],
|
|
183
191
|
'sequence_index': value['sequence_index'],
|
|
184
192
|
'parent_hash': value['parent_hash'],
|
|
193
|
+
'api_key_index': value['api_key_index'],
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
196
|
|
package/openapi.json
CHANGED
|
@@ -1471,6 +1471,30 @@
|
|
|
1471
1471
|
"description": "Coin Gecko Orderbook"
|
|
1472
1472
|
}
|
|
1473
1473
|
},
|
|
1474
|
+
"/api/v1/geoLocation": {
|
|
1475
|
+
"get": {
|
|
1476
|
+
"summary": "geoLocation",
|
|
1477
|
+
"operationId": "geoLocation",
|
|
1478
|
+
"responses": {
|
|
1479
|
+
"200": {
|
|
1480
|
+
"description": "A successful response.",
|
|
1481
|
+
"schema": {
|
|
1482
|
+
"$ref": "#/definitions/ResultCode"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"400": {
|
|
1486
|
+
"description": "Bad request",
|
|
1487
|
+
"schema": {
|
|
1488
|
+
"$ref": "#/definitions/ResultCode"
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
"tags": [
|
|
1493
|
+
"geo"
|
|
1494
|
+
],
|
|
1495
|
+
"description": "Get geo location"
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1474
1498
|
"/api/v1/isWhitelisted": {
|
|
1475
1499
|
"get": {
|
|
1476
1500
|
"summary": "isWhitelisted",
|
|
@@ -4653,6 +4677,11 @@
|
|
|
4653
4677
|
"type": "string",
|
|
4654
4678
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
4655
4679
|
},
|
|
4680
|
+
"api_key_index": {
|
|
4681
|
+
"type": "integer",
|
|
4682
|
+
"format": "uint8",
|
|
4683
|
+
"example": "0"
|
|
4684
|
+
},
|
|
4656
4685
|
"committed_at": {
|
|
4657
4686
|
"type": "integer",
|
|
4658
4687
|
"format": "int64",
|
|
@@ -4682,6 +4711,7 @@
|
|
|
4682
4711
|
"executed_at",
|
|
4683
4712
|
"sequence_index",
|
|
4684
4713
|
"parent_hash",
|
|
4714
|
+
"api_key_index",
|
|
4685
4715
|
"committed_at",
|
|
4686
4716
|
"verified_at"
|
|
4687
4717
|
]
|
|
@@ -6367,6 +6397,11 @@
|
|
|
6367
6397
|
"format": "double",
|
|
6368
6398
|
"example": "20.5000"
|
|
6369
6399
|
},
|
|
6400
|
+
"sharpe_ratio": {
|
|
6401
|
+
"type": "number",
|
|
6402
|
+
"format": "double",
|
|
6403
|
+
"example": "1.5"
|
|
6404
|
+
},
|
|
6370
6405
|
"daily_returns": {
|
|
6371
6406
|
"type": "array",
|
|
6372
6407
|
"items": {
|
|
@@ -6388,6 +6423,7 @@
|
|
|
6388
6423
|
"total_shares",
|
|
6389
6424
|
"operator_shares",
|
|
6390
6425
|
"annual_percentage_yield",
|
|
6426
|
+
"sharpe_ratio",
|
|
6391
6427
|
"daily_returns",
|
|
6392
6428
|
"share_prices"
|
|
6393
6429
|
]
|
|
@@ -6408,6 +6444,10 @@
|
|
|
6408
6444
|
"format": "int64",
|
|
6409
6445
|
"example": "3"
|
|
6410
6446
|
},
|
|
6447
|
+
"created_at": {
|
|
6448
|
+
"type": "integer",
|
|
6449
|
+
"format": "int64"
|
|
6450
|
+
},
|
|
6411
6451
|
"master_account_index": {
|
|
6412
6452
|
"type": "integer",
|
|
6413
6453
|
"format": "int64",
|
|
@@ -6430,6 +6470,11 @@
|
|
|
6430
6470
|
"format": "double",
|
|
6431
6471
|
"example": "20.5000"
|
|
6432
6472
|
},
|
|
6473
|
+
"sharpe_ratio": {
|
|
6474
|
+
"type": "number",
|
|
6475
|
+
"format": "double",
|
|
6476
|
+
"example": "1.5"
|
|
6477
|
+
},
|
|
6433
6478
|
"status": {
|
|
6434
6479
|
"type": "integer",
|
|
6435
6480
|
"format": "uint8",
|
|
@@ -6456,11 +6501,13 @@
|
|
|
6456
6501
|
"required": [
|
|
6457
6502
|
"code",
|
|
6458
6503
|
"account_index",
|
|
6504
|
+
"created_at",
|
|
6459
6505
|
"master_account_index",
|
|
6460
6506
|
"account_type",
|
|
6461
6507
|
"name",
|
|
6462
6508
|
"l1_address",
|
|
6463
6509
|
"annual_percentage_yield",
|
|
6510
|
+
"sharpe_ratio",
|
|
6464
6511
|
"status",
|
|
6465
6512
|
"operator_fee",
|
|
6466
6513
|
"total_asset_value",
|
|
@@ -8752,6 +8799,11 @@
|
|
|
8752
8799
|
"parent_hash": {
|
|
8753
8800
|
"type": "string",
|
|
8754
8801
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
8802
|
+
},
|
|
8803
|
+
"api_key_index": {
|
|
8804
|
+
"type": "integer",
|
|
8805
|
+
"format": "uint8",
|
|
8806
|
+
"example": "0"
|
|
8755
8807
|
}
|
|
8756
8808
|
},
|
|
8757
8809
|
"title": "Tx",
|
|
@@ -8770,7 +8822,8 @@
|
|
|
8770
8822
|
"queued_at",
|
|
8771
8823
|
"executed_at",
|
|
8772
8824
|
"sequence_index",
|
|
8773
|
-
"parent_hash"
|
|
8825
|
+
"parent_hash",
|
|
8826
|
+
"api_key_index"
|
|
8774
8827
|
]
|
|
8775
8828
|
},
|
|
8776
8829
|
"TxHash": {
|