zklighter-perps 1.0.50 → 1.0.52
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 +3 -3
- package/apis/AccountApi.ts +59 -0
- package/apis/InfoApi.ts +0 -70
- package/models/Leaderboard.ts +77 -0
- package/models/LeaderboardEntry.ts +79 -0
- package/models/ReqGetLeaderboard.ts +80 -0
- package/models/index.ts +3 -3
- package/openapi.json +109 -142
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -33,6 +33,8 @@ models/Fundings.ts
|
|
|
33
33
|
models/L1ProviderInfo.ts
|
|
34
34
|
models/Layer1BasicInfo.ts
|
|
35
35
|
models/Layer2BasicInfo.ts
|
|
36
|
+
models/Leaderboard.ts
|
|
37
|
+
models/LeaderboardEntry.ts
|
|
36
38
|
models/Liquidation.ts
|
|
37
39
|
models/MarketInfo.ts
|
|
38
40
|
models/NextNonce.ts
|
|
@@ -69,6 +71,7 @@ models/ReqGetByAccount.ts
|
|
|
69
71
|
models/ReqGetCandlesticks.ts
|
|
70
72
|
models/ReqGetFundings.ts
|
|
71
73
|
models/ReqGetL1Tx.ts
|
|
74
|
+
models/ReqGetLeaderboard.ts
|
|
72
75
|
models/ReqGetNextNonce.ts
|
|
73
76
|
models/ReqGetOrderBookDetails.ts
|
|
74
77
|
models/ReqGetOrderBookOrders.ts
|
|
@@ -79,13 +82,10 @@ models/ReqGetRangeWithCursor.ts
|
|
|
79
82
|
models/ReqGetRangeWithIndex.ts
|
|
80
83
|
models/ReqGetRangeWithIndexSortable.ts
|
|
81
84
|
models/ReqGetRecentTrades.ts
|
|
82
|
-
models/ReqGetRollbacks.ts
|
|
83
85
|
models/ReqGetTrades.ts
|
|
84
86
|
models/ReqGetTx.ts
|
|
85
87
|
models/ReqMarkNotifRead.ts
|
|
86
88
|
models/ResultCode.ts
|
|
87
|
-
models/Rollback.ts
|
|
88
|
-
models/Rollbacks.ts
|
|
89
89
|
models/SimpleOrder.ts
|
|
90
90
|
models/Status.ts
|
|
91
91
|
models/SubAccounts.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
AccountPnL,
|
|
20
20
|
Accounts,
|
|
21
21
|
DetailedAccounts,
|
|
22
|
+
Leaderboard,
|
|
22
23
|
PublicPools,
|
|
23
24
|
ResultCode,
|
|
24
25
|
SubAccounts,
|
|
@@ -32,6 +33,8 @@ import {
|
|
|
32
33
|
AccountsToJSON,
|
|
33
34
|
DetailedAccountsFromJSON,
|
|
34
35
|
DetailedAccountsToJSON,
|
|
36
|
+
LeaderboardFromJSON,
|
|
37
|
+
LeaderboardToJSON,
|
|
35
38
|
PublicPoolsFromJSON,
|
|
36
39
|
PublicPoolsToJSON,
|
|
37
40
|
ResultCodeFromJSON,
|
|
@@ -64,6 +67,11 @@ export interface FaucetRequest {
|
|
|
64
67
|
l1_address: string;
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
export interface LeaderboardRequest {
|
|
71
|
+
type: LeaderboardTypeEnum;
|
|
72
|
+
l1_address?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
export interface PnlRequest {
|
|
68
76
|
by: PnlByEnum;
|
|
69
77
|
value: string;
|
|
@@ -309,6 +317,49 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
309
317
|
return await response.value();
|
|
310
318
|
}
|
|
311
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Get points leaderboard
|
|
322
|
+
* leaderboard
|
|
323
|
+
*/
|
|
324
|
+
async leaderboardRaw(requestParameters: LeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Leaderboard>> {
|
|
325
|
+
if (requestParameters['type'] == null) {
|
|
326
|
+
throw new runtime.RequiredError(
|
|
327
|
+
'type',
|
|
328
|
+
'Required parameter "type" was null or undefined when calling leaderboard().'
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const queryParameters: any = {};
|
|
333
|
+
|
|
334
|
+
if (requestParameters['type'] != null) {
|
|
335
|
+
queryParameters['type'] = requestParameters['type'];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (requestParameters['l1_address'] != null) {
|
|
339
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
343
|
+
|
|
344
|
+
const response = await this.request({
|
|
345
|
+
path: `/api/v1/leaderboard`,
|
|
346
|
+
method: 'GET',
|
|
347
|
+
headers: headerParameters,
|
|
348
|
+
query: queryParameters,
|
|
349
|
+
}, initOverrides);
|
|
350
|
+
|
|
351
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeaderboardFromJSON(jsonValue));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Get points leaderboard
|
|
356
|
+
* leaderboard
|
|
357
|
+
*/
|
|
358
|
+
async leaderboard(requestParameters: LeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Leaderboard> {
|
|
359
|
+
const response = await this.leaderboardRaw(requestParameters, initOverrides);
|
|
360
|
+
return await response.value();
|
|
361
|
+
}
|
|
362
|
+
|
|
312
363
|
/**
|
|
313
364
|
* Get account PnL chart
|
|
314
365
|
* pnl
|
|
@@ -482,6 +533,14 @@ export const AccountsSortEnum = {
|
|
|
482
533
|
Desc: 'desc'
|
|
483
534
|
} as const;
|
|
484
535
|
export type AccountsSortEnum = typeof AccountsSortEnum[keyof typeof AccountsSortEnum];
|
|
536
|
+
/**
|
|
537
|
+
* @export
|
|
538
|
+
*/
|
|
539
|
+
export const LeaderboardTypeEnum = {
|
|
540
|
+
Weekly: 'weekly',
|
|
541
|
+
All: 'all'
|
|
542
|
+
} as const;
|
|
543
|
+
export type LeaderboardTypeEnum = typeof LeaderboardTypeEnum[keyof typeof LeaderboardTypeEnum];
|
|
485
544
|
/**
|
|
486
545
|
* @export
|
|
487
546
|
*/
|
package/apis/InfoApi.ts
CHANGED
|
@@ -18,7 +18,6 @@ import type {
|
|
|
18
18
|
Layer1BasicInfo,
|
|
19
19
|
Layer2BasicInfo,
|
|
20
20
|
ResultCode,
|
|
21
|
-
Rollbacks,
|
|
22
21
|
} from '../models/index';
|
|
23
22
|
import {
|
|
24
23
|
Layer1BasicInfoFromJSON,
|
|
@@ -27,16 +26,8 @@ import {
|
|
|
27
26
|
Layer2BasicInfoToJSON,
|
|
28
27
|
ResultCodeFromJSON,
|
|
29
28
|
ResultCodeToJSON,
|
|
30
|
-
RollbacksFromJSON,
|
|
31
|
-
RollbacksToJSON,
|
|
32
29
|
} from '../models/index';
|
|
33
30
|
|
|
34
|
-
export interface RollbacksRequest {
|
|
35
|
-
from_block_height: number;
|
|
36
|
-
offset: number;
|
|
37
|
-
limit: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
31
|
/**
|
|
41
32
|
*
|
|
42
33
|
*/
|
|
@@ -98,65 +89,4 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
98
89
|
return await response.value();
|
|
99
90
|
}
|
|
100
91
|
|
|
101
|
-
/**
|
|
102
|
-
* Get rollbacks
|
|
103
|
-
* rollbacks
|
|
104
|
-
*/
|
|
105
|
-
async rollbacksRaw(requestParameters: RollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Rollbacks>> {
|
|
106
|
-
if (requestParameters['from_block_height'] == null) {
|
|
107
|
-
throw new runtime.RequiredError(
|
|
108
|
-
'from_block_height',
|
|
109
|
-
'Required parameter "from_block_height" was null or undefined when calling rollbacks().'
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (requestParameters['offset'] == null) {
|
|
114
|
-
throw new runtime.RequiredError(
|
|
115
|
-
'offset',
|
|
116
|
-
'Required parameter "offset" was null or undefined when calling rollbacks().'
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (requestParameters['limit'] == null) {
|
|
121
|
-
throw new runtime.RequiredError(
|
|
122
|
-
'limit',
|
|
123
|
-
'Required parameter "limit" was null or undefined when calling rollbacks().'
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const queryParameters: any = {};
|
|
128
|
-
|
|
129
|
-
if (requestParameters['from_block_height'] != null) {
|
|
130
|
-
queryParameters['from_block_height'] = requestParameters['from_block_height'];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (requestParameters['offset'] != null) {
|
|
134
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (requestParameters['limit'] != null) {
|
|
138
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
142
|
-
|
|
143
|
-
const response = await this.request({
|
|
144
|
-
path: `/api/v1/rollbacks`,
|
|
145
|
-
method: 'GET',
|
|
146
|
-
headers: headerParameters,
|
|
147
|
-
query: queryParameters,
|
|
148
|
-
}, initOverrides);
|
|
149
|
-
|
|
150
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RollbacksFromJSON(jsonValue));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Get rollbacks
|
|
155
|
-
* rollbacks
|
|
156
|
-
*/
|
|
157
|
-
async rollbacks(requestParameters: RollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Rollbacks> {
|
|
158
|
-
const response = await this.rollbacksRaw(requestParameters, initOverrides);
|
|
159
|
-
return await response.value();
|
|
160
|
-
}
|
|
161
|
-
|
|
162
92
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { LeaderboardEntry } from './LeaderboardEntry';
|
|
17
|
+
import {
|
|
18
|
+
LeaderboardEntryFromJSON,
|
|
19
|
+
LeaderboardEntryFromJSONTyped,
|
|
20
|
+
LeaderboardEntryToJSON,
|
|
21
|
+
} from './LeaderboardEntry';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface Leaderboard
|
|
27
|
+
*/
|
|
28
|
+
export interface Leaderboard {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<LeaderboardEntry>}
|
|
32
|
+
* @memberof Leaderboard
|
|
33
|
+
*/
|
|
34
|
+
entries: Array<LeaderboardEntry>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof Leaderboard
|
|
39
|
+
*/
|
|
40
|
+
week_start: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the Leaderboard interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfLeaderboard(value: object): value is Leaderboard {
|
|
47
|
+
if (!('entries' in value) || value['entries'] === undefined) return false;
|
|
48
|
+
if (!('week_start' in value) || value['week_start'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function LeaderboardFromJSON(json: any): Leaderboard {
|
|
53
|
+
return LeaderboardFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function LeaderboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): Leaderboard {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'entries': ((json['entries'] as Array<any>).map(LeaderboardEntryFromJSON)),
|
|
63
|
+
'week_start': json['week_start'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function LeaderboardToJSON(value?: Leaderboard | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'entries': ((value['entries'] as Array<any>).map(LeaderboardEntryToJSON)),
|
|
74
|
+
'week_start': value['week_start'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
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 LeaderboardEntry
|
|
20
|
+
*/
|
|
21
|
+
export interface LeaderboardEntry {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof LeaderboardEntry
|
|
26
|
+
*/
|
|
27
|
+
l1_address: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof LeaderboardEntry
|
|
32
|
+
*/
|
|
33
|
+
points: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof LeaderboardEntry
|
|
38
|
+
*/
|
|
39
|
+
entry: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the LeaderboardEntry interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfLeaderboardEntry(value: object): value is LeaderboardEntry {
|
|
46
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
47
|
+
if (!('points' in value) || value['points'] === undefined) return false;
|
|
48
|
+
if (!('entry' in value) || value['entry'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function LeaderboardEntryFromJSON(json: any): LeaderboardEntry {
|
|
53
|
+
return LeaderboardEntryFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function LeaderboardEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeaderboardEntry {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'l1_address': json['l1_address'],
|
|
63
|
+
'points': json['points'],
|
|
64
|
+
'entry': json['entry'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function LeaderboardEntryToJSON(value?: LeaderboardEntry | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'l1_address': value['l1_address'],
|
|
75
|
+
'points': value['points'],
|
|
76
|
+
'entry': value['entry'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
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 ReqGetLeaderboard
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetLeaderboard {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetLeaderboard
|
|
26
|
+
*/
|
|
27
|
+
type: ReqGetLeaderboardTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetLeaderboard
|
|
32
|
+
*/
|
|
33
|
+
l1_address?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const ReqGetLeaderboardTypeEnum = {
|
|
41
|
+
Weekly: 'weekly',
|
|
42
|
+
All: 'all'
|
|
43
|
+
} as const;
|
|
44
|
+
export type ReqGetLeaderboardTypeEnum = typeof ReqGetLeaderboardTypeEnum[keyof typeof ReqGetLeaderboardTypeEnum];
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the ReqGetLeaderboard interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfReqGetLeaderboard(value: object): value is ReqGetLeaderboard {
|
|
51
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ReqGetLeaderboardFromJSON(json: any): ReqGetLeaderboard {
|
|
56
|
+
return ReqGetLeaderboardFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ReqGetLeaderboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetLeaderboard {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'type': json['type'],
|
|
66
|
+
'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ReqGetLeaderboardToJSON(value?: ReqGetLeaderboard | null): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'type': value['type'],
|
|
77
|
+
'l1_address': value['l1_address'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
package/models/index.ts
CHANGED
|
@@ -25,6 +25,8 @@ export * from './Fundings';
|
|
|
25
25
|
export * from './L1ProviderInfo';
|
|
26
26
|
export * from './Layer1BasicInfo';
|
|
27
27
|
export * from './Layer2BasicInfo';
|
|
28
|
+
export * from './Leaderboard';
|
|
29
|
+
export * from './LeaderboardEntry';
|
|
28
30
|
export * from './Liquidation';
|
|
29
31
|
export * from './MarketInfo';
|
|
30
32
|
export * from './NextNonce';
|
|
@@ -61,6 +63,7 @@ export * from './ReqGetByAccount';
|
|
|
61
63
|
export * from './ReqGetCandlesticks';
|
|
62
64
|
export * from './ReqGetFundings';
|
|
63
65
|
export * from './ReqGetL1Tx';
|
|
66
|
+
export * from './ReqGetLeaderboard';
|
|
64
67
|
export * from './ReqGetNextNonce';
|
|
65
68
|
export * from './ReqGetOrderBookDetails';
|
|
66
69
|
export * from './ReqGetOrderBookOrders';
|
|
@@ -71,13 +74,10 @@ export * from './ReqGetRangeWithCursor';
|
|
|
71
74
|
export * from './ReqGetRangeWithIndex';
|
|
72
75
|
export * from './ReqGetRangeWithIndexSortable';
|
|
73
76
|
export * from './ReqGetRecentTrades';
|
|
74
|
-
export * from './ReqGetRollbacks';
|
|
75
77
|
export * from './ReqGetTrades';
|
|
76
78
|
export * from './ReqGetTx';
|
|
77
79
|
export * from './ReqMarkNotifRead';
|
|
78
80
|
export * from './ResultCode';
|
|
79
|
-
export * from './Rollback';
|
|
80
|
-
export * from './Rollbacks';
|
|
81
81
|
export * from './SimpleOrder';
|
|
82
82
|
export * from './Status';
|
|
83
83
|
export * from './SubAccounts';
|
package/openapi.json
CHANGED
|
@@ -922,6 +922,51 @@
|
|
|
922
922
|
"description": "Get zklighter general info, including contract address, and count of transactions and active users"
|
|
923
923
|
}
|
|
924
924
|
},
|
|
925
|
+
"/api/v1/leaderboard": {
|
|
926
|
+
"get": {
|
|
927
|
+
"summary": "leaderboard",
|
|
928
|
+
"operationId": "leaderboard",
|
|
929
|
+
"responses": {
|
|
930
|
+
"200": {
|
|
931
|
+
"description": "A successful response.",
|
|
932
|
+
"schema": {
|
|
933
|
+
"$ref": "#/definitions/Leaderboard"
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"400": {
|
|
937
|
+
"description": "Bad request",
|
|
938
|
+
"schema": {
|
|
939
|
+
"$ref": "#/definitions/ResultCode"
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
"parameters": [
|
|
944
|
+
{
|
|
945
|
+
"name": "type",
|
|
946
|
+
"in": "query",
|
|
947
|
+
"required": true,
|
|
948
|
+
"type": "string",
|
|
949
|
+
"enum": [
|
|
950
|
+
"weekly",
|
|
951
|
+
"all"
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"name": "l1_address",
|
|
956
|
+
"in": "query",
|
|
957
|
+
"required": false,
|
|
958
|
+
"type": "string"
|
|
959
|
+
}
|
|
960
|
+
],
|
|
961
|
+
"tags": [
|
|
962
|
+
"account"
|
|
963
|
+
],
|
|
964
|
+
"consumes": [
|
|
965
|
+
"multipart/form-data"
|
|
966
|
+
],
|
|
967
|
+
"description": "Get points leaderboard"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
925
970
|
"/api/v1/markNotifRead": {
|
|
926
971
|
"get": {
|
|
927
972
|
"summary": "markNotifRead",
|
|
@@ -1363,60 +1408,6 @@
|
|
|
1363
1408
|
"description": "Get recent trades"
|
|
1364
1409
|
}
|
|
1365
1410
|
},
|
|
1366
|
-
"/api/v1/rollbacks": {
|
|
1367
|
-
"get": {
|
|
1368
|
-
"summary": "rollbacks",
|
|
1369
|
-
"operationId": "rollbacks",
|
|
1370
|
-
"responses": {
|
|
1371
|
-
"200": {
|
|
1372
|
-
"description": "A successful response.",
|
|
1373
|
-
"schema": {
|
|
1374
|
-
"$ref": "#/definitions/Rollbacks"
|
|
1375
|
-
}
|
|
1376
|
-
},
|
|
1377
|
-
"400": {
|
|
1378
|
-
"description": "Bad request",
|
|
1379
|
-
"schema": {
|
|
1380
|
-
"$ref": "#/definitions/ResultCode"
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
},
|
|
1384
|
-
"parameters": [
|
|
1385
|
-
{
|
|
1386
|
-
"name": "from_block_height",
|
|
1387
|
-
"in": "query",
|
|
1388
|
-
"required": true,
|
|
1389
|
-
"type": "integer",
|
|
1390
|
-
"format": "int64"
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
"name": "offset",
|
|
1394
|
-
"in": "query",
|
|
1395
|
-
"required": true,
|
|
1396
|
-
"type": "integer",
|
|
1397
|
-
"format": "int32",
|
|
1398
|
-
"minimum": 0,
|
|
1399
|
-
"maximum": 100000
|
|
1400
|
-
},
|
|
1401
|
-
{
|
|
1402
|
-
"name": "limit",
|
|
1403
|
-
"in": "query",
|
|
1404
|
-
"required": true,
|
|
1405
|
-
"type": "integer",
|
|
1406
|
-
"format": "int64",
|
|
1407
|
-
"minimum": 1,
|
|
1408
|
-
"maximum": 100
|
|
1409
|
-
}
|
|
1410
|
-
],
|
|
1411
|
-
"tags": [
|
|
1412
|
-
"info"
|
|
1413
|
-
],
|
|
1414
|
-
"consumes": [
|
|
1415
|
-
"multipart/form-data"
|
|
1416
|
-
],
|
|
1417
|
-
"description": "Get rollbacks"
|
|
1418
|
-
}
|
|
1419
|
-
},
|
|
1420
1411
|
"/api/v1/sendTx": {
|
|
1421
1412
|
"post": {
|
|
1422
1413
|
"summary": "sendTx",
|
|
@@ -2769,6 +2760,51 @@
|
|
|
2769
2760
|
"total_transaction_count"
|
|
2770
2761
|
]
|
|
2771
2762
|
},
|
|
2763
|
+
"Leaderboard": {
|
|
2764
|
+
"type": "object",
|
|
2765
|
+
"properties": {
|
|
2766
|
+
"entries": {
|
|
2767
|
+
"type": "array",
|
|
2768
|
+
"items": {
|
|
2769
|
+
"$ref": "#/definitions/LeaderboardEntry"
|
|
2770
|
+
}
|
|
2771
|
+
},
|
|
2772
|
+
"week_start": {
|
|
2773
|
+
"type": "integer",
|
|
2774
|
+
"format": "int64",
|
|
2775
|
+
"example": "1730073600000"
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
"title": "Leaderboard",
|
|
2779
|
+
"required": [
|
|
2780
|
+
"entries",
|
|
2781
|
+
"week_start"
|
|
2782
|
+
]
|
|
2783
|
+
},
|
|
2784
|
+
"LeaderboardEntry": {
|
|
2785
|
+
"type": "object",
|
|
2786
|
+
"properties": {
|
|
2787
|
+
"l1_address": {
|
|
2788
|
+
"type": "string",
|
|
2789
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
2790
|
+
},
|
|
2791
|
+
"points": {
|
|
2792
|
+
"type": "integer",
|
|
2793
|
+
"format": "int64",
|
|
2794
|
+
"example": "1000"
|
|
2795
|
+
},
|
|
2796
|
+
"entry": {
|
|
2797
|
+
"type": "integer",
|
|
2798
|
+
"format": "int32"
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
"title": "LeaderboardEntry",
|
|
2802
|
+
"required": [
|
|
2803
|
+
"l1_address",
|
|
2804
|
+
"points",
|
|
2805
|
+
"entry"
|
|
2806
|
+
]
|
|
2807
|
+
},
|
|
2772
2808
|
"Liquidation": {
|
|
2773
2809
|
"type": "object",
|
|
2774
2810
|
"properties": {
|
|
@@ -4139,6 +4175,25 @@
|
|
|
4139
4175
|
"hash"
|
|
4140
4176
|
]
|
|
4141
4177
|
},
|
|
4178
|
+
"ReqGetLeaderboard": {
|
|
4179
|
+
"type": "object",
|
|
4180
|
+
"properties": {
|
|
4181
|
+
"type": {
|
|
4182
|
+
"type": "string",
|
|
4183
|
+
"enum": [
|
|
4184
|
+
"weekly",
|
|
4185
|
+
"all"
|
|
4186
|
+
]
|
|
4187
|
+
},
|
|
4188
|
+
"l1_address": {
|
|
4189
|
+
"type": "string"
|
|
4190
|
+
}
|
|
4191
|
+
},
|
|
4192
|
+
"title": "ReqGetLeaderboard",
|
|
4193
|
+
"required": [
|
|
4194
|
+
"type"
|
|
4195
|
+
]
|
|
4196
|
+
},
|
|
4142
4197
|
"ReqGetNextNonce": {
|
|
4143
4198
|
"type": "object",
|
|
4144
4199
|
"properties": {
|
|
@@ -4327,32 +4382,6 @@
|
|
|
4327
4382
|
"limit"
|
|
4328
4383
|
]
|
|
4329
4384
|
},
|
|
4330
|
-
"ReqGetRollbacks": {
|
|
4331
|
-
"type": "object",
|
|
4332
|
-
"properties": {
|
|
4333
|
-
"from_block_height": {
|
|
4334
|
-
"type": "integer",
|
|
4335
|
-
"format": "int64"
|
|
4336
|
-
},
|
|
4337
|
-
"offset": {
|
|
4338
|
-
"type": "integer",
|
|
4339
|
-
"format": "int32",
|
|
4340
|
-
"maximum": 100000
|
|
4341
|
-
},
|
|
4342
|
-
"limit": {
|
|
4343
|
-
"type": "integer",
|
|
4344
|
-
"format": "int64",
|
|
4345
|
-
"maximum": 100,
|
|
4346
|
-
"minimum": 1
|
|
4347
|
-
}
|
|
4348
|
-
},
|
|
4349
|
-
"title": "ReqGetRollbacks",
|
|
4350
|
-
"required": [
|
|
4351
|
-
"from_block_height",
|
|
4352
|
-
"offset",
|
|
4353
|
-
"limit"
|
|
4354
|
-
]
|
|
4355
|
-
},
|
|
4356
4385
|
"ReqGetTrades": {
|
|
4357
4386
|
"type": "object",
|
|
4358
4387
|
"properties": {
|
|
@@ -4539,68 +4568,6 @@
|
|
|
4539
4568
|
"code"
|
|
4540
4569
|
]
|
|
4541
4570
|
},
|
|
4542
|
-
"Rollback": {
|
|
4543
|
-
"type": "object",
|
|
4544
|
-
"properties": {
|
|
4545
|
-
"from_block_height": {
|
|
4546
|
-
"type": "integer",
|
|
4547
|
-
"format": "int64",
|
|
4548
|
-
"example": "45434"
|
|
4549
|
-
},
|
|
4550
|
-
"from_tx_sequence_index": {
|
|
4551
|
-
"type": "integer",
|
|
4552
|
-
"format": "int64",
|
|
4553
|
-
"example": "8761"
|
|
4554
|
-
},
|
|
4555
|
-
"id": {
|
|
4556
|
-
"type": "integer",
|
|
4557
|
-
"format": "uint32",
|
|
4558
|
-
"example": "1"
|
|
4559
|
-
},
|
|
4560
|
-
"created_at": {
|
|
4561
|
-
"type": "integer",
|
|
4562
|
-
"format": "int64",
|
|
4563
|
-
"example": "1640995200"
|
|
4564
|
-
}
|
|
4565
|
-
},
|
|
4566
|
-
"title": "Rollback",
|
|
4567
|
-
"required": [
|
|
4568
|
-
"from_block_height",
|
|
4569
|
-
"from_tx_sequence_index",
|
|
4570
|
-
"id",
|
|
4571
|
-
"created_at"
|
|
4572
|
-
]
|
|
4573
|
-
},
|
|
4574
|
-
"Rollbacks": {
|
|
4575
|
-
"type": "object",
|
|
4576
|
-
"properties": {
|
|
4577
|
-
"code": {
|
|
4578
|
-
"type": "integer",
|
|
4579
|
-
"format": "int32",
|
|
4580
|
-
"example": "200"
|
|
4581
|
-
},
|
|
4582
|
-
"message": {
|
|
4583
|
-
"type": "string"
|
|
4584
|
-
},
|
|
4585
|
-
"total": {
|
|
4586
|
-
"type": "integer",
|
|
4587
|
-
"format": "int64",
|
|
4588
|
-
"example": "1"
|
|
4589
|
-
},
|
|
4590
|
-
"rollbacks": {
|
|
4591
|
-
"type": "array",
|
|
4592
|
-
"items": {
|
|
4593
|
-
"$ref": "#/definitions/Rollback"
|
|
4594
|
-
}
|
|
4595
|
-
}
|
|
4596
|
-
},
|
|
4597
|
-
"title": "Rollbacks",
|
|
4598
|
-
"required": [
|
|
4599
|
-
"code",
|
|
4600
|
-
"total",
|
|
4601
|
-
"rollbacks"
|
|
4602
|
-
]
|
|
4603
|
-
},
|
|
4604
4571
|
"SimpleOrder": {
|
|
4605
4572
|
"type": "object",
|
|
4606
4573
|
"properties": {
|