zklighter-perps 1.0.15 → 1.0.17
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 -4
- package/apis/AccountApi.ts +12 -24
- package/apis/LiquidationApi.ts +121 -0
- package/apis/OrderApi.ts +0 -24
- package/apis/TransactionApi.ts +6 -6
- package/apis/index.ts +1 -0
- package/models/Account.ts +104 -0
- package/models/Accounts.ts +93 -0
- package/models/DetailedAccount.ts +0 -32
- package/models/EnrichedTx.ts +4 -12
- package/models/Liquidation.ts +76 -0
- package/models/Order.ts +0 -8
- package/models/ReqGetAccountActiveOrders.ts +0 -9
- package/models/ReqGetAccountInactiveOrders.ts +0 -9
- package/models/ReqGetNextNonce.ts +4 -4
- package/models/ReqMarkNotifRead.ts +97 -0
- package/models/SimpleOrder.ts +0 -9
- package/models/SubAccounts.ts +9 -27
- package/models/Tx.ts +4 -4
- package/models/index.ts +4 -4
- package/openapi.json +182 -237
- package/package.json +1 -1
package/models/EnrichedTx.ts
CHANGED
|
@@ -108,7 +108,7 @@ export interface EnrichedTx {
|
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof EnrichedTx
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
executed_at: number;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {number}
|
|
@@ -127,21 +127,15 @@ export interface EnrichedTx {
|
|
|
127
127
|
* @memberof EnrichedTx
|
|
128
128
|
*/
|
|
129
129
|
verified_at: number;
|
|
130
|
-
/**
|
|
131
|
-
*
|
|
132
|
-
* @type {number}
|
|
133
|
-
* @memberof EnrichedTx
|
|
134
|
-
*/
|
|
135
|
-
executed_at: number;
|
|
136
130
|
}
|
|
137
131
|
|
|
138
132
|
/**
|
|
139
133
|
* Check if a given object implements the EnrichedTx interface.
|
|
140
134
|
*/
|
|
141
135
|
export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
|
|
136
|
+
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
142
137
|
if (!('committed_at' in value) || value['committed_at'] === undefined) return false;
|
|
143
138
|
if (!('verified_at' in value) || value['verified_at'] === undefined) return false;
|
|
144
|
-
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
145
139
|
return true;
|
|
146
140
|
}
|
|
147
141
|
|
|
@@ -169,11 +163,10 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
169
163
|
'expire_at': json['expire_at'] == null ? undefined : json['expire_at'],
|
|
170
164
|
'block_height': json['block_height'] == null ? undefined : json['block_height'],
|
|
171
165
|
'created_at': json['created_at'] == null ? undefined : json['created_at'],
|
|
172
|
-
'
|
|
166
|
+
'executed_at': json['executed_at'],
|
|
173
167
|
'sequence_index': json['sequence_index'] == null ? undefined : json['sequence_index'],
|
|
174
168
|
'committed_at': json['committed_at'],
|
|
175
169
|
'verified_at': json['verified_at'],
|
|
176
|
-
'executed_at': json['executed_at'],
|
|
177
170
|
};
|
|
178
171
|
}
|
|
179
172
|
|
|
@@ -197,11 +190,10 @@ export function EnrichedTxToJSON(value?: EnrichedTx | null): any {
|
|
|
197
190
|
'expire_at': value['expire_at'],
|
|
198
191
|
'block_height': value['block_height'],
|
|
199
192
|
'created_at': value['created_at'],
|
|
200
|
-
'
|
|
193
|
+
'executed_at': value['executed_at'],
|
|
201
194
|
'sequence_index': value['sequence_index'],
|
|
202
195
|
'committed_at': value['committed_at'],
|
|
203
196
|
'verified_at': value['verified_at'],
|
|
204
|
-
'executed_at': value['executed_at'],
|
|
205
197
|
};
|
|
206
198
|
}
|
|
207
199
|
|
|
@@ -0,0 +1,76 @@
|
|
|
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 Liquidation
|
|
20
|
+
*/
|
|
21
|
+
export interface Liquidation {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Liquidation
|
|
26
|
+
*/
|
|
27
|
+
LiquidationId?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Liquidation
|
|
32
|
+
*/
|
|
33
|
+
AccountIndex?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof Liquidation
|
|
38
|
+
*/
|
|
39
|
+
LiquidationType?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the Liquidation interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfLiquidation(value: object): value is Liquidation {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function LiquidationFromJSON(json: any): Liquidation {
|
|
50
|
+
return LiquidationFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function LiquidationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Liquidation {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'LiquidationId': json['LiquidationId'] == null ? undefined : json['LiquidationId'],
|
|
60
|
+
'AccountIndex': json['AccountIndex'] == null ? undefined : json['AccountIndex'],
|
|
61
|
+
'LiquidationType': json['LiquidationType'] == null ? undefined : json['LiquidationType'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function LiquidationToJSON(value?: Liquidation | null): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'LiquidationId': value['LiquidationId'],
|
|
72
|
+
'AccountIndex': value['AccountIndex'],
|
|
73
|
+
'LiquidationType': value['LiquidationType'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
package/models/Order.ts
CHANGED
|
@@ -25,12 +25,6 @@ export interface Order {
|
|
|
25
25
|
* @memberof Order
|
|
26
26
|
*/
|
|
27
27
|
market_index: number;
|
|
28
|
-
/**
|
|
29
|
-
* TODO: should we return this?
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof Order
|
|
32
|
-
*/
|
|
33
|
-
ownerMainAccountIndex?: number;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {number}
|
|
@@ -178,7 +172,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
178
172
|
return {
|
|
179
173
|
|
|
180
174
|
'market_index': json['market_index'],
|
|
181
|
-
'ownerMainAccountIndex': json['ownerMainAccountIndex'] == null ? undefined : json['ownerMainAccountIndex'],
|
|
182
175
|
'owner_account_index': json['owner_account_index'],
|
|
183
176
|
'initial_base_amount': json['initial_base_amount'],
|
|
184
177
|
'remaining_base_amount': json['remaining_base_amount'],
|
|
@@ -204,7 +197,6 @@ export function OrderToJSON(value?: Order | null): any {
|
|
|
204
197
|
return {
|
|
205
198
|
|
|
206
199
|
'market_index': value['market_index'],
|
|
207
|
-
'ownerMainAccountIndex': value['ownerMainAccountIndex'],
|
|
208
200
|
'owner_account_index': value['owner_account_index'],
|
|
209
201
|
'initial_base_amount': value['initial_base_amount'],
|
|
210
202
|
'remaining_base_amount': value['remaining_base_amount'],
|
|
@@ -25,12 +25,6 @@ export interface ReqGetAccountActiveOrders {
|
|
|
25
25
|
* @memberof ReqGetAccountActiveOrders
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
|
-
/**
|
|
29
|
-
* NilSubAccountIndex
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof ReqGetAccountActiveOrders
|
|
32
|
-
*/
|
|
33
|
-
sub_account_index: number;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {number}
|
|
@@ -44,7 +38,6 @@ export interface ReqGetAccountActiveOrders {
|
|
|
44
38
|
*/
|
|
45
39
|
export function instanceOfReqGetAccountActiveOrders(value: object): value is ReqGetAccountActiveOrders {
|
|
46
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
47
|
-
if (!('sub_account_index' in value) || value['sub_account_index'] === undefined) return false;
|
|
48
41
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
49
42
|
return true;
|
|
50
43
|
}
|
|
@@ -60,7 +53,6 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
60
53
|
return {
|
|
61
54
|
|
|
62
55
|
'account_index': json['account_index'],
|
|
63
|
-
'sub_account_index': json['sub_account_index'],
|
|
64
56
|
'market_id': json['market_id'],
|
|
65
57
|
};
|
|
66
58
|
}
|
|
@@ -72,7 +64,6 @@ export function ReqGetAccountActiveOrdersToJSON(value?: ReqGetAccountActiveOrder
|
|
|
72
64
|
return {
|
|
73
65
|
|
|
74
66
|
'account_index': value['account_index'],
|
|
75
|
-
'sub_account_index': value['sub_account_index'],
|
|
76
67
|
'market_id': value['market_id'],
|
|
77
68
|
};
|
|
78
69
|
}
|
|
@@ -25,12 +25,6 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
25
25
|
* @memberof ReqGetAccountInactiveOrders
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
|
-
/**
|
|
29
|
-
* NilSubAccountIndex
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof ReqGetAccountInactiveOrders
|
|
32
|
-
*/
|
|
33
|
-
sub_account_index: number;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {string}
|
|
@@ -73,7 +67,6 @@ export type ReqGetAccountInactiveOrdersFilterEnum = typeof ReqGetAccountInactive
|
|
|
73
67
|
*/
|
|
74
68
|
export function instanceOfReqGetAccountInactiveOrders(value: object): value is ReqGetAccountInactiveOrders {
|
|
75
69
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
76
|
-
if (!('sub_account_index' in value) || value['sub_account_index'] === undefined) return false;
|
|
77
70
|
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
78
71
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
79
72
|
return true;
|
|
@@ -90,7 +83,6 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
|
|
|
90
83
|
return {
|
|
91
84
|
|
|
92
85
|
'account_index': json['account_index'],
|
|
93
|
-
'sub_account_index': json['sub_account_index'],
|
|
94
86
|
'filter': json['filter'],
|
|
95
87
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
96
88
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
@@ -105,7 +97,6 @@ export function ReqGetAccountInactiveOrdersToJSON(value?: ReqGetAccountInactiveO
|
|
|
105
97
|
return {
|
|
106
98
|
|
|
107
99
|
'account_index': value['account_index'],
|
|
108
|
-
'sub_account_index': value['sub_account_index'],
|
|
109
100
|
'filter': value['filter'],
|
|
110
101
|
'market_id': value['market_id'],
|
|
111
102
|
'cursor': value['cursor'],
|
|
@@ -30,7 +30,7 @@ export interface ReqGetNextNonce {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof ReqGetNextNonce
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
api_key_index: number;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -38,7 +38,7 @@ export interface ReqGetNextNonce {
|
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfReqGetNextNonce(value: object): value is ReqGetNextNonce {
|
|
40
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
41
|
-
if (!('
|
|
41
|
+
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -53,7 +53,7 @@ export function ReqGetNextNonceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
53
53
|
return {
|
|
54
54
|
|
|
55
55
|
'account_index': json['account_index'],
|
|
56
|
-
'
|
|
56
|
+
'api_key_index': json['api_key_index'],
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@ export function ReqGetNextNonceToJSON(value?: ReqGetNextNonce | null): any {
|
|
|
64
64
|
return {
|
|
65
65
|
|
|
66
66
|
'account_index': value['account_index'],
|
|
67
|
-
'
|
|
67
|
+
'api_key_index': value['api_key_index'],
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -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 ReqMarkNotifRead
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqMarkNotifRead {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqMarkNotifRead
|
|
26
|
+
*/
|
|
27
|
+
notif_type: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqMarkNotifRead
|
|
32
|
+
*/
|
|
33
|
+
account_index: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqMarkNotifRead
|
|
38
|
+
*/
|
|
39
|
+
api_key_index: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ReqMarkNotifRead
|
|
44
|
+
*/
|
|
45
|
+
liquidation_ids: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ReqMarkNotifRead
|
|
50
|
+
*/
|
|
51
|
+
signature: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the ReqMarkNotifRead interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfReqMarkNotifRead(value: object): value is ReqMarkNotifRead {
|
|
58
|
+
if (!('notif_type' in value) || value['notif_type'] === undefined) return false;
|
|
59
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
60
|
+
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
61
|
+
if (!('liquidation_ids' in value) || value['liquidation_ids'] === undefined) return false;
|
|
62
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function ReqMarkNotifReadFromJSON(json: any): ReqMarkNotifRead {
|
|
67
|
+
return ReqMarkNotifReadFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ReqMarkNotifReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqMarkNotifRead {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'notif_type': json['notif_type'],
|
|
77
|
+
'account_index': json['account_index'],
|
|
78
|
+
'api_key_index': json['api_key_index'],
|
|
79
|
+
'liquidation_ids': json['liquidation_ids'],
|
|
80
|
+
'signature': json['signature'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ReqMarkNotifReadToJSON(value?: ReqMarkNotifRead | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'notif_type': value['notif_type'],
|
|
91
|
+
'account_index': value['account_index'],
|
|
92
|
+
'api_key_index': value['api_key_index'],
|
|
93
|
+
'liquidation_ids': value['liquidation_ids'],
|
|
94
|
+
'signature': value['signature'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
package/models/SimpleOrder.ts
CHANGED
|
@@ -25,12 +25,6 @@ export interface SimpleOrder {
|
|
|
25
25
|
* @memberof SimpleOrder
|
|
26
26
|
*/
|
|
27
27
|
owner_account_index: number;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof SimpleOrder
|
|
32
|
-
*/
|
|
33
|
-
owner_sub_account_index: number;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {string}
|
|
@@ -62,7 +56,6 @@ export interface SimpleOrder {
|
|
|
62
56
|
*/
|
|
63
57
|
export function instanceOfSimpleOrder(value: object): value is SimpleOrder {
|
|
64
58
|
if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
|
|
65
|
-
if (!('owner_sub_account_index' in value) || value['owner_sub_account_index'] === undefined) return false;
|
|
66
59
|
if (!('initial_base_amount' in value) || value['initial_base_amount'] === undefined) return false;
|
|
67
60
|
if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
|
|
68
61
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
@@ -81,7 +74,6 @@ export function SimpleOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
81
74
|
return {
|
|
82
75
|
|
|
83
76
|
'owner_account_index': json['owner_account_index'],
|
|
84
|
-
'owner_sub_account_index': json['owner_sub_account_index'],
|
|
85
77
|
'initial_base_amount': json['initial_base_amount'],
|
|
86
78
|
'remaining_base_amount': json['remaining_base_amount'],
|
|
87
79
|
'price': json['price'],
|
|
@@ -96,7 +88,6 @@ export function SimpleOrderToJSON(value?: SimpleOrder | null): any {
|
|
|
96
88
|
return {
|
|
97
89
|
|
|
98
90
|
'owner_account_index': value['owner_account_index'],
|
|
99
|
-
'owner_sub_account_index': value['owner_sub_account_index'],
|
|
100
91
|
'initial_base_amount': value['initial_base_amount'],
|
|
101
92
|
'remaining_base_amount': value['remaining_base_amount'],
|
|
102
93
|
'price': value['price'],
|
package/models/SubAccounts.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { Account } from './Account';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
AccountFromJSON,
|
|
19
|
+
AccountFromJSONTyped,
|
|
20
|
+
AccountToJSON,
|
|
21
|
+
} from './Account';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -38,12 +38,6 @@ export interface SubAccounts {
|
|
|
38
38
|
* @memberof SubAccounts
|
|
39
39
|
*/
|
|
40
40
|
message?: string;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {number}
|
|
44
|
-
* @memberof SubAccounts
|
|
45
|
-
*/
|
|
46
|
-
index: number;
|
|
47
41
|
/**
|
|
48
42
|
*
|
|
49
43
|
* @type {string}
|
|
@@ -52,25 +46,17 @@ export interface SubAccounts {
|
|
|
52
46
|
l1_address: string;
|
|
53
47
|
/**
|
|
54
48
|
*
|
|
55
|
-
* @type {
|
|
56
|
-
* @memberof SubAccounts
|
|
57
|
-
*/
|
|
58
|
-
status: number;
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @type {Array<SubAccount>}
|
|
49
|
+
* @type {Array<Account>}
|
|
62
50
|
* @memberof SubAccounts
|
|
63
51
|
*/
|
|
64
|
-
sub_accounts: Array<
|
|
52
|
+
sub_accounts: Array<Account>;
|
|
65
53
|
}
|
|
66
54
|
|
|
67
55
|
/**
|
|
68
56
|
* Check if a given object implements the SubAccounts interface.
|
|
69
57
|
*/
|
|
70
58
|
export function instanceOfSubAccounts(value: object): value is SubAccounts {
|
|
71
|
-
if (!('index' in value) || value['index'] === undefined) return false;
|
|
72
59
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
73
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
74
60
|
if (!('sub_accounts' in value) || value['sub_accounts'] === undefined) return false;
|
|
75
61
|
return true;
|
|
76
62
|
}
|
|
@@ -87,10 +73,8 @@ export function SubAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
87
73
|
|
|
88
74
|
'code': json['code'] == null ? undefined : json['code'],
|
|
89
75
|
'message': json['message'] == null ? undefined : json['message'],
|
|
90
|
-
'index': json['index'],
|
|
91
76
|
'l1_address': json['l1_address'],
|
|
92
|
-
'
|
|
93
|
-
'sub_accounts': ((json['sub_accounts'] as Array<any>).map(SubAccountFromJSON)),
|
|
77
|
+
'sub_accounts': ((json['sub_accounts'] as Array<any>).map(AccountFromJSON)),
|
|
94
78
|
};
|
|
95
79
|
}
|
|
96
80
|
|
|
@@ -102,10 +86,8 @@ export function SubAccountsToJSON(value?: SubAccounts | null): any {
|
|
|
102
86
|
|
|
103
87
|
'code': value['code'],
|
|
104
88
|
'message': value['message'],
|
|
105
|
-
'index': value['index'],
|
|
106
89
|
'l1_address': value['l1_address'],
|
|
107
|
-
'
|
|
108
|
-
'sub_accounts': ((value['sub_accounts'] as Array<any>).map(SubAccountToJSON)),
|
|
90
|
+
'sub_accounts': ((value['sub_accounts'] as Array<any>).map(AccountToJSON)),
|
|
109
91
|
};
|
|
110
92
|
}
|
|
111
93
|
|
package/models/Tx.ts
CHANGED
|
@@ -96,7 +96,7 @@ export interface Tx {
|
|
|
96
96
|
* @type {number}
|
|
97
97
|
* @memberof Tx
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
executed_at: number;
|
|
100
100
|
/**
|
|
101
101
|
*
|
|
102
102
|
* @type {number}
|
|
@@ -121,7 +121,7 @@ export function instanceOfTx(value: object): value is Tx {
|
|
|
121
121
|
if (!('expire_at' in value) || value['expire_at'] === undefined) return false;
|
|
122
122
|
if (!('block_height' in value) || value['block_height'] === undefined) return false;
|
|
123
123
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
124
|
-
if (!('
|
|
124
|
+
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
125
125
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
126
126
|
return true;
|
|
127
127
|
}
|
|
@@ -148,7 +148,7 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
|
|
|
148
148
|
'expire_at': json['expire_at'],
|
|
149
149
|
'block_height': json['block_height'],
|
|
150
150
|
'created_at': json['created_at'],
|
|
151
|
-
'
|
|
151
|
+
'executed_at': json['executed_at'],
|
|
152
152
|
'sequence_index': json['sequence_index'],
|
|
153
153
|
};
|
|
154
154
|
}
|
|
@@ -171,7 +171,7 @@ export function TxToJSON(value?: Tx | null): any {
|
|
|
171
171
|
'expire_at': value['expire_at'],
|
|
172
172
|
'block_height': value['block_height'],
|
|
173
173
|
'created_at': value['created_at'],
|
|
174
|
-
'
|
|
174
|
+
'executed_at': value['executed_at'],
|
|
175
175
|
'sequence_index': value['sequence_index'],
|
|
176
176
|
};
|
|
177
177
|
}
|
package/models/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './Account';
|
|
3
4
|
export * from './AccountMarketStats';
|
|
4
5
|
export * from './AccountPnL';
|
|
5
6
|
export * from './AccountPosition';
|
|
6
7
|
export * from './AccountStats';
|
|
8
|
+
export * from './Accounts';
|
|
7
9
|
export * from './Block';
|
|
8
10
|
export * from './Blocks';
|
|
9
11
|
export * from './Candlestick';
|
|
@@ -20,8 +22,7 @@ export * from './Fundings';
|
|
|
20
22
|
export * from './L1ProviderInfo';
|
|
21
23
|
export * from './Layer1BasicInfo';
|
|
22
24
|
export * from './Layer2BasicInfo';
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './MainAccounts';
|
|
25
|
+
export * from './Liquidation';
|
|
25
26
|
export * from './MarketInfo';
|
|
26
27
|
export * from './NextNonce';
|
|
27
28
|
export * from './Order';
|
|
@@ -61,9 +62,9 @@ export * from './ReqGetRangeWithIndex';
|
|
|
61
62
|
export * from './ReqGetRangeWithIndexSortable';
|
|
62
63
|
export * from './ReqGetRecentTrades';
|
|
63
64
|
export * from './ReqGetRollbacks';
|
|
64
|
-
export * from './ReqGetSubAccount';
|
|
65
65
|
export * from './ReqGetTrades';
|
|
66
66
|
export * from './ReqGetTx';
|
|
67
|
+
export * from './ReqMarkNotifRead';
|
|
67
68
|
export * from './ReqSearch';
|
|
68
69
|
export * from './ResultCode';
|
|
69
70
|
export * from './Rollback';
|
|
@@ -72,7 +73,6 @@ export * from './Search';
|
|
|
72
73
|
export * from './SignBody';
|
|
73
74
|
export * from './SimpleOrder';
|
|
74
75
|
export * from './Status';
|
|
75
|
-
export * from './SubAccount';
|
|
76
76
|
export * from './SubAccounts';
|
|
77
77
|
export * from './Trade';
|
|
78
78
|
export * from './Trades';
|