zklighter-perps 1.0.78 → 1.0.80
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/apis/TransactionApi.ts +12 -12
- package/models/ReqGetDepositHistory.ts +5 -5
- package/models/ReqGetWithdrawHistory.ts +5 -5
- package/models/WithdrawHistoryItem.ts +21 -1
- package/openapi.json +26 -12
- package/package.json +1 -1
package/apis/TransactionApi.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface BlockTxsRequest {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export interface DepositHistoryRequest {
|
|
66
|
-
|
|
66
|
+
account_index: number;
|
|
67
67
|
cursor?: string;
|
|
68
68
|
filter?: DepositHistoryFilterEnum;
|
|
69
69
|
}
|
|
@@ -112,7 +112,7 @@ export interface TxsRequest {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
export interface WithdrawHistoryRequest {
|
|
115
|
-
|
|
115
|
+
account_index: number;
|
|
116
116
|
cursor?: string;
|
|
117
117
|
filter?: WithdrawHistoryFilterEnum;
|
|
118
118
|
}
|
|
@@ -300,17 +300,17 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
300
300
|
* deposit_history
|
|
301
301
|
*/
|
|
302
302
|
async depositHistoryRaw(requestParameters: DepositHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositHistory>> {
|
|
303
|
-
if (requestParameters['
|
|
303
|
+
if (requestParameters['account_index'] == null) {
|
|
304
304
|
throw new runtime.RequiredError(
|
|
305
|
-
'
|
|
306
|
-
'Required parameter "
|
|
305
|
+
'account_index',
|
|
306
|
+
'Required parameter "account_index" was null or undefined when calling depositHistory().'
|
|
307
307
|
);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
const queryParameters: any = {};
|
|
311
311
|
|
|
312
|
-
if (requestParameters['
|
|
313
|
-
queryParameters['
|
|
312
|
+
if (requestParameters['account_index'] != null) {
|
|
313
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
if (requestParameters['cursor'] != null) {
|
|
@@ -804,17 +804,17 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
804
804
|
* withdraw_history
|
|
805
805
|
*/
|
|
806
806
|
async withdrawHistoryRaw(requestParameters: WithdrawHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WithdrawHistory>> {
|
|
807
|
-
if (requestParameters['
|
|
807
|
+
if (requestParameters['account_index'] == null) {
|
|
808
808
|
throw new runtime.RequiredError(
|
|
809
|
-
'
|
|
810
|
-
'Required parameter "
|
|
809
|
+
'account_index',
|
|
810
|
+
'Required parameter "account_index" was null or undefined when calling withdrawHistory().'
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
const queryParameters: any = {};
|
|
815
815
|
|
|
816
|
-
if (requestParameters['
|
|
817
|
-
queryParameters['
|
|
816
|
+
if (requestParameters['account_index'] != null) {
|
|
817
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
if (requestParameters['cursor'] != null) {
|
|
@@ -21,10 +21,10 @@ import { mapValues } from '../runtime';
|
|
|
21
21
|
export interface ReqGetDepositHistory {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @type {
|
|
24
|
+
* @type {number}
|
|
25
25
|
* @memberof ReqGetDepositHistory
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
account_index: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -55,7 +55,7 @@ export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEn
|
|
|
55
55
|
* Check if a given object implements the ReqGetDepositHistory interface.
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
|
|
58
|
-
if (!('
|
|
58
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
69
69
|
}
|
|
70
70
|
return {
|
|
71
71
|
|
|
72
|
-
'
|
|
72
|
+
'account_index': json['account_index'],
|
|
73
73
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
74
74
|
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
75
75
|
};
|
|
@@ -81,7 +81,7 @@ export function ReqGetDepositHistoryToJSON(value?: ReqGetDepositHistory | null):
|
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
|
-
'
|
|
84
|
+
'account_index': value['account_index'],
|
|
85
85
|
'cursor': value['cursor'],
|
|
86
86
|
'filter': value['filter'],
|
|
87
87
|
};
|
|
@@ -21,10 +21,10 @@ import { mapValues } from '../runtime';
|
|
|
21
21
|
export interface ReqGetWithdrawHistory {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @type {
|
|
24
|
+
* @type {number}
|
|
25
25
|
* @memberof ReqGetWithdrawHistory
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
account_index: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -55,7 +55,7 @@ export type ReqGetWithdrawHistoryFilterEnum = typeof ReqGetWithdrawHistoryFilter
|
|
|
55
55
|
* Check if a given object implements the ReqGetWithdrawHistory interface.
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfReqGetWithdrawHistory(value: object): value is ReqGetWithdrawHistory {
|
|
58
|
-
if (!('
|
|
58
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ export function ReqGetWithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
69
69
|
}
|
|
70
70
|
return {
|
|
71
71
|
|
|
72
|
-
'
|
|
72
|
+
'account_index': json['account_index'],
|
|
73
73
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
74
74
|
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
75
75
|
};
|
|
@@ -81,7 +81,7 @@ export function ReqGetWithdrawHistoryToJSON(value?: ReqGetWithdrawHistory | null
|
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
|
-
'
|
|
84
|
+
'account_index': value['account_index'],
|
|
85
85
|
'cursor': value['cursor'],
|
|
86
86
|
'filter': value['filter'],
|
|
87
87
|
};
|
|
@@ -43,6 +43,12 @@ export interface WithdrawHistoryItem {
|
|
|
43
43
|
* @memberof WithdrawHistoryItem
|
|
44
44
|
*/
|
|
45
45
|
status: WithdrawHistoryItemStatusEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof WithdrawHistoryItem
|
|
50
|
+
*/
|
|
51
|
+
type: WithdrawHistoryItemTypeEnum;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
|
|
@@ -52,10 +58,21 @@ export interface WithdrawHistoryItem {
|
|
|
52
58
|
export const WithdrawHistoryItemStatusEnum = {
|
|
53
59
|
Failed: 'failed',
|
|
54
60
|
Pending: 'pending',
|
|
55
|
-
Claimable: 'claimable'
|
|
61
|
+
Claimable: 'claimable',
|
|
62
|
+
Refunded: 'refunded',
|
|
63
|
+
Completed: 'completed'
|
|
56
64
|
} as const;
|
|
57
65
|
export type WithdrawHistoryItemStatusEnum = typeof WithdrawHistoryItemStatusEnum[keyof typeof WithdrawHistoryItemStatusEnum];
|
|
58
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export const WithdrawHistoryItemTypeEnum = {
|
|
71
|
+
Secure: 'secure',
|
|
72
|
+
Fast: 'fast'
|
|
73
|
+
} as const;
|
|
74
|
+
export type WithdrawHistoryItemTypeEnum = typeof WithdrawHistoryItemTypeEnum[keyof typeof WithdrawHistoryItemTypeEnum];
|
|
75
|
+
|
|
59
76
|
|
|
60
77
|
/**
|
|
61
78
|
* Check if a given object implements the WithdrawHistoryItem interface.
|
|
@@ -65,6 +82,7 @@ export function instanceOfWithdrawHistoryItem(value: object): value is WithdrawH
|
|
|
65
82
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
66
83
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
67
84
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
85
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
68
86
|
return true;
|
|
69
87
|
}
|
|
70
88
|
|
|
@@ -82,6 +100,7 @@ export function WithdrawHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
82
100
|
'amount': json['amount'],
|
|
83
101
|
'timestamp': json['timestamp'],
|
|
84
102
|
'status': json['status'],
|
|
103
|
+
'type': json['type'],
|
|
85
104
|
};
|
|
86
105
|
}
|
|
87
106
|
|
|
@@ -95,6 +114,7 @@ export function WithdrawHistoryItemToJSON(value?: WithdrawHistoryItem | null): a
|
|
|
95
114
|
'amount': value['amount'],
|
|
96
115
|
'timestamp': value['timestamp'],
|
|
97
116
|
'status': value['status'],
|
|
117
|
+
'type': value['type'],
|
|
98
118
|
};
|
|
99
119
|
}
|
|
100
120
|
|
package/openapi.json
CHANGED
|
@@ -860,10 +860,11 @@
|
|
|
860
860
|
},
|
|
861
861
|
"parameters": [
|
|
862
862
|
{
|
|
863
|
-
"name": "
|
|
863
|
+
"name": "account_index",
|
|
864
864
|
"in": "query",
|
|
865
865
|
"required": true,
|
|
866
|
-
"type": "
|
|
866
|
+
"type": "integer",
|
|
867
|
+
"format": "int64"
|
|
867
868
|
},
|
|
868
869
|
{
|
|
869
870
|
"name": "cursor",
|
|
@@ -2102,10 +2103,11 @@
|
|
|
2102
2103
|
},
|
|
2103
2104
|
"parameters": [
|
|
2104
2105
|
{
|
|
2105
|
-
"name": "
|
|
2106
|
+
"name": "account_index",
|
|
2106
2107
|
"in": "query",
|
|
2107
2108
|
"required": true,
|
|
2108
|
-
"type": "
|
|
2109
|
+
"type": "integer",
|
|
2110
|
+
"format": "int64"
|
|
2109
2111
|
},
|
|
2110
2112
|
{
|
|
2111
2113
|
"name": "cursor",
|
|
@@ -4988,8 +4990,9 @@
|
|
|
4988
4990
|
"ReqGetDepositHistory": {
|
|
4989
4991
|
"type": "object",
|
|
4990
4992
|
"properties": {
|
|
4991
|
-
"
|
|
4992
|
-
"type": "
|
|
4993
|
+
"account_index": {
|
|
4994
|
+
"type": "integer",
|
|
4995
|
+
"format": "int64"
|
|
4993
4996
|
},
|
|
4994
4997
|
"cursor": {
|
|
4995
4998
|
"type": "string"
|
|
@@ -5005,7 +5008,7 @@
|
|
|
5005
5008
|
},
|
|
5006
5009
|
"title": "ReqGetDepositHistory",
|
|
5007
5010
|
"required": [
|
|
5008
|
-
"
|
|
5011
|
+
"account_index"
|
|
5009
5012
|
]
|
|
5010
5013
|
},
|
|
5011
5014
|
"ReqGetExchangeStats": {
|
|
@@ -5359,8 +5362,9 @@
|
|
|
5359
5362
|
"ReqGetWithdrawHistory": {
|
|
5360
5363
|
"type": "object",
|
|
5361
5364
|
"properties": {
|
|
5362
|
-
"
|
|
5363
|
-
"type": "
|
|
5365
|
+
"account_index": {
|
|
5366
|
+
"type": "integer",
|
|
5367
|
+
"format": "int64"
|
|
5364
5368
|
},
|
|
5365
5369
|
"cursor": {
|
|
5366
5370
|
"type": "string"
|
|
@@ -5376,7 +5380,7 @@
|
|
|
5376
5380
|
},
|
|
5377
5381
|
"title": "ReqGetWithdrawHistory",
|
|
5378
5382
|
"required": [
|
|
5379
|
-
"
|
|
5383
|
+
"account_index"
|
|
5380
5384
|
]
|
|
5381
5385
|
},
|
|
5382
5386
|
"ReqIsWhitelisted": {
|
|
@@ -5999,7 +6003,16 @@
|
|
|
5999
6003
|
"enum": [
|
|
6000
6004
|
"failed",
|
|
6001
6005
|
"pending",
|
|
6002
|
-
"claimable"
|
|
6006
|
+
"claimable",
|
|
6007
|
+
"refunded",
|
|
6008
|
+
"completed"
|
|
6009
|
+
]
|
|
6010
|
+
},
|
|
6011
|
+
"type": {
|
|
6012
|
+
"type": "string",
|
|
6013
|
+
"enum": [
|
|
6014
|
+
"secure",
|
|
6015
|
+
"fast"
|
|
6003
6016
|
]
|
|
6004
6017
|
}
|
|
6005
6018
|
},
|
|
@@ -6008,7 +6021,8 @@
|
|
|
6008
6021
|
"id",
|
|
6009
6022
|
"amount",
|
|
6010
6023
|
"timestamp",
|
|
6011
|
-
"status"
|
|
6024
|
+
"status",
|
|
6025
|
+
"type"
|
|
6012
6026
|
]
|
|
6013
6027
|
},
|
|
6014
6028
|
"ZkLighterInfo": {
|