zklighter-perps 1.0.10 → 1.0.12
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/AccountApi.ts +81 -81
- package/apis/BlockApi.ts +14 -14
- package/apis/CandlestickApi.ts +65 -65
- package/apis/InfoApi.ts +6 -6
- package/apis/OrderApi.ts +101 -101
- package/apis/TransactionApi.ts +76 -76
- package/config.yaml +5 -2
- package/models/AccountMarketStats.ts +24 -24
- package/models/AccountPosition.ts +28 -28
- package/models/AccountStats.ts +16 -16
- package/models/Block.ts +32 -32
- package/models/DetailedAccount.ts +17 -17
- package/models/EnrichedTx.ts +39 -39
- package/models/ExchangeStats.ts +12 -12
- package/models/L1ProviderInfo.ts +4 -4
- package/models/Layer1BasicInfo.ts +28 -28
- package/models/Layer2BasicInfo.ts +12 -12
- package/models/MainAccount.ts +4 -4
- package/models/MarketInfo.ts +44 -44
- package/models/Order.ts +55 -57
- package/models/OrderBook.ts +43 -44
- package/models/OrderBookDetail.ts +102 -103
- package/models/OrderBookDetails.ts +4 -4
- package/models/OrderBookOrders.ts +8 -8
- package/models/OrderBookStats.ts +20 -20
- package/models/OrderBooks.ts +4 -4
- package/models/ReqDoFaucet.ts +4 -4
- package/models/ReqGetAccount.ts +7 -8
- package/models/ReqGetAccountActiveOrders.ts +12 -12
- package/models/ReqGetAccountByL1Address.ts +4 -4
- package/models/ReqGetAccountInactiveOrders.ts +18 -19
- package/models/ReqGetAccountOrders.ts +8 -8
- package/models/ReqGetAccountPendingTxs.ts +7 -8
- package/models/ReqGetAccountPnL.ts +30 -32
- package/models/ReqGetAccountTxs.ts +7 -8
- package/models/ReqGetBlock.ts +7 -8
- package/models/ReqGetBlockTxs.ts +7 -8
- package/models/ReqGetByAccount.ts +7 -8
- package/models/ReqGetCandlesticks.ts +27 -28
- package/models/ReqGetFundings.ts +22 -23
- package/models/ReqGetNextNonce.ts +8 -8
- package/models/ReqGetOrderBookDetails.ts +10 -11
- package/models/ReqGetOrderBookOrders.ts +4 -4
- package/models/ReqGetOrderBooks.ts +10 -11
- package/models/ReqGetPermission.ts +11 -12
- package/models/ReqGetRangeWithIndexSortable.ts +7 -8
- package/models/ReqGetRecentTrades.ts +4 -4
- package/models/ReqGetRollbacks.ts +4 -4
- package/models/ReqGetSubAccount.ts +11 -12
- package/models/ReqGetTrades.ts +15 -16
- package/models/ReqGetTx.ts +7 -8
- package/models/Rollback.ts +12 -12
- package/models/Search.ts +4 -4
- package/models/SignBody.ts +4 -4
- package/models/SimpleOrder.ts +16 -16
- package/models/Status.ts +4 -4
- package/models/SubAccount.ts +12 -12
- package/models/SubAccounts.ts +8 -8
- package/models/Trade.ts +36 -36
- package/models/Tx.ts +36 -36
- package/models/TxHash.ts +4 -4
- package/models/TxHashes.ts +4 -4
- package/models/ValidatorInfo.ts +4 -4
- package/package.json +1 -1
package/models/EnrichedTx.ts
CHANGED
|
@@ -54,7 +54,7 @@ export interface EnrichedTx {
|
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof EnrichedTx
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
event_info?: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {number}
|
|
@@ -66,19 +66,19 @@ export interface EnrichedTx {
|
|
|
66
66
|
* @type {number}
|
|
67
67
|
* @memberof EnrichedTx
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
transaction_index?: number;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {string}
|
|
73
73
|
* @memberof EnrichedTx
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
l1_address?: string;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof EnrichedTx
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
account_index?: number;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {number}
|
|
@@ -90,58 +90,58 @@ export interface EnrichedTx {
|
|
|
90
90
|
* @type {number}
|
|
91
91
|
* @memberof EnrichedTx
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
expire_at?: number;
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
96
|
* @type {number}
|
|
97
97
|
* @memberof EnrichedTx
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
block_height?: number;
|
|
100
100
|
/**
|
|
101
101
|
*
|
|
102
102
|
* @type {number}
|
|
103
103
|
* @memberof EnrichedTx
|
|
104
104
|
*/
|
|
105
|
-
|
|
105
|
+
created_at?: number;
|
|
106
106
|
/**
|
|
107
107
|
*
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof EnrichedTx
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
verify_at?: number;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {number}
|
|
115
115
|
* @memberof EnrichedTx
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
sequence_index?: number;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {number}
|
|
121
121
|
* @memberof EnrichedTx
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
committed_at: number;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
126
126
|
* @type {number}
|
|
127
127
|
* @memberof EnrichedTx
|
|
128
128
|
*/
|
|
129
|
-
|
|
129
|
+
verified_at: number;
|
|
130
130
|
/**
|
|
131
131
|
*
|
|
132
132
|
* @type {number}
|
|
133
133
|
* @memberof EnrichedTx
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
executed_at: number;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Check if a given object implements the EnrichedTx interface.
|
|
140
140
|
*/
|
|
141
141
|
export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
|
|
142
|
-
if (!('
|
|
143
|
-
if (!('
|
|
144
|
-
if (!('
|
|
142
|
+
if (!('committed_at' in value) || value['committed_at'] === undefined) return false;
|
|
143
|
+
if (!('verified_at' in value) || value['verified_at'] === undefined) return false;
|
|
144
|
+
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
145
145
|
return true;
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -160,20 +160,20 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
160
160
|
'hash': json['hash'] == null ? undefined : json['hash'],
|
|
161
161
|
'type': json['type'] == null ? undefined : json['type'],
|
|
162
162
|
'info': json['info'] == null ? undefined : json['info'],
|
|
163
|
-
'
|
|
163
|
+
'event_info': json['event_info'] == null ? undefined : json['event_info'],
|
|
164
164
|
'status': json['status'] == null ? undefined : json['status'],
|
|
165
|
-
'
|
|
166
|
-
'
|
|
167
|
-
'
|
|
165
|
+
'transaction_index': json['transaction_index'] == null ? undefined : json['transaction_index'],
|
|
166
|
+
'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
167
|
+
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
168
168
|
'nonce': json['nonce'] == null ? undefined : json['nonce'],
|
|
169
|
-
'
|
|
170
|
-
'
|
|
171
|
-
'
|
|
172
|
-
'
|
|
173
|
-
'
|
|
174
|
-
'
|
|
175
|
-
'
|
|
176
|
-
'
|
|
169
|
+
'expire_at': json['expire_at'] == null ? undefined : json['expire_at'],
|
|
170
|
+
'block_height': json['block_height'] == null ? undefined : json['block_height'],
|
|
171
|
+
'created_at': json['created_at'] == null ? undefined : json['created_at'],
|
|
172
|
+
'verify_at': json['verify_at'] == null ? undefined : json['verify_at'],
|
|
173
|
+
'sequence_index': json['sequence_index'] == null ? undefined : json['sequence_index'],
|
|
174
|
+
'committed_at': json['committed_at'],
|
|
175
|
+
'verified_at': json['verified_at'],
|
|
176
|
+
'executed_at': json['executed_at'],
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -188,20 +188,20 @@ export function EnrichedTxToJSON(value?: EnrichedTx | null): any {
|
|
|
188
188
|
'hash': value['hash'],
|
|
189
189
|
'type': value['type'],
|
|
190
190
|
'info': value['info'],
|
|
191
|
-
'event_info': value['
|
|
191
|
+
'event_info': value['event_info'],
|
|
192
192
|
'status': value['status'],
|
|
193
|
-
'transaction_index': value['
|
|
194
|
-
'l1_address': value['
|
|
195
|
-
'account_index': value['
|
|
193
|
+
'transaction_index': value['transaction_index'],
|
|
194
|
+
'l1_address': value['l1_address'],
|
|
195
|
+
'account_index': value['account_index'],
|
|
196
196
|
'nonce': value['nonce'],
|
|
197
|
-
'expire_at': value['
|
|
198
|
-
'block_height': value['
|
|
199
|
-
'created_at': value['
|
|
200
|
-
'verify_at': value['
|
|
201
|
-
'sequence_index': value['
|
|
202
|
-
'committed_at': value['
|
|
203
|
-
'verified_at': value['
|
|
204
|
-
'executed_at': value['
|
|
197
|
+
'expire_at': value['expire_at'],
|
|
198
|
+
'block_height': value['block_height'],
|
|
199
|
+
'created_at': value['created_at'],
|
|
200
|
+
'verify_at': value['verify_at'],
|
|
201
|
+
'sequence_index': value['sequence_index'],
|
|
202
|
+
'committed_at': value['committed_at'],
|
|
203
|
+
'verified_at': value['verified_at'],
|
|
204
|
+
'executed_at': value['executed_at'],
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
|
package/models/ExchangeStats.ts
CHANGED
|
@@ -49,19 +49,19 @@ export interface ExchangeStats {
|
|
|
49
49
|
* @type {Array<OrderBookStats>}
|
|
50
50
|
* @memberof ExchangeStats
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
order_book_stats: Array<OrderBookStats>;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
55
|
* @type {number}
|
|
56
56
|
* @memberof ExchangeStats
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
daily_usd_volume: number;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {number}
|
|
62
62
|
* @memberof ExchangeStats
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
daily_trades_count: number;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -69,9 +69,9 @@ export interface ExchangeStats {
|
|
|
69
69
|
*/
|
|
70
70
|
export function instanceOfExchangeStats(value: object): value is ExchangeStats {
|
|
71
71
|
if (!('total' in value) || value['total'] === undefined) return false;
|
|
72
|
-
if (!('
|
|
73
|
-
if (!('
|
|
74
|
-
if (!('
|
|
72
|
+
if (!('order_book_stats' in value) || value['order_book_stats'] === undefined) return false;
|
|
73
|
+
if (!('daily_usd_volume' in value) || value['daily_usd_volume'] === undefined) return false;
|
|
74
|
+
if (!('daily_trades_count' in value) || value['daily_trades_count'] === undefined) return false;
|
|
75
75
|
return true;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -88,9 +88,9 @@ export function ExchangeStatsFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
88
88
|
'code': json['code'] == null ? undefined : json['code'],
|
|
89
89
|
'message': json['message'] == null ? undefined : json['message'],
|
|
90
90
|
'total': json['total'],
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
91
|
+
'order_book_stats': ((json['order_book_stats'] as Array<any>).map(OrderBookStatsFromJSON)),
|
|
92
|
+
'daily_usd_volume': json['daily_usd_volume'],
|
|
93
|
+
'daily_trades_count': json['daily_trades_count'],
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -103,9 +103,9 @@ export function ExchangeStatsToJSON(value?: ExchangeStats | null): any {
|
|
|
103
103
|
'code': value['code'],
|
|
104
104
|
'message': value['message'],
|
|
105
105
|
'total': value['total'],
|
|
106
|
-
'order_book_stats': ((value['
|
|
107
|
-
'daily_usd_volume': value['
|
|
108
|
-
'daily_trades_count': value['
|
|
106
|
+
'order_book_stats': ((value['order_book_stats'] as Array<any>).map(OrderBookStatsToJSON)),
|
|
107
|
+
'daily_usd_volume': value['daily_usd_volume'],
|
|
108
|
+
'daily_trades_count': value['daily_trades_count'],
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
|
package/models/L1ProviderInfo.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface L1ProviderInfo {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof L1ProviderInfo
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
NetworkRpc: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -52,7 +52,7 @@ export function instanceOfL1ProviderInfo(value: object): value is L1ProviderInfo
|
|
|
52
52
|
if (!('chainId' in value) || value['chainId'] === undefined) return false;
|
|
53
53
|
if (!('networkId' in value) || value['networkId'] === undefined) return false;
|
|
54
54
|
if (!('latestBlockNumber' in value) || value['latestBlockNumber'] === undefined) return false;
|
|
55
|
-
if (!('
|
|
55
|
+
if (!('NetworkRpc' in value) || value['NetworkRpc'] === undefined) return false;
|
|
56
56
|
return true;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -69,7 +69,7 @@ export function L1ProviderInfoFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
69
69
|
'chainId': json['chainId'],
|
|
70
70
|
'networkId': json['networkId'],
|
|
71
71
|
'latestBlockNumber': json['latestBlockNumber'],
|
|
72
|
-
'
|
|
72
|
+
'NetworkRpc': json['NetworkRpc'],
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -82,7 +82,7 @@ export function L1ProviderInfoToJSON(value?: L1ProviderInfo | null): any {
|
|
|
82
82
|
'chainId': value['chainId'],
|
|
83
83
|
'networkId': value['networkId'],
|
|
84
84
|
'latestBlockNumber': value['latestBlockNumber'],
|
|
85
|
-
'NetworkRpc': value['
|
|
85
|
+
'NetworkRpc': value['NetworkRpc'],
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -55,56 +55,56 @@ export interface Layer1BasicInfo {
|
|
|
55
55
|
* @type {Array<L1ProviderInfo>}
|
|
56
56
|
* @memberof Layer1BasicInfo
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
l1_providers: Array<L1ProviderInfo>;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {boolean}
|
|
62
62
|
* @memberof Layer1BasicInfo
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
l1_providers_health: boolean;
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
67
|
* @type {Array<ValidatorInfo>}
|
|
68
68
|
* @memberof Layer1BasicInfo
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
validator_Info: Array<ValidatorInfo>;
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
73
|
* @type {Array<ContractAddress>}
|
|
74
74
|
* @memberof Layer1BasicInfo
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
contract_addresses: Array<ContractAddress>;
|
|
77
77
|
/**
|
|
78
78
|
*
|
|
79
79
|
* @type {number}
|
|
80
80
|
* @memberof Layer1BasicInfo
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
latest_l1_generic_block: number;
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
85
|
* @type {number}
|
|
86
86
|
* @memberof Layer1BasicInfo
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
latest_l1_governance_block: number;
|
|
89
89
|
/**
|
|
90
90
|
*
|
|
91
91
|
* @type {number}
|
|
92
92
|
* @memberof Layer1BasicInfo
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
latest_l1_desert_block: number;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Check if a given object implements the Layer1BasicInfo interface.
|
|
99
99
|
*/
|
|
100
100
|
export function instanceOfLayer1BasicInfo(value: object): value is Layer1BasicInfo {
|
|
101
|
-
if (!('
|
|
102
|
-
if (!('
|
|
103
|
-
if (!('
|
|
104
|
-
if (!('
|
|
105
|
-
if (!('
|
|
106
|
-
if (!('
|
|
107
|
-
if (!('
|
|
101
|
+
if (!('l1_providers' in value) || value['l1_providers'] === undefined) return false;
|
|
102
|
+
if (!('l1_providers_health' in value) || value['l1_providers_health'] === undefined) return false;
|
|
103
|
+
if (!('validator_Info' in value) || value['validator_Info'] === undefined) return false;
|
|
104
|
+
if (!('contract_addresses' in value) || value['contract_addresses'] === undefined) return false;
|
|
105
|
+
if (!('latest_l1_generic_block' in value) || value['latest_l1_generic_block'] === undefined) return false;
|
|
106
|
+
if (!('latest_l1_governance_block' in value) || value['latest_l1_governance_block'] === undefined) return false;
|
|
107
|
+
if (!('latest_l1_desert_block' in value) || value['latest_l1_desert_block'] === undefined) return false;
|
|
108
108
|
return true;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -120,13 +120,13 @@ export function Layer1BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
120
120
|
|
|
121
121
|
'code': json['code'] == null ? undefined : json['code'],
|
|
122
122
|
'message': json['message'] == null ? undefined : json['message'],
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'
|
|
129
|
-
'
|
|
123
|
+
'l1_providers': ((json['l1_providers'] as Array<any>).map(L1ProviderInfoFromJSON)),
|
|
124
|
+
'l1_providers_health': json['l1_providers_health'],
|
|
125
|
+
'validator_Info': ((json['validator_Info'] as Array<any>).map(ValidatorInfoFromJSON)),
|
|
126
|
+
'contract_addresses': ((json['contract_addresses'] as Array<any>).map(ContractAddressFromJSON)),
|
|
127
|
+
'latest_l1_generic_block': json['latest_l1_generic_block'],
|
|
128
|
+
'latest_l1_governance_block': json['latest_l1_governance_block'],
|
|
129
|
+
'latest_l1_desert_block': json['latest_l1_desert_block'],
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -138,13 +138,13 @@ export function Layer1BasicInfoToJSON(value?: Layer1BasicInfo | null): any {
|
|
|
138
138
|
|
|
139
139
|
'code': value['code'],
|
|
140
140
|
'message': value['message'],
|
|
141
|
-
'l1_providers': ((value['
|
|
142
|
-
'l1_providers_health': value['
|
|
143
|
-
'validator_Info': ((value['
|
|
144
|
-
'contract_addresses': ((value['
|
|
145
|
-
'latest_l1_generic_block': value['
|
|
146
|
-
'latest_l1_governance_block': value['
|
|
147
|
-
'latest_l1_desert_block': value['
|
|
141
|
+
'l1_providers': ((value['l1_providers'] as Array<any>).map(L1ProviderInfoToJSON)),
|
|
142
|
+
'l1_providers_health': value['l1_providers_health'],
|
|
143
|
+
'validator_Info': ((value['validator_Info'] as Array<any>).map(ValidatorInfoToJSON)),
|
|
144
|
+
'contract_addresses': ((value['contract_addresses'] as Array<any>).map(ContractAddressToJSON)),
|
|
145
|
+
'latest_l1_generic_block': value['latest_l1_generic_block'],
|
|
146
|
+
'latest_l1_governance_block': value['latest_l1_governance_block'],
|
|
147
|
+
'latest_l1_desert_block': value['latest_l1_desert_block'],
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -36,28 +36,28 @@ export interface Layer2BasicInfo {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof Layer2BasicInfo
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
block_committed: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
43
|
* @memberof Layer2BasicInfo
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
block_verified: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof Layer2BasicInfo
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
total_transaction_count: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Check if a given object implements the Layer2BasicInfo interface.
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfLayer2BasicInfo(value: object): value is Layer2BasicInfo {
|
|
58
|
-
if (!('
|
|
59
|
-
if (!('
|
|
60
|
-
if (!('
|
|
58
|
+
if (!('block_committed' in value) || value['block_committed'] === undefined) return false;
|
|
59
|
+
if (!('block_verified' in value) || value['block_verified'] === undefined) return false;
|
|
60
|
+
if (!('total_transaction_count' in value) || value['total_transaction_count'] === undefined) return false;
|
|
61
61
|
return true;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -73,9 +73,9 @@ export function Layer2BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
73
73
|
|
|
74
74
|
'code': json['code'] == null ? undefined : json['code'],
|
|
75
75
|
'message': json['message'] == null ? undefined : json['message'],
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'
|
|
76
|
+
'block_committed': json['block_committed'],
|
|
77
|
+
'block_verified': json['block_verified'],
|
|
78
|
+
'total_transaction_count': json['total_transaction_count'],
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -87,9 +87,9 @@ export function Layer2BasicInfoToJSON(value?: Layer2BasicInfo | null): any {
|
|
|
87
87
|
|
|
88
88
|
'code': value['code'],
|
|
89
89
|
'message': value['message'],
|
|
90
|
-
'block_committed': value['
|
|
91
|
-
'block_verified': value['
|
|
92
|
-
'total_transaction_count': value['
|
|
90
|
+
'block_committed': value['block_committed'],
|
|
91
|
+
'block_verified': value['block_verified'],
|
|
92
|
+
'total_transaction_count': value['total_transaction_count'],
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
package/models/MainAccount.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface MainAccount {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof MainAccount
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
l1_address: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
@@ -56,7 +56,7 @@ export interface MainAccount {
|
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfMainAccount(value: object): value is MainAccount {
|
|
58
58
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
59
|
-
if (!('
|
|
59
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
60
60
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
61
61
|
return true;
|
|
62
62
|
}
|
|
@@ -74,7 +74,7 @@ export function MainAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
74
74
|
'code': json['code'] == null ? undefined : json['code'],
|
|
75
75
|
'message': json['message'] == null ? undefined : json['message'],
|
|
76
76
|
'index': json['index'],
|
|
77
|
-
'
|
|
77
|
+
'l1_address': json['l1_address'],
|
|
78
78
|
'status': json['status'],
|
|
79
79
|
};
|
|
80
80
|
}
|
|
@@ -88,7 +88,7 @@ export function MainAccountToJSON(value?: MainAccount | null): any {
|
|
|
88
88
|
'code': value['code'],
|
|
89
89
|
'message': value['message'],
|
|
90
90
|
'index': value['index'],
|
|
91
|
-
'l1_address': value['
|
|
91
|
+
'l1_address': value['l1_address'],
|
|
92
92
|
'status': value['status'],
|
|
93
93
|
};
|
|
94
94
|
}
|
package/models/MarketInfo.ts
CHANGED
|
@@ -24,84 +24,84 @@ export interface MarketInfo {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof MarketInfo
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
market_id: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof MarketInfo
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
index_price: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof MarketInfo
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
mark_price: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof MarketInfo
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
last_trade_price: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof MarketInfo
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
funding_rate: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
55
55
|
* @memberof MarketInfo
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
funding_timestamp: number;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {number}
|
|
61
61
|
* @memberof MarketInfo
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
daily_base_token_volume: number;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {number}
|
|
67
67
|
* @memberof MarketInfo
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
daily_quote_token_volume: number;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof MarketInfo
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
daily_price_low: number;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof MarketInfo
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
daily_price_high: number;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {number}
|
|
85
85
|
* @memberof MarketInfo
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
daily_price_change: number;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Check if a given object implements the MarketInfo interface.
|
|
92
92
|
*/
|
|
93
93
|
export function instanceOfMarketInfo(value: object): value is MarketInfo {
|
|
94
|
-
if (!('
|
|
95
|
-
if (!('
|
|
96
|
-
if (!('
|
|
97
|
-
if (!('
|
|
98
|
-
if (!('
|
|
99
|
-
if (!('
|
|
100
|
-
if (!('
|
|
101
|
-
if (!('
|
|
102
|
-
if (!('
|
|
103
|
-
if (!('
|
|
104
|
-
if (!('
|
|
94
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
95
|
+
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
96
|
+
if (!('mark_price' in value) || value['mark_price'] === undefined) return false;
|
|
97
|
+
if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
|
|
98
|
+
if (!('funding_rate' in value) || value['funding_rate'] === undefined) return false;
|
|
99
|
+
if (!('funding_timestamp' in value) || value['funding_timestamp'] === undefined) return false;
|
|
100
|
+
if (!('daily_base_token_volume' in value) || value['daily_base_token_volume'] === undefined) return false;
|
|
101
|
+
if (!('daily_quote_token_volume' in value) || value['daily_quote_token_volume'] === undefined) return false;
|
|
102
|
+
if (!('daily_price_low' in value) || value['daily_price_low'] === undefined) return false;
|
|
103
|
+
if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
|
|
104
|
+
if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
|
|
105
105
|
return true;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -115,17 +115,17 @@ export function MarketInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
115
115
|
}
|
|
116
116
|
return {
|
|
117
117
|
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'
|
|
118
|
+
'market_id': json['market_id'],
|
|
119
|
+
'index_price': json['index_price'],
|
|
120
|
+
'mark_price': json['mark_price'],
|
|
121
|
+
'last_trade_price': json['last_trade_price'],
|
|
122
|
+
'funding_rate': json['funding_rate'],
|
|
123
|
+
'funding_timestamp': json['funding_timestamp'],
|
|
124
|
+
'daily_base_token_volume': json['daily_base_token_volume'],
|
|
125
|
+
'daily_quote_token_volume': json['daily_quote_token_volume'],
|
|
126
|
+
'daily_price_low': json['daily_price_low'],
|
|
127
|
+
'daily_price_high': json['daily_price_high'],
|
|
128
|
+
'daily_price_change': json['daily_price_change'],
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -135,17 +135,17 @@ export function MarketInfoToJSON(value?: MarketInfo | null): any {
|
|
|
135
135
|
}
|
|
136
136
|
return {
|
|
137
137
|
|
|
138
|
-
'market_id': value['
|
|
139
|
-
'index_price': value['
|
|
140
|
-
'mark_price': value['
|
|
141
|
-
'last_trade_price': value['
|
|
142
|
-
'funding_rate': value['
|
|
143
|
-
'funding_timestamp': value['
|
|
144
|
-
'daily_base_token_volume': value['
|
|
145
|
-
'daily_quote_token_volume': value['
|
|
146
|
-
'daily_price_low': value['
|
|
147
|
-
'daily_price_high': value['
|
|
148
|
-
'daily_price_change': value['
|
|
138
|
+
'market_id': value['market_id'],
|
|
139
|
+
'index_price': value['index_price'],
|
|
140
|
+
'mark_price': value['mark_price'],
|
|
141
|
+
'last_trade_price': value['last_trade_price'],
|
|
142
|
+
'funding_rate': value['funding_rate'],
|
|
143
|
+
'funding_timestamp': value['funding_timestamp'],
|
|
144
|
+
'daily_base_token_volume': value['daily_base_token_volume'],
|
|
145
|
+
'daily_quote_token_volume': value['daily_quote_token_volume'],
|
|
146
|
+
'daily_price_low': value['daily_price_low'],
|
|
147
|
+
'daily_price_high': value['daily_price_high'],
|
|
148
|
+
'daily_price_change': value['daily_price_change'],
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|