zklighter-perps 1.0.76 → 1.0.78
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/AccountApi.ts +11 -8
- package/apis/BridgeApi.ts +113 -0
- package/apis/LiquidationApi.ts +9 -1
- package/apis/TransactionApi.ts +20 -16
- package/models/DepositHistoryItem.ts +13 -1
- package/models/ReqGetDepositHistory.ts +14 -3
- package/models/ReqGetPublicPools.ts +15 -3
- package/models/ReqGetWithdrawHistory.ts +14 -3
- package/models/RespGetFastwithdrawalInfo.ts +87 -0
- package/models/WithdrawHistoryItem.ts +13 -1
- package/models/index.ts +1 -0
- package/openapi.json +202 -36
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/AccountApi.ts
CHANGED
|
@@ -97,9 +97,9 @@ export interface PnlRequest {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export interface PublicPoolsRequest {
|
|
100
|
-
filter: string;
|
|
101
100
|
index: number;
|
|
102
101
|
limit: number;
|
|
102
|
+
filter?: PublicPoolsFilterEnum;
|
|
103
103
|
account_index?: number;
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -557,13 +557,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
557
557
|
* publicPools
|
|
558
558
|
*/
|
|
559
559
|
async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
|
|
560
|
-
if (requestParameters['filter'] == null) {
|
|
561
|
-
throw new runtime.RequiredError(
|
|
562
|
-
'filter',
|
|
563
|
-
'Required parameter "filter" was null or undefined when calling publicPools().'
|
|
564
|
-
);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
560
|
if (requestParameters['index'] == null) {
|
|
568
561
|
throw new runtime.RequiredError(
|
|
569
562
|
'index',
|
|
@@ -662,3 +655,13 @@ export const PnlResolutionEnum = {
|
|
|
662
655
|
_1d: '1d'
|
|
663
656
|
} as const;
|
|
664
657
|
export type PnlResolutionEnum = typeof PnlResolutionEnum[keyof typeof PnlResolutionEnum];
|
|
658
|
+
/**
|
|
659
|
+
* @export
|
|
660
|
+
*/
|
|
661
|
+
export const PublicPoolsFilterEnum = {
|
|
662
|
+
All: 'all',
|
|
663
|
+
User: 'user',
|
|
664
|
+
Protocol: 'protocol',
|
|
665
|
+
AccountIndex: 'account_index'
|
|
666
|
+
} as const;
|
|
667
|
+
export type PublicPoolsFilterEnum = typeof PublicPoolsFilterEnum[keyof typeof PublicPoolsFilterEnum];
|
package/apis/BridgeApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
BridgeSupportedNetworks,
|
|
19
19
|
CreateIntentAddressResp,
|
|
20
20
|
Deposit,
|
|
21
|
+
RespGetFastwithdrawalInfo,
|
|
21
22
|
ResultCode,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
@@ -27,6 +28,8 @@ import {
|
|
|
27
28
|
CreateIntentAddressRespToJSON,
|
|
28
29
|
DepositFromJSON,
|
|
29
30
|
DepositToJSON,
|
|
31
|
+
RespGetFastwithdrawalInfoFromJSON,
|
|
32
|
+
RespGetFastwithdrawalInfoToJSON,
|
|
30
33
|
ResultCodeFromJSON,
|
|
31
34
|
ResultCodeToJSON,
|
|
32
35
|
} from '../models/index';
|
|
@@ -47,6 +50,12 @@ export interface DepositLatestRequest {
|
|
|
47
50
|
l1_address: string;
|
|
48
51
|
}
|
|
49
52
|
|
|
53
|
+
export interface FastwithdrawRequest {
|
|
54
|
+
tx_info: string;
|
|
55
|
+
to_address: string;
|
|
56
|
+
auth: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
/**
|
|
51
60
|
*
|
|
52
61
|
*/
|
|
@@ -264,4 +273,108 @@ export class BridgeApi extends runtime.BaseAPI {
|
|
|
264
273
|
return await response.value();
|
|
265
274
|
}
|
|
266
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Fast withdraw
|
|
278
|
+
* fastwithdraw
|
|
279
|
+
*/
|
|
280
|
+
async fastwithdrawRaw(requestParameters: FastwithdrawRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
281
|
+
if (requestParameters['tx_info'] == null) {
|
|
282
|
+
throw new runtime.RequiredError(
|
|
283
|
+
'tx_info',
|
|
284
|
+
'Required parameter "tx_info" was null or undefined when calling fastwithdraw().'
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (requestParameters['to_address'] == null) {
|
|
289
|
+
throw new runtime.RequiredError(
|
|
290
|
+
'to_address',
|
|
291
|
+
'Required parameter "to_address" was null or undefined when calling fastwithdraw().'
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (requestParameters['auth'] == null) {
|
|
296
|
+
throw new runtime.RequiredError(
|
|
297
|
+
'auth',
|
|
298
|
+
'Required parameter "auth" was null or undefined when calling fastwithdraw().'
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const queryParameters: any = {};
|
|
303
|
+
|
|
304
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
305
|
+
|
|
306
|
+
const consumes: runtime.Consume[] = [
|
|
307
|
+
{ contentType: 'multipart/form-data' },
|
|
308
|
+
];
|
|
309
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
310
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
311
|
+
|
|
312
|
+
let formParams: { append(param: string, value: any): any };
|
|
313
|
+
let useForm = false;
|
|
314
|
+
if (useForm) {
|
|
315
|
+
formParams = new FormData();
|
|
316
|
+
} else {
|
|
317
|
+
formParams = new URLSearchParams();
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (requestParameters['tx_info'] != null) {
|
|
321
|
+
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (requestParameters['to_address'] != null) {
|
|
325
|
+
formParams.append('to_address', requestParameters['to_address'] as any);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (requestParameters['auth'] != null) {
|
|
329
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const response = await this.request({
|
|
333
|
+
path: `/api/v1/fastwithdraw`,
|
|
334
|
+
method: 'POST',
|
|
335
|
+
headers: headerParameters,
|
|
336
|
+
query: queryParameters,
|
|
337
|
+
body: formParams,
|
|
338
|
+
}, initOverrides);
|
|
339
|
+
|
|
340
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Fast withdraw
|
|
345
|
+
* fastwithdraw
|
|
346
|
+
*/
|
|
347
|
+
async fastwithdraw(requestParameters: FastwithdrawRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
348
|
+
const response = await this.fastwithdrawRaw(requestParameters, initOverrides);
|
|
349
|
+
return await response.value();
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Get fast withdraw info
|
|
354
|
+
* fastwithdraw_info
|
|
355
|
+
*/
|
|
356
|
+
async fastwithdrawInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetFastwithdrawalInfo>> {
|
|
357
|
+
const queryParameters: any = {};
|
|
358
|
+
|
|
359
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
360
|
+
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: `/api/v1/fastwithdraw/info`,
|
|
363
|
+
method: 'GET',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
}, initOverrides);
|
|
367
|
+
|
|
368
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetFastwithdrawalInfoFromJSON(jsonValue));
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Get fast withdraw info
|
|
373
|
+
* fastwithdraw_info
|
|
374
|
+
*/
|
|
375
|
+
async fastwithdrawInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetFastwithdrawalInfo> {
|
|
376
|
+
const response = await this.fastwithdrawInfoRaw(initOverrides);
|
|
377
|
+
return await response.value();
|
|
378
|
+
}
|
|
379
|
+
|
|
267
380
|
}
|
package/apis/LiquidationApi.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from '../models/index';
|
|
24
24
|
|
|
25
25
|
export interface MarkNotifReadRequest {
|
|
26
|
-
notif_type:
|
|
26
|
+
notif_type: MarkNotifReadNotifTypeEnum;
|
|
27
27
|
account_index: number;
|
|
28
28
|
api_key_index: number;
|
|
29
29
|
liquidation_ids: string;
|
|
@@ -134,3 +134,11 @@ export class LiquidationApi extends runtime.BaseAPI {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @export
|
|
140
|
+
*/
|
|
141
|
+
export const MarkNotifReadNotifTypeEnum = {
|
|
142
|
+
Liquidation: 'liquidation'
|
|
143
|
+
} as const;
|
|
144
|
+
export type MarkNotifReadNotifTypeEnum = typeof MarkNotifReadNotifTypeEnum[keyof typeof MarkNotifReadNotifTypeEnum];
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -64,8 +64,8 @@ export interface BlockTxsRequest {
|
|
|
64
64
|
|
|
65
65
|
export interface DepositHistoryRequest {
|
|
66
66
|
l1_address: string;
|
|
67
|
-
filter: string;
|
|
68
67
|
cursor?: string;
|
|
68
|
+
filter?: DepositHistoryFilterEnum;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export interface NextNonceRequest {
|
|
@@ -113,8 +113,8 @@ export interface TxsRequest {
|
|
|
113
113
|
|
|
114
114
|
export interface WithdrawHistoryRequest {
|
|
115
115
|
l1_address: string;
|
|
116
|
-
filter: string;
|
|
117
116
|
cursor?: string;
|
|
117
|
+
filter?: WithdrawHistoryFilterEnum;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/**
|
|
@@ -307,13 +307,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
307
307
|
);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
if (requestParameters['filter'] == null) {
|
|
311
|
-
throw new runtime.RequiredError(
|
|
312
|
-
'filter',
|
|
313
|
-
'Required parameter "filter" was null or undefined when calling depositHistory().'
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
310
|
const queryParameters: any = {};
|
|
318
311
|
|
|
319
312
|
if (requestParameters['l1_address'] != null) {
|
|
@@ -818,13 +811,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
818
811
|
);
|
|
819
812
|
}
|
|
820
813
|
|
|
821
|
-
if (requestParameters['filter'] == null) {
|
|
822
|
-
throw new runtime.RequiredError(
|
|
823
|
-
'filter',
|
|
824
|
-
'Required parameter "filter" was null or undefined when calling withdrawHistory().'
|
|
825
|
-
);
|
|
826
|
-
}
|
|
827
|
-
|
|
828
814
|
const queryParameters: any = {};
|
|
829
815
|
|
|
830
816
|
if (requestParameters['l1_address'] != null) {
|
|
@@ -884,6 +870,15 @@ export const BlockTxsByEnum = {
|
|
|
884
870
|
Commitment: 'block_commitment'
|
|
885
871
|
} as const;
|
|
886
872
|
export type BlockTxsByEnum = typeof BlockTxsByEnum[keyof typeof BlockTxsByEnum];
|
|
873
|
+
/**
|
|
874
|
+
* @export
|
|
875
|
+
*/
|
|
876
|
+
export const DepositHistoryFilterEnum = {
|
|
877
|
+
All: 'all',
|
|
878
|
+
Pending: 'pending',
|
|
879
|
+
Claimable: 'claimable'
|
|
880
|
+
} as const;
|
|
881
|
+
export type DepositHistoryFilterEnum = typeof DepositHistoryFilterEnum[keyof typeof DepositHistoryFilterEnum];
|
|
887
882
|
/**
|
|
888
883
|
* @export
|
|
889
884
|
*/
|
|
@@ -892,3 +887,12 @@ export const TxByEnum = {
|
|
|
892
887
|
SequenceIndex: 'sequence_index'
|
|
893
888
|
} as const;
|
|
894
889
|
export type TxByEnum = typeof TxByEnum[keyof typeof TxByEnum];
|
|
890
|
+
/**
|
|
891
|
+
* @export
|
|
892
|
+
*/
|
|
893
|
+
export const WithdrawHistoryFilterEnum = {
|
|
894
|
+
All: 'all',
|
|
895
|
+
Pending: 'pending',
|
|
896
|
+
Claimable: 'claimable'
|
|
897
|
+
} as const;
|
|
898
|
+
export type WithdrawHistoryFilterEnum = typeof WithdrawHistoryFilterEnum[keyof typeof WithdrawHistoryFilterEnum];
|
|
@@ -42,9 +42,21 @@ export interface DepositHistoryItem {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof DepositHistoryItem
|
|
44
44
|
*/
|
|
45
|
-
status:
|
|
45
|
+
status: DepositHistoryItemStatusEnum;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const DepositHistoryItemStatusEnum = {
|
|
53
|
+
Failed: 'failed',
|
|
54
|
+
Pending: 'pending',
|
|
55
|
+
Completed: 'completed'
|
|
56
|
+
} as const;
|
|
57
|
+
export type DepositHistoryItemStatusEnum = typeof DepositHistoryItemStatusEnum[keyof typeof DepositHistoryItemStatusEnum];
|
|
58
|
+
|
|
59
|
+
|
|
48
60
|
/**
|
|
49
61
|
* Check if a given object implements the DepositHistoryItem interface.
|
|
50
62
|
*/
|
|
@@ -36,15 +36,26 @@ export interface ReqGetDepositHistory {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof ReqGetDepositHistory
|
|
38
38
|
*/
|
|
39
|
-
filter
|
|
39
|
+
filter?: ReqGetDepositHistoryFilterEnum;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const ReqGetDepositHistoryFilterEnum = {
|
|
47
|
+
All: 'all',
|
|
48
|
+
Pending: 'pending',
|
|
49
|
+
Claimable: 'claimable'
|
|
50
|
+
} as const;
|
|
51
|
+
export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEnum[keyof typeof ReqGetDepositHistoryFilterEnum];
|
|
52
|
+
|
|
53
|
+
|
|
42
54
|
/**
|
|
43
55
|
* Check if a given object implements the ReqGetDepositHistory interface.
|
|
44
56
|
*/
|
|
45
57
|
export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
|
|
46
58
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
47
|
-
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
48
59
|
return true;
|
|
49
60
|
}
|
|
50
61
|
|
|
@@ -60,7 +71,7 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
60
71
|
|
|
61
72
|
'l1_address': json['l1_address'],
|
|
62
73
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
63
|
-
'filter': json['filter'],
|
|
74
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
|
|
@@ -24,7 +24,7 @@ export interface ReqGetPublicPools {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetPublicPools
|
|
26
26
|
*/
|
|
27
|
-
filter
|
|
27
|
+
filter?: ReqGetPublicPoolsFilterEnum;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
@@ -45,11 +45,23 @@ export interface ReqGetPublicPools {
|
|
|
45
45
|
account_index?: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const ReqGetPublicPoolsFilterEnum = {
|
|
53
|
+
All: 'all',
|
|
54
|
+
User: 'user',
|
|
55
|
+
Protocol: 'protocol',
|
|
56
|
+
AccountIndex: 'account_index'
|
|
57
|
+
} as const;
|
|
58
|
+
export type ReqGetPublicPoolsFilterEnum = typeof ReqGetPublicPoolsFilterEnum[keyof typeof ReqGetPublicPoolsFilterEnum];
|
|
59
|
+
|
|
60
|
+
|
|
48
61
|
/**
|
|
49
62
|
* Check if a given object implements the ReqGetPublicPools interface.
|
|
50
63
|
*/
|
|
51
64
|
export function instanceOfReqGetPublicPools(value: object): value is ReqGetPublicPools {
|
|
52
|
-
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
53
65
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
54
66
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
55
67
|
return true;
|
|
@@ -65,7 +77,7 @@ export function ReqGetPublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
65
77
|
}
|
|
66
78
|
return {
|
|
67
79
|
|
|
68
|
-
'filter': json['filter'],
|
|
80
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
69
81
|
'index': json['index'],
|
|
70
82
|
'limit': json['limit'],
|
|
71
83
|
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
@@ -36,15 +36,26 @@ export interface ReqGetWithdrawHistory {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof ReqGetWithdrawHistory
|
|
38
38
|
*/
|
|
39
|
-
filter
|
|
39
|
+
filter?: ReqGetWithdrawHistoryFilterEnum;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const ReqGetWithdrawHistoryFilterEnum = {
|
|
47
|
+
All: 'all',
|
|
48
|
+
Pending: 'pending',
|
|
49
|
+
Claimable: 'claimable'
|
|
50
|
+
} as const;
|
|
51
|
+
export type ReqGetWithdrawHistoryFilterEnum = typeof ReqGetWithdrawHistoryFilterEnum[keyof typeof ReqGetWithdrawHistoryFilterEnum];
|
|
52
|
+
|
|
53
|
+
|
|
42
54
|
/**
|
|
43
55
|
* Check if a given object implements the ReqGetWithdrawHistory interface.
|
|
44
56
|
*/
|
|
45
57
|
export function instanceOfReqGetWithdrawHistory(value: object): value is ReqGetWithdrawHistory {
|
|
46
58
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
47
|
-
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
48
59
|
return true;
|
|
49
60
|
}
|
|
50
61
|
|
|
@@ -60,7 +71,7 @@ export function ReqGetWithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
60
71
|
|
|
61
72
|
'l1_address': json['l1_address'],
|
|
62
73
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
63
|
-
'filter': json['filter'],
|
|
74
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
|
|
@@ -0,0 +1,87 @@
|
|
|
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 RespGetFastwithdrawalInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface RespGetFastwithdrawalInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespGetFastwithdrawalInfo
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RespGetFastwithdrawalInfo
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof RespGetFastwithdrawalInfo
|
|
38
|
+
*/
|
|
39
|
+
to_account_index: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof RespGetFastwithdrawalInfo
|
|
44
|
+
*/
|
|
45
|
+
withdraw_limit: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the RespGetFastwithdrawalInfo interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfRespGetFastwithdrawalInfo(value: object): value is RespGetFastwithdrawalInfo {
|
|
52
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
53
|
+
if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false;
|
|
54
|
+
if (!('withdraw_limit' in value) || value['withdraw_limit'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function RespGetFastwithdrawalInfoFromJSON(json: any): RespGetFastwithdrawalInfo {
|
|
59
|
+
return RespGetFastwithdrawalInfoFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RespGetFastwithdrawalInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetFastwithdrawalInfo {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'to_account_index': json['to_account_index'],
|
|
71
|
+
'withdraw_limit': json['withdraw_limit'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function RespGetFastwithdrawalInfoToJSON(value?: RespGetFastwithdrawalInfo | null): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'code': value['code'],
|
|
82
|
+
'message': value['message'],
|
|
83
|
+
'to_account_index': value['to_account_index'],
|
|
84
|
+
'withdraw_limit': value['withdraw_limit'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -42,9 +42,21 @@ export interface WithdrawHistoryItem {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof WithdrawHistoryItem
|
|
44
44
|
*/
|
|
45
|
-
status:
|
|
45
|
+
status: WithdrawHistoryItemStatusEnum;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const WithdrawHistoryItemStatusEnum = {
|
|
53
|
+
Failed: 'failed',
|
|
54
|
+
Pending: 'pending',
|
|
55
|
+
Claimable: 'claimable'
|
|
56
|
+
} as const;
|
|
57
|
+
export type WithdrawHistoryItemStatusEnum = typeof WithdrawHistoryItemStatusEnum[keyof typeof WithdrawHistoryItemStatusEnum];
|
|
58
|
+
|
|
59
|
+
|
|
48
60
|
/**
|
|
49
61
|
* Check if a given object implements the WithdrawHistoryItem interface.
|
|
50
62
|
*/
|
package/models/index.ts
CHANGED
|
@@ -88,6 +88,7 @@ export * from './ReqGetTrades';
|
|
|
88
88
|
export * from './ReqGetTx';
|
|
89
89
|
export * from './ReqGetWithdrawHistory';
|
|
90
90
|
export * from './ReqIsWhitelisted';
|
|
91
|
+
export * from './RespGetFastwithdrawalInfo';
|
|
91
92
|
export * from './ResultCode';
|
|
92
93
|
export * from './SimpleOrder';
|
|
93
94
|
export * from './Status';
|
package/openapi.json
CHANGED
|
@@ -164,14 +164,16 @@
|
|
|
164
164
|
"in": "query",
|
|
165
165
|
"required": false,
|
|
166
166
|
"type": "integer",
|
|
167
|
-
"format": "uint8"
|
|
167
|
+
"format": "uint8",
|
|
168
|
+
"default": "255"
|
|
168
169
|
},
|
|
169
170
|
{
|
|
170
171
|
"name": "ask_filter",
|
|
171
172
|
"in": "query",
|
|
172
173
|
"required": false,
|
|
173
174
|
"type": "integer",
|
|
174
|
-
"format": "int8"
|
|
175
|
+
"format": "int8",
|
|
176
|
+
"default": "-1"
|
|
175
177
|
},
|
|
176
178
|
{
|
|
177
179
|
"name": "cursor",
|
|
@@ -502,7 +504,8 @@
|
|
|
502
504
|
"in": "query",
|
|
503
505
|
"required": true,
|
|
504
506
|
"type": "integer",
|
|
505
|
-
"format": "uint8"
|
|
507
|
+
"format": "uint8",
|
|
508
|
+
"default": "255"
|
|
506
509
|
}
|
|
507
510
|
],
|
|
508
511
|
"tags": [
|
|
@@ -871,8 +874,13 @@
|
|
|
871
874
|
{
|
|
872
875
|
"name": "filter",
|
|
873
876
|
"in": "query",
|
|
874
|
-
"required":
|
|
875
|
-
"type": "string"
|
|
877
|
+
"required": false,
|
|
878
|
+
"type": "string",
|
|
879
|
+
"enum": [
|
|
880
|
+
"all",
|
|
881
|
+
"pending",
|
|
882
|
+
"claimable"
|
|
883
|
+
]
|
|
876
884
|
}
|
|
877
885
|
],
|
|
878
886
|
"tags": [
|
|
@@ -967,6 +975,67 @@
|
|
|
967
975
|
"description": "Get exchange stats"
|
|
968
976
|
}
|
|
969
977
|
},
|
|
978
|
+
"/api/v1/fastwithdraw": {
|
|
979
|
+
"post": {
|
|
980
|
+
"summary": "fastwithdraw",
|
|
981
|
+
"operationId": "fastwithdraw",
|
|
982
|
+
"responses": {
|
|
983
|
+
"200": {
|
|
984
|
+
"description": "A successful response.",
|
|
985
|
+
"schema": {
|
|
986
|
+
"$ref": "#/definitions/ResultCode"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"400": {
|
|
990
|
+
"description": "Bad request",
|
|
991
|
+
"schema": {
|
|
992
|
+
"$ref": "#/definitions/ResultCode"
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"parameters": [
|
|
997
|
+
{
|
|
998
|
+
"name": "body",
|
|
999
|
+
"in": "body",
|
|
1000
|
+
"required": true,
|
|
1001
|
+
"schema": {
|
|
1002
|
+
"$ref": "#/definitions/ReqFastwithdraw"
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
],
|
|
1006
|
+
"tags": [
|
|
1007
|
+
"bridge"
|
|
1008
|
+
],
|
|
1009
|
+
"consumes": [
|
|
1010
|
+
"multipart/form-data"
|
|
1011
|
+
],
|
|
1012
|
+
"description": "Fast withdraw"
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
"/api/v1/fastwithdraw/info": {
|
|
1016
|
+
"get": {
|
|
1017
|
+
"summary": "fastwithdraw_info",
|
|
1018
|
+
"operationId": "fastwithdraw_info",
|
|
1019
|
+
"responses": {
|
|
1020
|
+
"200": {
|
|
1021
|
+
"description": "A successful response.",
|
|
1022
|
+
"schema": {
|
|
1023
|
+
"$ref": "#/definitions/RespGetFastwithdrawalInfo"
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"400": {
|
|
1027
|
+
"description": "Bad request",
|
|
1028
|
+
"schema": {
|
|
1029
|
+
"$ref": "#/definitions/ResultCode"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
"tags": [
|
|
1034
|
+
"bridge"
|
|
1035
|
+
],
|
|
1036
|
+
"description": "Get fast withdraw info"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
970
1039
|
"/api/v1/faucet": {
|
|
971
1040
|
"get": {
|
|
972
1041
|
"summary": "faucet",
|
|
@@ -1336,7 +1405,8 @@
|
|
|
1336
1405
|
"in": "query",
|
|
1337
1406
|
"required": false,
|
|
1338
1407
|
"type": "integer",
|
|
1339
|
-
"format": "uint8"
|
|
1408
|
+
"format": "uint8",
|
|
1409
|
+
"default": "255"
|
|
1340
1410
|
}
|
|
1341
1411
|
],
|
|
1342
1412
|
"tags": [
|
|
@@ -1417,7 +1487,8 @@
|
|
|
1417
1487
|
"in": "query",
|
|
1418
1488
|
"required": false,
|
|
1419
1489
|
"type": "integer",
|
|
1420
|
-
"format": "uint8"
|
|
1490
|
+
"format": "uint8",
|
|
1491
|
+
"default": "255"
|
|
1421
1492
|
}
|
|
1422
1493
|
],
|
|
1423
1494
|
"tags": [
|
|
@@ -1583,8 +1654,14 @@
|
|
|
1583
1654
|
{
|
|
1584
1655
|
"name": "filter",
|
|
1585
1656
|
"in": "query",
|
|
1586
|
-
"required":
|
|
1587
|
-
"type": "string"
|
|
1657
|
+
"required": false,
|
|
1658
|
+
"type": "string",
|
|
1659
|
+
"enum": [
|
|
1660
|
+
"all",
|
|
1661
|
+
"user",
|
|
1662
|
+
"protocol",
|
|
1663
|
+
"account_index"
|
|
1664
|
+
]
|
|
1588
1665
|
},
|
|
1589
1666
|
{
|
|
1590
1667
|
"name": "index",
|
|
@@ -1799,14 +1876,16 @@
|
|
|
1799
1876
|
"in": "query",
|
|
1800
1877
|
"required": false,
|
|
1801
1878
|
"type": "integer",
|
|
1802
|
-
"format": "uint8"
|
|
1879
|
+
"format": "uint8",
|
|
1880
|
+
"default": "255"
|
|
1803
1881
|
},
|
|
1804
1882
|
{
|
|
1805
1883
|
"name": "account_index",
|
|
1806
1884
|
"in": "query",
|
|
1807
1885
|
"required": false,
|
|
1808
1886
|
"type": "integer",
|
|
1809
|
-
"format": "int64"
|
|
1887
|
+
"format": "int64",
|
|
1888
|
+
"default": "-1"
|
|
1810
1889
|
},
|
|
1811
1890
|
{
|
|
1812
1891
|
"name": "order_index",
|
|
@@ -1848,14 +1927,16 @@
|
|
|
1848
1927
|
"in": "query",
|
|
1849
1928
|
"required": false,
|
|
1850
1929
|
"type": "integer",
|
|
1851
|
-
"format": "int64"
|
|
1930
|
+
"format": "int64",
|
|
1931
|
+
"default": "-1"
|
|
1852
1932
|
},
|
|
1853
1933
|
{
|
|
1854
1934
|
"name": "ask_filter",
|
|
1855
1935
|
"in": "query",
|
|
1856
1936
|
"required": false,
|
|
1857
1937
|
"type": "integer",
|
|
1858
|
-
"format": "int8"
|
|
1938
|
+
"format": "int8",
|
|
1939
|
+
"default": "-1"
|
|
1859
1940
|
},
|
|
1860
1941
|
{
|
|
1861
1942
|
"name": "limit",
|
|
@@ -2035,8 +2116,13 @@
|
|
|
2035
2116
|
{
|
|
2036
2117
|
"name": "filter",
|
|
2037
2118
|
"in": "query",
|
|
2038
|
-
"required":
|
|
2039
|
-
"type": "string"
|
|
2119
|
+
"required": false,
|
|
2120
|
+
"type": "string",
|
|
2121
|
+
"enum": [
|
|
2122
|
+
"all",
|
|
2123
|
+
"pending",
|
|
2124
|
+
"claimable"
|
|
2125
|
+
]
|
|
2040
2126
|
}
|
|
2041
2127
|
],
|
|
2042
2128
|
"tags": [
|
|
@@ -2826,7 +2912,11 @@
|
|
|
2826
2912
|
},
|
|
2827
2913
|
"status": {
|
|
2828
2914
|
"type": "string",
|
|
2829
|
-
"
|
|
2915
|
+
"enum": [
|
|
2916
|
+
"failed",
|
|
2917
|
+
"pending",
|
|
2918
|
+
"completed"
|
|
2919
|
+
]
|
|
2830
2920
|
}
|
|
2831
2921
|
},
|
|
2832
2922
|
"title": "DepositHistoryItem",
|
|
@@ -4532,6 +4622,26 @@
|
|
|
4532
4622
|
"l1_address"
|
|
4533
4623
|
]
|
|
4534
4624
|
},
|
|
4625
|
+
"ReqFastwithdraw": {
|
|
4626
|
+
"type": "object",
|
|
4627
|
+
"properties": {
|
|
4628
|
+
"tx_info": {
|
|
4629
|
+
"type": "string"
|
|
4630
|
+
},
|
|
4631
|
+
"to_address": {
|
|
4632
|
+
"type": "string"
|
|
4633
|
+
},
|
|
4634
|
+
"auth": {
|
|
4635
|
+
"type": "string"
|
|
4636
|
+
}
|
|
4637
|
+
},
|
|
4638
|
+
"title": "ReqFastwithdraw",
|
|
4639
|
+
"required": [
|
|
4640
|
+
"tx_info",
|
|
4641
|
+
"to_address",
|
|
4642
|
+
"auth"
|
|
4643
|
+
]
|
|
4644
|
+
},
|
|
4535
4645
|
"ReqGetAccount": {
|
|
4536
4646
|
"type": "object",
|
|
4537
4647
|
"properties": {
|
|
@@ -4583,7 +4693,8 @@
|
|
|
4583
4693
|
},
|
|
4584
4694
|
"api_key_index": {
|
|
4585
4695
|
"type": "integer",
|
|
4586
|
-
"format": "uint8"
|
|
4696
|
+
"format": "uint8",
|
|
4697
|
+
"default": "255"
|
|
4587
4698
|
}
|
|
4588
4699
|
},
|
|
4589
4700
|
"title": "ReqGetAccountApiKeys",
|
|
@@ -4613,11 +4724,13 @@
|
|
|
4613
4724
|
},
|
|
4614
4725
|
"market_id": {
|
|
4615
4726
|
"type": "integer",
|
|
4616
|
-
"format": "uint8"
|
|
4727
|
+
"format": "uint8",
|
|
4728
|
+
"default": "255"
|
|
4617
4729
|
},
|
|
4618
4730
|
"ask_filter": {
|
|
4619
4731
|
"type": "integer",
|
|
4620
|
-
"format": "int8"
|
|
4732
|
+
"format": "int8",
|
|
4733
|
+
"default": "-1"
|
|
4621
4734
|
},
|
|
4622
4735
|
"cursor": {
|
|
4623
4736
|
"type": "string"
|
|
@@ -4882,13 +4995,17 @@
|
|
|
4882
4995
|
"type": "string"
|
|
4883
4996
|
},
|
|
4884
4997
|
"filter": {
|
|
4885
|
-
"type": "string"
|
|
4998
|
+
"type": "string",
|
|
4999
|
+
"enum": [
|
|
5000
|
+
"all",
|
|
5001
|
+
"pending",
|
|
5002
|
+
"claimable"
|
|
5003
|
+
]
|
|
4886
5004
|
}
|
|
4887
5005
|
},
|
|
4888
5006
|
"title": "ReqGetDepositHistory",
|
|
4889
5007
|
"required": [
|
|
4890
|
-
"l1_address"
|
|
4891
|
-
"filter"
|
|
5008
|
+
"l1_address"
|
|
4892
5009
|
]
|
|
4893
5010
|
},
|
|
4894
5011
|
"ReqGetExchangeStats": {
|
|
@@ -5009,7 +5126,8 @@
|
|
|
5009
5126
|
"properties": {
|
|
5010
5127
|
"market_id": {
|
|
5011
5128
|
"type": "integer",
|
|
5012
|
-
"format": "uint8"
|
|
5129
|
+
"format": "uint8",
|
|
5130
|
+
"default": "255"
|
|
5013
5131
|
}
|
|
5014
5132
|
},
|
|
5015
5133
|
"title": "ReqGetOrderBookDetails"
|
|
@@ -5039,7 +5157,8 @@
|
|
|
5039
5157
|
"properties": {
|
|
5040
5158
|
"market_id": {
|
|
5041
5159
|
"type": "integer",
|
|
5042
|
-
"format": "uint8"
|
|
5160
|
+
"format": "uint8",
|
|
5161
|
+
"default": "255"
|
|
5043
5162
|
}
|
|
5044
5163
|
},
|
|
5045
5164
|
"title": "ReqGetOrderBooks"
|
|
@@ -5048,7 +5167,13 @@
|
|
|
5048
5167
|
"type": "object",
|
|
5049
5168
|
"properties": {
|
|
5050
5169
|
"filter": {
|
|
5051
|
-
"type": "string"
|
|
5170
|
+
"type": "string",
|
|
5171
|
+
"enum": [
|
|
5172
|
+
"all",
|
|
5173
|
+
"user",
|
|
5174
|
+
"protocol",
|
|
5175
|
+
"account_index"
|
|
5176
|
+
]
|
|
5052
5177
|
},
|
|
5053
5178
|
"index": {
|
|
5054
5179
|
"type": "integer",
|
|
@@ -5067,7 +5192,6 @@
|
|
|
5067
5192
|
},
|
|
5068
5193
|
"title": "ReqGetPublicPools",
|
|
5069
5194
|
"required": [
|
|
5070
|
-
"filter",
|
|
5071
5195
|
"index",
|
|
5072
5196
|
"limit"
|
|
5073
5197
|
]
|
|
@@ -5158,11 +5282,13 @@
|
|
|
5158
5282
|
"properties": {
|
|
5159
5283
|
"market_id": {
|
|
5160
5284
|
"type": "integer",
|
|
5161
|
-
"format": "uint8"
|
|
5285
|
+
"format": "uint8",
|
|
5286
|
+
"default": "255"
|
|
5162
5287
|
},
|
|
5163
5288
|
"account_index": {
|
|
5164
5289
|
"type": "integer",
|
|
5165
|
-
"format": "int64"
|
|
5290
|
+
"format": "int64",
|
|
5291
|
+
"default": "-1"
|
|
5166
5292
|
},
|
|
5167
5293
|
"order_index": {
|
|
5168
5294
|
"type": "integer",
|
|
@@ -5189,11 +5315,13 @@
|
|
|
5189
5315
|
},
|
|
5190
5316
|
"from": {
|
|
5191
5317
|
"type": "integer",
|
|
5192
|
-
"format": "int64"
|
|
5318
|
+
"format": "int64",
|
|
5319
|
+
"default": "-1"
|
|
5193
5320
|
},
|
|
5194
5321
|
"ask_filter": {
|
|
5195
5322
|
"type": "integer",
|
|
5196
|
-
"format": "int8"
|
|
5323
|
+
"format": "int8",
|
|
5324
|
+
"default": "-1"
|
|
5197
5325
|
},
|
|
5198
5326
|
"limit": {
|
|
5199
5327
|
"type": "integer",
|
|
@@ -5238,13 +5366,17 @@
|
|
|
5238
5366
|
"type": "string"
|
|
5239
5367
|
},
|
|
5240
5368
|
"filter": {
|
|
5241
|
-
"type": "string"
|
|
5369
|
+
"type": "string",
|
|
5370
|
+
"enum": [
|
|
5371
|
+
"all",
|
|
5372
|
+
"pending",
|
|
5373
|
+
"claimable"
|
|
5374
|
+
]
|
|
5242
5375
|
}
|
|
5243
5376
|
},
|
|
5244
5377
|
"title": "ReqGetWithdrawHistory",
|
|
5245
5378
|
"required": [
|
|
5246
|
-
"l1_address"
|
|
5247
|
-
"filter"
|
|
5379
|
+
"l1_address"
|
|
5248
5380
|
]
|
|
5249
5381
|
},
|
|
5250
5382
|
"ReqIsWhitelisted": {
|
|
@@ -5263,7 +5395,10 @@
|
|
|
5263
5395
|
"type": "object",
|
|
5264
5396
|
"properties": {
|
|
5265
5397
|
"notif_type": {
|
|
5266
|
-
"type": "string"
|
|
5398
|
+
"type": "string",
|
|
5399
|
+
"enum": [
|
|
5400
|
+
"liquidation"
|
|
5401
|
+
]
|
|
5267
5402
|
},
|
|
5268
5403
|
"account_index": {
|
|
5269
5404
|
"type": "integer",
|
|
@@ -5301,7 +5436,8 @@
|
|
|
5301
5436
|
},
|
|
5302
5437
|
"price_protection": {
|
|
5303
5438
|
"type": "boolean",
|
|
5304
|
-
"format": "boolean"
|
|
5439
|
+
"format": "boolean",
|
|
5440
|
+
"default": "true"
|
|
5305
5441
|
}
|
|
5306
5442
|
},
|
|
5307
5443
|
"title": "ReqSendTx",
|
|
@@ -5357,6 +5493,32 @@
|
|
|
5357
5493
|
"auth"
|
|
5358
5494
|
]
|
|
5359
5495
|
},
|
|
5496
|
+
"RespGetFastwithdrawalInfo": {
|
|
5497
|
+
"type": "object",
|
|
5498
|
+
"properties": {
|
|
5499
|
+
"code": {
|
|
5500
|
+
"type": "integer",
|
|
5501
|
+
"format": "int32",
|
|
5502
|
+
"example": "200"
|
|
5503
|
+
},
|
|
5504
|
+
"message": {
|
|
5505
|
+
"type": "string"
|
|
5506
|
+
},
|
|
5507
|
+
"to_account_index": {
|
|
5508
|
+
"type": "integer",
|
|
5509
|
+
"format": "int64"
|
|
5510
|
+
},
|
|
5511
|
+
"withdraw_limit": {
|
|
5512
|
+
"type": "string"
|
|
5513
|
+
}
|
|
5514
|
+
},
|
|
5515
|
+
"title": "RespGetFastwithdrawalInfo",
|
|
5516
|
+
"required": [
|
|
5517
|
+
"code",
|
|
5518
|
+
"to_account_index",
|
|
5519
|
+
"withdraw_limit"
|
|
5520
|
+
]
|
|
5521
|
+
},
|
|
5360
5522
|
"ResultCode": {
|
|
5361
5523
|
"type": "object",
|
|
5362
5524
|
"properties": {
|
|
@@ -5834,7 +5996,11 @@
|
|
|
5834
5996
|
},
|
|
5835
5997
|
"status": {
|
|
5836
5998
|
"type": "string",
|
|
5837
|
-
"
|
|
5999
|
+
"enum": [
|
|
6000
|
+
"failed",
|
|
6001
|
+
"pending",
|
|
6002
|
+
"claimable"
|
|
6003
|
+
]
|
|
5838
6004
|
}
|
|
5839
6005
|
},
|
|
5840
6006
|
"title": "WithdrawHistoryItem",
|