zklighter-perps 1.0.11 → 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 -4
- 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/apis/OrderApi.ts
CHANGED
|
@@ -41,53 +41,53 @@ import {
|
|
|
41
41
|
} from '../models/index';
|
|
42
42
|
|
|
43
43
|
export interface GetAccountActiveOrdersRequest {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
account_index: number;
|
|
45
|
+
sub_account_index: number;
|
|
46
|
+
market_id: number;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export interface GetAccountInactiveOrdersRequest {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
account_index: number;
|
|
51
|
+
sub_account_index: number;
|
|
52
52
|
filter: GetAccountInactiveOrdersFilterEnum;
|
|
53
53
|
limit: number;
|
|
54
|
-
|
|
54
|
+
market_id?: number;
|
|
55
55
|
cursor?: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export interface GetAccountOrdersRequest {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
account_index: number;
|
|
60
|
+
market_id: number;
|
|
61
61
|
limit: number;
|
|
62
62
|
cursor?: string;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export interface GetOrderBookDetailsRequest {
|
|
66
66
|
filter: GetOrderBookDetailsFilterEnum;
|
|
67
|
-
|
|
67
|
+
market_id?: number;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export interface GetOrderBookOrdersRequest {
|
|
71
|
-
|
|
71
|
+
market_id: number;
|
|
72
72
|
limit: number;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface GetOrderBooksRequest {
|
|
76
76
|
filter: GetOrderBooksFilterEnum;
|
|
77
|
-
|
|
77
|
+
market_id?: number;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export interface GetRecentTradesRequest {
|
|
81
|
-
|
|
81
|
+
market_id: number;
|
|
82
82
|
limit: number;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export interface GetTradesRequest {
|
|
86
|
-
|
|
86
|
+
market_id: number;
|
|
87
87
|
by: GetTradesByEnum;
|
|
88
88
|
from: number;
|
|
89
89
|
limit: number;
|
|
90
|
-
|
|
90
|
+
order_index?: number;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -100,39 +100,39 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
100
100
|
* GetAccountActiveOrders
|
|
101
101
|
*/
|
|
102
102
|
async getAccountActiveOrdersRaw(requestParameters: GetAccountActiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
103
|
-
if (requestParameters['
|
|
103
|
+
if (requestParameters['account_index'] == null) {
|
|
104
104
|
throw new runtime.RequiredError(
|
|
105
|
-
'
|
|
106
|
-
'Required parameter "
|
|
105
|
+
'account_index',
|
|
106
|
+
'Required parameter "account_index" was null or undefined when calling getAccountActiveOrders().'
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
if (requestParameters['
|
|
110
|
+
if (requestParameters['sub_account_index'] == null) {
|
|
111
111
|
throw new runtime.RequiredError(
|
|
112
|
-
'
|
|
113
|
-
'Required parameter "
|
|
112
|
+
'sub_account_index',
|
|
113
|
+
'Required parameter "sub_account_index" was null or undefined when calling getAccountActiveOrders().'
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
if (requestParameters['
|
|
117
|
+
if (requestParameters['market_id'] == null) {
|
|
118
118
|
throw new runtime.RequiredError(
|
|
119
|
-
'
|
|
120
|
-
'Required parameter "
|
|
119
|
+
'market_id',
|
|
120
|
+
'Required parameter "market_id" was null or undefined when calling getAccountActiveOrders().'
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
const queryParameters: any = {};
|
|
125
125
|
|
|
126
|
-
if (requestParameters['
|
|
127
|
-
queryParameters['account_index'] = requestParameters['
|
|
126
|
+
if (requestParameters['account_index'] != null) {
|
|
127
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
if (requestParameters['
|
|
131
|
-
queryParameters['sub_account_index'] = requestParameters['
|
|
130
|
+
if (requestParameters['sub_account_index'] != null) {
|
|
131
|
+
queryParameters['sub_account_index'] = requestParameters['sub_account_index'];
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
if (requestParameters['
|
|
135
|
-
queryParameters['market_id'] = requestParameters['
|
|
134
|
+
if (requestParameters['market_id'] != null) {
|
|
135
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -161,17 +161,17 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
161
161
|
* GetAccountInactiveOrders
|
|
162
162
|
*/
|
|
163
163
|
async getAccountInactiveOrdersRaw(requestParameters: GetAccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
164
|
-
if (requestParameters['
|
|
164
|
+
if (requestParameters['account_index'] == null) {
|
|
165
165
|
throw new runtime.RequiredError(
|
|
166
|
-
'
|
|
167
|
-
'Required parameter "
|
|
166
|
+
'account_index',
|
|
167
|
+
'Required parameter "account_index" was null or undefined when calling getAccountInactiveOrders().'
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
if (requestParameters['
|
|
171
|
+
if (requestParameters['sub_account_index'] == null) {
|
|
172
172
|
throw new runtime.RequiredError(
|
|
173
|
-
'
|
|
174
|
-
'Required parameter "
|
|
173
|
+
'sub_account_index',
|
|
174
|
+
'Required parameter "sub_account_index" was null or undefined when calling getAccountInactiveOrders().'
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -191,20 +191,20 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
191
191
|
|
|
192
192
|
const queryParameters: any = {};
|
|
193
193
|
|
|
194
|
-
if (requestParameters['
|
|
195
|
-
queryParameters['account_index'] = requestParameters['
|
|
194
|
+
if (requestParameters['account_index'] != null) {
|
|
195
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
if (requestParameters['
|
|
199
|
-
queryParameters['sub_account_index'] = requestParameters['
|
|
198
|
+
if (requestParameters['sub_account_index'] != null) {
|
|
199
|
+
queryParameters['sub_account_index'] = requestParameters['sub_account_index'];
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
if (requestParameters['filter'] != null) {
|
|
203
203
|
queryParameters['filter'] = requestParameters['filter'];
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
if (requestParameters['
|
|
207
|
-
queryParameters['market_id'] = requestParameters['
|
|
206
|
+
if (requestParameters['market_id'] != null) {
|
|
207
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
if (requestParameters['cursor'] != null) {
|
|
@@ -241,17 +241,17 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
241
241
|
* GetAccountOrders
|
|
242
242
|
*/
|
|
243
243
|
async getAccountOrdersRaw(requestParameters: GetAccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
244
|
-
if (requestParameters['
|
|
244
|
+
if (requestParameters['account_index'] == null) {
|
|
245
245
|
throw new runtime.RequiredError(
|
|
246
|
-
'
|
|
247
|
-
'Required parameter "
|
|
246
|
+
'account_index',
|
|
247
|
+
'Required parameter "account_index" was null or undefined when calling getAccountOrders().'
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
if (requestParameters['
|
|
251
|
+
if (requestParameters['market_id'] == null) {
|
|
252
252
|
throw new runtime.RequiredError(
|
|
253
|
-
'
|
|
254
|
-
'Required parameter "
|
|
253
|
+
'market_id',
|
|
254
|
+
'Required parameter "market_id" was null or undefined when calling getAccountOrders().'
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -264,12 +264,12 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
264
264
|
|
|
265
265
|
const queryParameters: any = {};
|
|
266
266
|
|
|
267
|
-
if (requestParameters['
|
|
268
|
-
queryParameters['account_index'] = requestParameters['
|
|
267
|
+
if (requestParameters['account_index'] != null) {
|
|
268
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
if (requestParameters['
|
|
272
|
-
queryParameters['market_id'] = requestParameters['
|
|
271
|
+
if (requestParameters['market_id'] != null) {
|
|
272
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
if (requestParameters['cursor'] != null) {
|
|
@@ -347,8 +347,8 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
347
347
|
queryParameters['filter'] = requestParameters['filter'];
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
if (requestParameters['
|
|
351
|
-
queryParameters['market_id'] = requestParameters['
|
|
350
|
+
if (requestParameters['market_id'] != null) {
|
|
351
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -377,10 +377,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
377
377
|
* GetOrderBookOrders
|
|
378
378
|
*/
|
|
379
379
|
async getOrderBookOrdersRaw(requestParameters: GetOrderBookOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderBookOrders>> {
|
|
380
|
-
if (requestParameters['
|
|
380
|
+
if (requestParameters['market_id'] == null) {
|
|
381
381
|
throw new runtime.RequiredError(
|
|
382
|
-
'
|
|
383
|
-
'Required parameter "
|
|
382
|
+
'market_id',
|
|
383
|
+
'Required parameter "market_id" was null or undefined when calling getOrderBookOrders().'
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
386
|
|
|
@@ -393,8 +393,8 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
393
393
|
|
|
394
394
|
const queryParameters: any = {};
|
|
395
395
|
|
|
396
|
-
if (requestParameters['
|
|
397
|
-
queryParameters['market_id'] = requestParameters['
|
|
396
|
+
if (requestParameters['market_id'] != null) {
|
|
397
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
if (requestParameters['limit'] != null) {
|
|
@@ -440,8 +440,8 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
440
440
|
queryParameters['filter'] = requestParameters['filter'];
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
if (requestParameters['
|
|
444
|
-
queryParameters['market_id'] = requestParameters['
|
|
443
|
+
if (requestParameters['market_id'] != null) {
|
|
444
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -470,10 +470,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
470
470
|
* GetRecentTrades
|
|
471
471
|
*/
|
|
472
472
|
async getRecentTradesRaw(requestParameters: GetRecentTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Trades>> {
|
|
473
|
-
if (requestParameters['
|
|
473
|
+
if (requestParameters['market_id'] == null) {
|
|
474
474
|
throw new runtime.RequiredError(
|
|
475
|
-
'
|
|
476
|
-
'Required parameter "
|
|
475
|
+
'market_id',
|
|
476
|
+
'Required parameter "market_id" was null or undefined when calling getRecentTrades().'
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
479
|
|
|
@@ -486,8 +486,8 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
486
486
|
|
|
487
487
|
const queryParameters: any = {};
|
|
488
488
|
|
|
489
|
-
if (requestParameters['
|
|
490
|
-
queryParameters['market_id'] = requestParameters['
|
|
489
|
+
if (requestParameters['market_id'] != null) {
|
|
490
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
if (requestParameters['limit'] != null) {
|
|
@@ -520,10 +520,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
520
520
|
* GetTrades
|
|
521
521
|
*/
|
|
522
522
|
async getTradesRaw(requestParameters: GetTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Trades>> {
|
|
523
|
-
if (requestParameters['
|
|
523
|
+
if (requestParameters['market_id'] == null) {
|
|
524
524
|
throw new runtime.RequiredError(
|
|
525
|
-
'
|
|
526
|
-
'Required parameter "
|
|
525
|
+
'market_id',
|
|
526
|
+
'Required parameter "market_id" was null or undefined when calling getTrades().'
|
|
527
527
|
);
|
|
528
528
|
}
|
|
529
529
|
|
|
@@ -550,12 +550,12 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
550
550
|
|
|
551
551
|
const queryParameters: any = {};
|
|
552
552
|
|
|
553
|
-
if (requestParameters['
|
|
554
|
-
queryParameters['market_id'] = requestParameters['
|
|
553
|
+
if (requestParameters['market_id'] != null) {
|
|
554
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
if (requestParameters['
|
|
558
|
-
queryParameters['order_index'] = requestParameters['
|
|
557
|
+
if (requestParameters['order_index'] != null) {
|
|
558
|
+
queryParameters['order_index'] = requestParameters['order_index'];
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
if (requestParameters['by'] != null) {
|
|
@@ -594,35 +594,35 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
/**
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
597
|
+
* @export
|
|
598
|
+
* @enum {string}
|
|
599
|
+
*/
|
|
600
|
+
export enum GetAccountInactiveOrdersFilterEnum {
|
|
601
|
+
MarketId = 'market_id',
|
|
602
|
+
All = 'all'
|
|
603
|
+
}
|
|
604
604
|
/**
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
605
|
+
* @export
|
|
606
|
+
* @enum {string}
|
|
607
|
+
*/
|
|
608
|
+
export enum GetOrderBookDetailsFilterEnum {
|
|
609
|
+
MarketId = 'market_id',
|
|
610
|
+
All = 'all'
|
|
611
|
+
}
|
|
612
612
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
613
|
+
* @export
|
|
614
|
+
* @enum {string}
|
|
615
|
+
*/
|
|
616
|
+
export enum GetOrderBooksFilterEnum {
|
|
617
|
+
MarketId = 'market_id',
|
|
618
|
+
All = 'all'
|
|
619
|
+
}
|
|
620
620
|
/**
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
621
|
+
* @export
|
|
622
|
+
* @enum {string}
|
|
623
|
+
*/
|
|
624
|
+
export enum GetTradesByEnum {
|
|
625
|
+
BlockHeight = 'block_height',
|
|
626
|
+
Timestamp = 'timestamp',
|
|
627
|
+
TradeId = 'trade_id'
|
|
628
|
+
}
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -60,13 +60,13 @@ export interface GetBlockTxsRequest {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export interface GetL2SignatureBodyRequest {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
tx_type: number;
|
|
64
|
+
tx_info: string;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export interface GetNextNonceRequest {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
account_index: number;
|
|
69
|
+
sub_account_index: number;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export interface GetPendingTxsRequest {
|
|
@@ -89,13 +89,13 @@ export interface GetTxsRequest {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export interface SendTxRequest {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
tx_type: number;
|
|
93
|
+
tx_info: string;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export interface SendTxBatchRequest {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
tx_types: string;
|
|
98
|
+
tx_infos: string;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
@@ -281,17 +281,17 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
281
281
|
* GetL2SignatureBody
|
|
282
282
|
*/
|
|
283
283
|
async getL2SignatureBodyRaw(requestParameters: GetL2SignatureBodyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignBody>> {
|
|
284
|
-
if (requestParameters['
|
|
284
|
+
if (requestParameters['tx_type'] == null) {
|
|
285
285
|
throw new runtime.RequiredError(
|
|
286
|
-
'
|
|
287
|
-
'Required parameter "
|
|
286
|
+
'tx_type',
|
|
287
|
+
'Required parameter "tx_type" was null or undefined when calling getL2SignatureBody().'
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
if (requestParameters['
|
|
291
|
+
if (requestParameters['tx_info'] == null) {
|
|
292
292
|
throw new runtime.RequiredError(
|
|
293
|
-
'
|
|
294
|
-
'Required parameter "
|
|
293
|
+
'tx_info',
|
|
294
|
+
'Required parameter "tx_info" was null or undefined when calling getL2SignatureBody().'
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -313,12 +313,12 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
313
313
|
formParams = new URLSearchParams();
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
if (requestParameters['
|
|
317
|
-
formParams.append('tx_type', requestParameters['
|
|
316
|
+
if (requestParameters['tx_type'] != null) {
|
|
317
|
+
formParams.append('tx_type', requestParameters['tx_type'] as any);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
if (requestParameters['
|
|
321
|
-
formParams.append('tx_info', requestParameters['
|
|
320
|
+
if (requestParameters['tx_info'] != null) {
|
|
321
|
+
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
const response = await this.request({
|
|
@@ -346,28 +346,28 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
346
346
|
* GetNextNonce
|
|
347
347
|
*/
|
|
348
348
|
async getNextNonceRaw(requestParameters: GetNextNonceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NextNonce>> {
|
|
349
|
-
if (requestParameters['
|
|
349
|
+
if (requestParameters['account_index'] == null) {
|
|
350
350
|
throw new runtime.RequiredError(
|
|
351
|
-
'
|
|
352
|
-
'Required parameter "
|
|
351
|
+
'account_index',
|
|
352
|
+
'Required parameter "account_index" was null or undefined when calling getNextNonce().'
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
if (requestParameters['
|
|
356
|
+
if (requestParameters['sub_account_index'] == null) {
|
|
357
357
|
throw new runtime.RequiredError(
|
|
358
|
-
'
|
|
359
|
-
'Required parameter "
|
|
358
|
+
'sub_account_index',
|
|
359
|
+
'Required parameter "sub_account_index" was null or undefined when calling getNextNonce().'
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
const queryParameters: any = {};
|
|
364
364
|
|
|
365
|
-
if (requestParameters['
|
|
366
|
-
queryParameters['account_index'] = requestParameters['
|
|
365
|
+
if (requestParameters['account_index'] != null) {
|
|
366
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
if (requestParameters['
|
|
370
|
-
queryParameters['sub_account_index'] = requestParameters['
|
|
369
|
+
if (requestParameters['sub_account_index'] != null) {
|
|
370
|
+
queryParameters['sub_account_index'] = requestParameters['sub_account_index'];
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -571,17 +571,17 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
571
571
|
* SendTx
|
|
572
572
|
*/
|
|
573
573
|
async sendTxRaw(requestParameters: SendTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TxHash>> {
|
|
574
|
-
if (requestParameters['
|
|
574
|
+
if (requestParameters['tx_type'] == null) {
|
|
575
575
|
throw new runtime.RequiredError(
|
|
576
|
-
'
|
|
577
|
-
'Required parameter "
|
|
576
|
+
'tx_type',
|
|
577
|
+
'Required parameter "tx_type" was null or undefined when calling sendTx().'
|
|
578
578
|
);
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
if (requestParameters['
|
|
581
|
+
if (requestParameters['tx_info'] == null) {
|
|
582
582
|
throw new runtime.RequiredError(
|
|
583
|
-
'
|
|
584
|
-
'Required parameter "
|
|
583
|
+
'tx_info',
|
|
584
|
+
'Required parameter "tx_info" was null or undefined when calling sendTx().'
|
|
585
585
|
);
|
|
586
586
|
}
|
|
587
587
|
|
|
@@ -603,12 +603,12 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
603
603
|
formParams = new URLSearchParams();
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
if (requestParameters['
|
|
607
|
-
formParams.append('tx_type', requestParameters['
|
|
606
|
+
if (requestParameters['tx_type'] != null) {
|
|
607
|
+
formParams.append('tx_type', requestParameters['tx_type'] as any);
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
if (requestParameters['
|
|
611
|
-
formParams.append('tx_info', requestParameters['
|
|
610
|
+
if (requestParameters['tx_info'] != null) {
|
|
611
|
+
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
const response = await this.request({
|
|
@@ -636,17 +636,17 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
636
636
|
* SendTxBatch
|
|
637
637
|
*/
|
|
638
638
|
async sendTxBatchRaw(requestParameters: SendTxBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TxHashes>> {
|
|
639
|
-
if (requestParameters['
|
|
639
|
+
if (requestParameters['tx_types'] == null) {
|
|
640
640
|
throw new runtime.RequiredError(
|
|
641
|
-
'
|
|
642
|
-
'Required parameter "
|
|
641
|
+
'tx_types',
|
|
642
|
+
'Required parameter "tx_types" was null or undefined when calling sendTxBatch().'
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
if (requestParameters['
|
|
646
|
+
if (requestParameters['tx_infos'] == null) {
|
|
647
647
|
throw new runtime.RequiredError(
|
|
648
|
-
'
|
|
649
|
-
'Required parameter "
|
|
648
|
+
'tx_infos',
|
|
649
|
+
'Required parameter "tx_infos" was null or undefined when calling sendTxBatch().'
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
|
|
@@ -668,12 +668,12 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
668
668
|
formParams = new URLSearchParams();
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
-
if (requestParameters['
|
|
672
|
-
formParams.append('tx_types', requestParameters['
|
|
671
|
+
if (requestParameters['tx_types'] != null) {
|
|
672
|
+
formParams.append('tx_types', requestParameters['tx_types'] as any);
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
-
if (requestParameters['
|
|
676
|
-
formParams.append('tx_infos', requestParameters['
|
|
675
|
+
if (requestParameters['tx_infos'] != null) {
|
|
676
|
+
formParams.append('tx_infos', requestParameters['tx_infos'] as any);
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
const response = await this.request({
|
|
@@ -699,34 +699,34 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
/**
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
702
|
+
* @export
|
|
703
|
+
* @enum {string}
|
|
704
|
+
*/
|
|
705
|
+
export enum GetAccountPendingTxsByEnum {
|
|
706
|
+
AccountIndex = 'account_index',
|
|
707
|
+
L1Address = 'l1_address'
|
|
708
|
+
}
|
|
709
709
|
/**
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
710
|
+
* @export
|
|
711
|
+
* @enum {string}
|
|
712
|
+
*/
|
|
713
|
+
export enum GetAccountTxsByEnum {
|
|
714
|
+
AccountIndex = 'account_index',
|
|
715
|
+
L1Address = 'l1_address'
|
|
716
|
+
}
|
|
717
717
|
/**
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
718
|
+
* @export
|
|
719
|
+
* @enum {string}
|
|
720
|
+
*/
|
|
721
|
+
export enum GetBlockTxsByEnum {
|
|
722
|
+
Height = 'block_height',
|
|
723
|
+
Commitment = 'block_commitment'
|
|
724
|
+
}
|
|
725
725
|
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
726
|
+
* @export
|
|
727
|
+
* @enum {string}
|
|
728
|
+
*/
|
|
729
|
+
export enum GetTxByEnum {
|
|
730
|
+
Hash = 'hash',
|
|
731
|
+
SequenceIndex = 'sequence_index'
|
|
732
|
+
}
|
package/config.yaml
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
disallowAdditionalPropertiesIfNotPresent: true
|
|
2
2
|
packageName: zklighter
|
|
3
3
|
projectName: zklighter
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
additionalProperties:
|
|
5
|
+
modelPropertyNaming: original
|
|
6
|
+
paramNaming: original
|
|
7
|
+
stringEnums: true
|
|
8
|
+
supportsES6: true
|