zklighter-perps 1.0.4 → 1.0.6

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.
Files changed (89) hide show
  1. package/apis/AccountApi.ts +12 -0
  2. package/apis/BlockApi.ts +6 -0
  3. package/apis/CandlestickApi.ts +4 -0
  4. package/apis/InfoApi.ts +8 -0
  5. package/apis/OrderApi.ts +18 -0
  6. package/apis/RelayerApi.ts +2 -0
  7. package/apis/RootApi.ts +2 -0
  8. package/apis/TransactionApi.ts +26 -34
  9. package/apis/WsApi.ts +4 -0
  10. package/models/AccountMarketStats.ts +12 -18
  11. package/models/AccountPnL.ts +5 -7
  12. package/models/AccountPosition.ts +22 -33
  13. package/models/AccountStats.ts +10 -15
  14. package/models/Block.ts +27 -40
  15. package/models/Blocks.ts +5 -7
  16. package/models/Candlestick.ts +14 -21
  17. package/models/Candlesticks.ts +5 -7
  18. package/models/ContractAddress.ts +4 -6
  19. package/models/CurrentHeight.ts +2 -3
  20. package/models/DetailedAccount.ts +8 -11
  21. package/models/DetailedAccounts.ts +5 -7
  22. package/models/EnrichedTx.ts +6 -9
  23. package/models/ExchangeStats.ts +9 -13
  24. package/models/Funding.ts +8 -12
  25. package/models/Fundings.ts +5 -7
  26. package/models/L1ProviderInfo.ts +8 -12
  27. package/models/Layer1BasicInfo.ts +17 -24
  28. package/models/Layer2BasicInfo.ts +6 -9
  29. package/models/MainAccount.ts +6 -9
  30. package/models/MainAccounts.ts +5 -7
  31. package/models/MarketInfo.ts +22 -33
  32. package/models/MarketSig.ts +8 -12
  33. package/models/NextNonce.ts +2 -3
  34. package/models/Order.ts +32 -48
  35. package/models/OrderBook.ts +20 -30
  36. package/models/OrderBookDepth.ts +8 -11
  37. package/models/OrderBookDetail.ts +36 -54
  38. package/models/OrderBookDetails.ts +3 -4
  39. package/models/OrderBookOrders.ts +10 -14
  40. package/models/OrderBookStats.ts +12 -18
  41. package/models/OrderBooks.ts +3 -4
  42. package/models/Orders.ts +3 -4
  43. package/models/Permission.ts +2 -3
  44. package/models/PnLEntry.ts +4 -6
  45. package/models/PriceLevel.ts +4 -6
  46. package/models/ReqDoFaucet.ts +2 -3
  47. package/models/ReqGetAccount.ts +4 -6
  48. package/models/ReqGetAccountActiveOrders.ts +6 -9
  49. package/models/ReqGetAccountByL1Address.ts +2 -3
  50. package/models/ReqGetAccountInactiveOrders.ts +8 -12
  51. package/models/ReqGetAccountOrders.ts +6 -9
  52. package/models/ReqGetAccountPnL.ts +12 -18
  53. package/models/ReqGetBlock.ts +4 -6
  54. package/models/ReqGetBlockTxs.ts +4 -6
  55. package/models/ReqGetByAccount.ts +4 -6
  56. package/models/ReqGetCandlesticks.ts +10 -15
  57. package/models/ReqGetFundings.ts +10 -15
  58. package/models/ReqGetL1Tx.ts +2 -3
  59. package/models/ReqGetMarketSig.ts +6 -9
  60. package/models/ReqGetNextNonce.ts +4 -6
  61. package/models/ReqGetOrderBookDetails.ts +2 -3
  62. package/models/ReqGetOrderBookOrders.ts +4 -6
  63. package/models/ReqGetOrderBooks.ts +2 -3
  64. package/models/ReqGetPermission.ts +6 -9
  65. package/models/ReqGetRangeWithCursor.ts +2 -3
  66. package/models/ReqGetRangeWithIndex.ts +2 -3
  67. package/models/ReqGetRecentTrades.ts +4 -6
  68. package/models/ReqGetRollbacks.ts +6 -9
  69. package/models/ReqGetSubAccount.ts +6 -9
  70. package/models/ReqGetTrades.ts +8 -12
  71. package/models/ReqGetTx.ts +4 -6
  72. package/models/ReqSearch.ts +2 -3
  73. package/models/ResultCode.ts +2 -3
  74. package/models/Rollback.ts +8 -12
  75. package/models/Rollbacks.ts +5 -7
  76. package/models/Search.ts +2 -3
  77. package/models/SignBody.ts +2 -3
  78. package/models/SimpleOrder.ts +12 -18
  79. package/models/Status.ts +4 -6
  80. package/models/SubAccount.ts +16 -24
  81. package/models/SubAccounts.ts +9 -13
  82. package/models/Trade.ts +24 -36
  83. package/models/Trades.ts +3 -4
  84. package/models/Tx.ts +28 -42
  85. package/models/TxHash.ts +2 -3
  86. package/models/Txs.ts +3 -4
  87. package/models/ValidatorInfo.ts +4 -6
  88. package/openapi.json +192 -610
  89. package/package.json +1 -1
@@ -79,6 +79,7 @@ export class AccountApi extends runtime.BaseAPI {
79
79
 
80
80
  /**
81
81
  * Request funds from faucet
82
+ * DoFaucet
82
83
  */
83
84
  async doFaucetRaw(requestParameters: DoFaucetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
84
85
  if (requestParameters['l1Address'] == null) {
@@ -108,6 +109,7 @@ export class AccountApi extends runtime.BaseAPI {
108
109
 
109
110
  /**
110
111
  * Request funds from faucet
112
+ * DoFaucet
111
113
  */
112
114
  async doFaucet(requestParameters: DoFaucetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
113
115
  const response = await this.doFaucetRaw(requestParameters, initOverrides);
@@ -116,6 +118,7 @@ export class AccountApi extends runtime.BaseAPI {
116
118
 
117
119
  /**
118
120
  * Get account by main account\'s l1_address or index and sub account\'s index. Returns detailed account info
121
+ * GetAccount
119
122
  */
120
123
  async getAccountRaw(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DetailedAccounts>> {
121
124
  if (requestParameters['by'] == null) {
@@ -167,6 +170,7 @@ export class AccountApi extends runtime.BaseAPI {
167
170
 
168
171
  /**
169
172
  * Get account by main account\'s l1_address or index and sub account\'s index. Returns detailed account info
173
+ * GetAccount
170
174
  */
171
175
  async getAccount(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DetailedAccounts> {
172
176
  const response = await this.getAccountRaw(requestParameters, initOverrides);
@@ -175,6 +179,7 @@ export class AccountApi extends runtime.BaseAPI {
175
179
 
176
180
  /**
177
181
  * Get account PnL chart
182
+ * GetAccountPnl
178
183
  */
179
184
  async getAccountPnlRaw(requestParameters: GetAccountPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPnL>> {
180
185
  if (requestParameters['by'] == null) {
@@ -259,6 +264,7 @@ export class AccountApi extends runtime.BaseAPI {
259
264
 
260
265
  /**
261
266
  * Get account PnL chart
267
+ * GetAccountPnl
262
268
  */
263
269
  async getAccountPnl(requestParameters: GetAccountPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountPnL> {
264
270
  const response = await this.getAccountPnlRaw(requestParameters, initOverrides);
@@ -267,6 +273,7 @@ export class AccountApi extends runtime.BaseAPI {
267
273
 
268
274
  /**
269
275
  * Get accounts returns main accounts by account index
276
+ * GetAccounts
270
277
  */
271
278
  async getAccountsRaw(requestParameters: GetAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MainAccounts>> {
272
279
  if (requestParameters['limit'] == null) {
@@ -304,6 +311,7 @@ export class AccountApi extends runtime.BaseAPI {
304
311
 
305
312
  /**
306
313
  * Get accounts returns main accounts by account index
314
+ * GetAccounts
307
315
  */
308
316
  async getAccounts(requestParameters: GetAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MainAccounts> {
309
317
  const response = await this.getAccountsRaw(requestParameters, initOverrides);
@@ -312,6 +320,7 @@ export class AccountApi extends runtime.BaseAPI {
312
320
 
313
321
  /**
314
322
  * Get accounts by l1_address returns main account and its sub accounts
323
+ * GetAccountsByL1Address
315
324
  */
316
325
  async getAccountsByL1AddressRaw(requestParameters: GetAccountsByL1AddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubAccounts>> {
317
326
  if (requestParameters['l1Address'] == null) {
@@ -341,6 +350,7 @@ export class AccountApi extends runtime.BaseAPI {
341
350
 
342
351
  /**
343
352
  * Get accounts by l1_address returns main account and its sub accounts
353
+ * GetAccountsByL1Address
344
354
  */
345
355
  async getAccountsByL1Address(requestParameters: GetAccountsByL1AddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubAccounts> {
346
356
  const response = await this.getAccountsByL1AddressRaw(requestParameters, initOverrides);
@@ -349,6 +359,7 @@ export class AccountApi extends runtime.BaseAPI {
349
359
 
350
360
  /**
351
361
  * Get permission by account\'s l1_address, index and tx_type
362
+ * GetPermission
352
363
  */
353
364
  async getPermissionRaw(requestParameters: GetPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Permission>> {
354
365
  if (requestParameters['by'] == null) {
@@ -400,6 +411,7 @@ export class AccountApi extends runtime.BaseAPI {
400
411
 
401
412
  /**
402
413
  * Get permission by account\'s l1_address, index and tx_type
414
+ * GetPermission
403
415
  */
404
416
  async getPermission(requestParameters: GetPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Permission> {
405
417
  const response = await this.getPermissionRaw(requestParameters, initOverrides);
package/apis/BlockApi.ts CHANGED
@@ -43,6 +43,7 @@ export class BlockApi extends runtime.BaseAPI {
43
43
 
44
44
  /**
45
45
  * Get block by its height or commitment
46
+ * GetBlock
46
47
  */
47
48
  async getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
48
49
  if (requestParameters['by'] == null) {
@@ -83,6 +84,7 @@ export class BlockApi extends runtime.BaseAPI {
83
84
 
84
85
  /**
85
86
  * Get block by its height or commitment
87
+ * GetBlock
86
88
  */
87
89
  async getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
88
90
  const response = await this.getBlockRaw(requestParameters, initOverrides);
@@ -91,6 +93,7 @@ export class BlockApi extends runtime.BaseAPI {
91
93
 
92
94
  /**
93
95
  * Get blocks
96
+ * GetBlocks
94
97
  */
95
98
  async getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
96
99
  if (requestParameters['limit'] == null) {
@@ -128,6 +131,7 @@ export class BlockApi extends runtime.BaseAPI {
128
131
 
129
132
  /**
130
133
  * Get blocks
134
+ * GetBlocks
131
135
  */
132
136
  async getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
133
137
  const response = await this.getBlocksRaw(requestParameters, initOverrides);
@@ -135,6 +139,7 @@ export class BlockApi extends runtime.BaseAPI {
135
139
  }
136
140
 
137
141
  /**
142
+ * GetCurrentHeight
138
143
  */
139
144
  async getCurrentHeightRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrentHeight>> {
140
145
  const queryParameters: any = {};
@@ -152,6 +157,7 @@ export class BlockApi extends runtime.BaseAPI {
152
157
  }
153
158
 
154
159
  /**
160
+ * GetCurrentHeight
155
161
  */
156
162
  async getCurrentHeight(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrentHeight> {
157
163
  const response = await this.getCurrentHeightRaw(initOverrides);
@@ -48,6 +48,7 @@ export class CandlestickApi extends runtime.BaseAPI {
48
48
 
49
49
  /**
50
50
  * Get candlesticks
51
+ * GetCandlesticks
51
52
  */
52
53
  async getCandlesticksRaw(requestParameters: GetCandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Candlesticks>> {
53
54
  if (requestParameters['marketId'] == null) {
@@ -121,6 +122,7 @@ export class CandlestickApi extends runtime.BaseAPI {
121
122
 
122
123
  /**
123
124
  * Get candlesticks
125
+ * GetCandlesticks
124
126
  */
125
127
  async getCandlesticks(requestParameters: GetCandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Candlesticks> {
126
128
  const response = await this.getCandlesticksRaw(requestParameters, initOverrides);
@@ -129,6 +131,7 @@ export class CandlestickApi extends runtime.BaseAPI {
129
131
 
130
132
  /**
131
133
  * Get fundings
134
+ * GetFundings
132
135
  */
133
136
  async getFundingsRaw(requestParameters: GetFundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Fundings>> {
134
137
  if (requestParameters['marketId'] == null) {
@@ -202,6 +205,7 @@ export class CandlestickApi extends runtime.BaseAPI {
202
205
 
203
206
  /**
204
207
  * Get fundings
208
+ * GetFundings
205
209
  */
206
210
  async getFundings(requestParameters: GetFundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Fundings> {
207
211
  const response = await this.getFundingsRaw(requestParameters, initOverrides);
package/apis/InfoApi.ts CHANGED
@@ -48,6 +48,7 @@ export class InfoApi extends runtime.BaseAPI {
48
48
 
49
49
  /**
50
50
  * Get zklighter l1 general info, including contract address and rpc info
51
+ * GetLayer1BasicInfo
51
52
  */
52
53
  async getLayer1BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer1BasicInfo>> {
53
54
  const queryParameters: any = {};
@@ -66,6 +67,7 @@ export class InfoApi extends runtime.BaseAPI {
66
67
 
67
68
  /**
68
69
  * Get zklighter l1 general info, including contract address and rpc info
70
+ * GetLayer1BasicInfo
69
71
  */
70
72
  async getLayer1BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer1BasicInfo> {
71
73
  const response = await this.getLayer1BasicInfoRaw(initOverrides);
@@ -74,6 +76,7 @@ export class InfoApi extends runtime.BaseAPI {
74
76
 
75
77
  /**
76
78
  * Get zklighter general info, including contract address, and count of transactions and active users
79
+ * GetLayer2BasicInfo
77
80
  */
78
81
  async getLayer2BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer2BasicInfo>> {
79
82
  const queryParameters: any = {};
@@ -92,6 +95,7 @@ export class InfoApi extends runtime.BaseAPI {
92
95
 
93
96
  /**
94
97
  * Get zklighter general info, including contract address, and count of transactions and active users
98
+ * GetLayer2BasicInfo
95
99
  */
96
100
  async getLayer2BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer2BasicInfo> {
97
101
  const response = await this.getLayer2BasicInfoRaw(initOverrides);
@@ -100,6 +104,7 @@ export class InfoApi extends runtime.BaseAPI {
100
104
 
101
105
  /**
102
106
  * Get rollbacks
107
+ * GetRollbacks
103
108
  */
104
109
  async getRollbacksRaw(requestParameters: GetRollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Rollbacks>> {
105
110
  if (requestParameters['fromBlockHeight'] == null) {
@@ -151,6 +156,7 @@ export class InfoApi extends runtime.BaseAPI {
151
156
 
152
157
  /**
153
158
  * Get rollbacks
159
+ * GetRollbacks
154
160
  */
155
161
  async getRollbacks(requestParameters: GetRollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Rollbacks> {
156
162
  const response = await this.getRollbacksRaw(requestParameters, initOverrides);
@@ -159,6 +165,7 @@ export class InfoApi extends runtime.BaseAPI {
159
165
 
160
166
  /**
161
167
  * Search with a specific keyword
168
+ * Search
162
169
  */
163
170
  async searchRaw(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Search>> {
164
171
  if (requestParameters['keyword'] == null) {
@@ -188,6 +195,7 @@ export class InfoApi extends runtime.BaseAPI {
188
195
 
189
196
  /**
190
197
  * Search with a specific keyword
198
+ * Search
191
199
  */
192
200
  async search(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Search> {
193
201
  const response = await this.searchRaw(requestParameters, initOverrides);
package/apis/OrderApi.ts CHANGED
@@ -94,6 +94,7 @@ export class OrderApi extends runtime.BaseAPI {
94
94
 
95
95
  /**
96
96
  * Get account active orders
97
+ * GetAccountActiveOrders
97
98
  */
98
99
  async getAccountActiveOrdersRaw(requestParameters: GetAccountActiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
99
100
  if (requestParameters['accountIndex'] == null) {
@@ -145,6 +146,7 @@ export class OrderApi extends runtime.BaseAPI {
145
146
 
146
147
  /**
147
148
  * Get account active orders
149
+ * GetAccountActiveOrders
148
150
  */
149
151
  async getAccountActiveOrders(requestParameters: GetAccountActiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Orders> {
150
152
  const response = await this.getAccountActiveOrdersRaw(requestParameters, initOverrides);
@@ -153,6 +155,7 @@ export class OrderApi extends runtime.BaseAPI {
153
155
 
154
156
  /**
155
157
  * Get account active orders
158
+ * GetAccountInactiveOrders
156
159
  */
157
160
  async getAccountInactiveOrdersRaw(requestParameters: GetAccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
158
161
  if (requestParameters['accountIndex'] == null) {
@@ -223,6 +226,7 @@ export class OrderApi extends runtime.BaseAPI {
223
226
 
224
227
  /**
225
228
  * Get account active orders
229
+ * GetAccountInactiveOrders
226
230
  */
227
231
  async getAccountInactiveOrders(requestParameters: GetAccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Orders> {
228
232
  const response = await this.getAccountInactiveOrdersRaw(requestParameters, initOverrides);
@@ -231,6 +235,7 @@ export class OrderApi extends runtime.BaseAPI {
231
235
 
232
236
  /**
233
237
  * Get account orders
238
+ * GetAccountOrders
234
239
  */
235
240
  async getAccountOrdersRaw(requestParameters: GetAccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
236
241
  if (requestParameters['accountIndex'] == null) {
@@ -286,6 +291,7 @@ export class OrderApi extends runtime.BaseAPI {
286
291
 
287
292
  /**
288
293
  * Get account orders
294
+ * GetAccountOrders
289
295
  */
290
296
  async getAccountOrders(requestParameters: GetAccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Orders> {
291
297
  const response = await this.getAccountOrdersRaw(requestParameters, initOverrides);
@@ -294,6 +300,7 @@ export class OrderApi extends runtime.BaseAPI {
294
300
 
295
301
  /**
296
302
  * Get exchange stats
303
+ * GetExchangeStats
297
304
  */
298
305
  async getExchangeStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExchangeStats>> {
299
306
  const queryParameters: any = {};
@@ -312,6 +319,7 @@ export class OrderApi extends runtime.BaseAPI {
312
319
 
313
320
  /**
314
321
  * Get exchange stats
322
+ * GetExchangeStats
315
323
  */
316
324
  async getExchangeStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExchangeStats> {
317
325
  const response = await this.getExchangeStatsRaw(initOverrides);
@@ -320,6 +328,7 @@ export class OrderApi extends runtime.BaseAPI {
320
328
 
321
329
  /**
322
330
  * Get order books metadata
331
+ * GetOrderBookDetails
323
332
  */
324
333
  async getOrderBookDetailsRaw(requestParameters: GetOrderBookDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderBookDetails>> {
325
334
  if (requestParameters['filter'] == null) {
@@ -353,6 +362,7 @@ export class OrderApi extends runtime.BaseAPI {
353
362
 
354
363
  /**
355
364
  * Get order books metadata
365
+ * GetOrderBookDetails
356
366
  */
357
367
  async getOrderBookDetails(requestParameters: GetOrderBookDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderBookDetails> {
358
368
  const response = await this.getOrderBookDetailsRaw(requestParameters, initOverrides);
@@ -361,6 +371,7 @@ export class OrderApi extends runtime.BaseAPI {
361
371
 
362
372
  /**
363
373
  * Get order book orders
374
+ * GetOrderBookOrders
364
375
  */
365
376
  async getOrderBookOrdersRaw(requestParameters: GetOrderBookOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderBookOrders>> {
366
377
  if (requestParameters['marketId'] == null) {
@@ -401,6 +412,7 @@ export class OrderApi extends runtime.BaseAPI {
401
412
 
402
413
  /**
403
414
  * Get order book orders
415
+ * GetOrderBookOrders
404
416
  */
405
417
  async getOrderBookOrders(requestParameters: GetOrderBookOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderBookOrders> {
406
418
  const response = await this.getOrderBookOrdersRaw(requestParameters, initOverrides);
@@ -409,6 +421,7 @@ export class OrderApi extends runtime.BaseAPI {
409
421
 
410
422
  /**
411
423
  * Get order books metadata
424
+ * GetOrderBooks
412
425
  */
413
426
  async getOrderBooksRaw(requestParameters: GetOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderBooks>> {
414
427
  if (requestParameters['filter'] == null) {
@@ -442,6 +455,7 @@ export class OrderApi extends runtime.BaseAPI {
442
455
 
443
456
  /**
444
457
  * Get order books metadata
458
+ * GetOrderBooks
445
459
  */
446
460
  async getOrderBooks(requestParameters: GetOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderBooks> {
447
461
  const response = await this.getOrderBooksRaw(requestParameters, initOverrides);
@@ -450,6 +464,7 @@ export class OrderApi extends runtime.BaseAPI {
450
464
 
451
465
  /**
452
466
  * Get recent trades
467
+ * GetRecentTrades
453
468
  */
454
469
  async getRecentTradesRaw(requestParameters: GetRecentTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Trades>> {
455
470
  if (requestParameters['marketId'] == null) {
@@ -490,6 +505,7 @@ export class OrderApi extends runtime.BaseAPI {
490
505
 
491
506
  /**
492
507
  * Get recent trades
508
+ * GetRecentTrades
493
509
  */
494
510
  async getRecentTrades(requestParameters: GetRecentTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Trades> {
495
511
  const response = await this.getRecentTradesRaw(requestParameters, initOverrides);
@@ -498,6 +514,7 @@ export class OrderApi extends runtime.BaseAPI {
498
514
 
499
515
  /**
500
516
  * Get trades
517
+ * GetTrades
501
518
  */
502
519
  async getTradesRaw(requestParameters: GetTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Trades>> {
503
520
  if (requestParameters['marketId'] == null) {
@@ -564,6 +581,7 @@ export class OrderApi extends runtime.BaseAPI {
564
581
 
565
582
  /**
566
583
  * Get trades
584
+ * GetTrades
567
585
  */
568
586
  async getTrades(requestParameters: GetTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Trades> {
569
587
  const response = await this.getTradesRaw(requestParameters, initOverrides);
@@ -35,6 +35,7 @@ export class RelayerApi extends runtime.BaseAPI {
35
35
 
36
36
  /**
37
37
  * Get Market Signature
38
+ * GetMarketSig
38
39
  */
39
40
  async getMarketSigRaw(requestParameters: GetMarketSigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarketSig>> {
40
41
  if (requestParameters['marketId'] == null) {
@@ -86,6 +87,7 @@ export class RelayerApi extends runtime.BaseAPI {
86
87
 
87
88
  /**
88
89
  * Get Market Signature
90
+ * GetMarketSig
89
91
  */
90
92
  async getMarketSig(requestParameters: GetMarketSigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarketSig> {
91
93
  const response = await this.getMarketSigRaw(requestParameters, initOverrides);
package/apis/RootApi.ts CHANGED
@@ -29,6 +29,7 @@ export class RootApi extends runtime.BaseAPI {
29
29
 
30
30
  /**
31
31
  * Get status of zklighter
32
+ * GetStatus
32
33
  */
33
34
  async getStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>> {
34
35
  const queryParameters: any = {};
@@ -47,6 +48,7 @@ export class RootApi extends runtime.BaseAPI {
47
48
 
48
49
  /**
49
50
  * Get status of zklighter
51
+ * GetStatus
50
52
  */
51
53
  async getStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status> {
52
54
  const response = await this.getStatusRaw(initOverrides);
@@ -54,8 +54,8 @@ export interface GetBlockTxsRequest {
54
54
  }
55
55
 
56
56
  export interface GetL2SignatureBodyRequest {
57
- txType: number;
58
- txInfo: string;
57
+ txType?: number;
58
+ txInfo?: string;
59
59
  }
60
60
 
61
61
  export interface GetNextNonceRequest {
@@ -83,8 +83,8 @@ export interface GetTxsRequest {
83
83
  }
84
84
 
85
85
  export interface SendTxRequest {
86
- txType: number;
87
- txInfo: string;
86
+ txType?: number;
87
+ txInfo?: string;
88
88
  }
89
89
 
90
90
  /**
@@ -94,6 +94,7 @@ export class TransactionApi extends runtime.BaseAPI {
94
94
 
95
95
  /**
96
96
  * Get pending transactions of a specific account
97
+ * GetAccountPendingTxs
97
98
  */
98
99
  async getAccountPendingTxsRaw(requestParameters: GetAccountPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
99
100
  if (requestParameters['by'] == null) {
@@ -138,6 +139,7 @@ export class TransactionApi extends runtime.BaseAPI {
138
139
 
139
140
  /**
140
141
  * Get pending transactions of a specific account
142
+ * GetAccountPendingTxs
141
143
  */
142
144
  async getAccountPendingTxs(requestParameters: GetAccountPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
143
145
  const response = await this.getAccountPendingTxsRaw(requestParameters, initOverrides);
@@ -146,6 +148,7 @@ export class TransactionApi extends runtime.BaseAPI {
146
148
 
147
149
  /**
148
150
  * Get transactions of a specific account
151
+ * GetAccountTxs
149
152
  */
150
153
  async getAccountTxsRaw(requestParameters: GetAccountTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
151
154
  if (requestParameters['limit'] == null) {
@@ -205,6 +208,7 @@ export class TransactionApi extends runtime.BaseAPI {
205
208
 
206
209
  /**
207
210
  * Get transactions of a specific account
211
+ * GetAccountTxs
208
212
  */
209
213
  async getAccountTxs(requestParameters: GetAccountTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
210
214
  const response = await this.getAccountTxsRaw(requestParameters, initOverrides);
@@ -213,6 +217,7 @@ export class TransactionApi extends runtime.BaseAPI {
213
217
 
214
218
  /**
215
219
  * Get transactions in a block
220
+ * GetBlockTxs
216
221
  */
217
222
  async getBlockTxsRaw(requestParameters: GetBlockTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
218
223
  if (requestParameters['by'] == null) {
@@ -253,6 +258,7 @@ export class TransactionApi extends runtime.BaseAPI {
253
258
 
254
259
  /**
255
260
  * Get transactions in a block
261
+ * GetBlockTxs
256
262
  */
257
263
  async getBlockTxs(requestParameters: GetBlockTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
258
264
  const response = await this.getBlockTxsRaw(requestParameters, initOverrides);
@@ -261,22 +267,9 @@ export class TransactionApi extends runtime.BaseAPI {
261
267
 
262
268
  /**
263
269
  * Get transaction signature body
270
+ * GetL2SignatureBody
264
271
  */
265
272
  async getL2SignatureBodyRaw(requestParameters: GetL2SignatureBodyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignBody>> {
266
- if (requestParameters['txType'] == null) {
267
- throw new runtime.RequiredError(
268
- 'txType',
269
- 'Required parameter "txType" was null or undefined when calling getL2SignatureBody().'
270
- );
271
- }
272
-
273
- if (requestParameters['txInfo'] == null) {
274
- throw new runtime.RequiredError(
275
- 'txInfo',
276
- 'Required parameter "txInfo" was null or undefined when calling getL2SignatureBody().'
277
- );
278
- }
279
-
280
273
  const queryParameters: any = {};
281
274
 
282
275
  const headerParameters: runtime.HTTPHeaders = {};
@@ -316,14 +309,16 @@ export class TransactionApi extends runtime.BaseAPI {
316
309
 
317
310
  /**
318
311
  * Get transaction signature body
312
+ * GetL2SignatureBody
319
313
  */
320
- async getL2SignatureBody(requestParameters: GetL2SignatureBodyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignBody> {
314
+ async getL2SignatureBody(requestParameters: GetL2SignatureBodyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignBody> {
321
315
  const response = await this.getL2SignatureBodyRaw(requestParameters, initOverrides);
322
316
  return await response.value();
323
317
  }
324
318
 
325
319
  /**
326
320
  * Get next nonce for a specific account
321
+ * GetNextNonce
327
322
  */
328
323
  async getNextNonceRaw(requestParameters: GetNextNonceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NextNonce>> {
329
324
  if (requestParameters['accountIndex'] == null) {
@@ -364,6 +359,7 @@ export class TransactionApi extends runtime.BaseAPI {
364
359
 
365
360
  /**
366
361
  * Get next nonce for a specific account
362
+ * GetNextNonce
367
363
  */
368
364
  async getNextNonce(requestParameters: GetNextNonceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NextNonce> {
369
365
  const response = await this.getNextNonceRaw(requestParameters, initOverrides);
@@ -372,6 +368,7 @@ export class TransactionApi extends runtime.BaseAPI {
372
368
 
373
369
  /**
374
370
  * Get pending transactions
371
+ * GetPendingTxs
375
372
  */
376
373
  async getPendingTxsRaw(requestParameters: GetPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
377
374
  if (requestParameters['limit'] == null) {
@@ -405,6 +402,7 @@ export class TransactionApi extends runtime.BaseAPI {
405
402
 
406
403
  /**
407
404
  * Get pending transactions
405
+ * GetPendingTxs
408
406
  */
409
407
  async getPendingTxs(requestParameters: GetPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
410
408
  const response = await this.getPendingTxsRaw(requestParameters, initOverrides);
@@ -413,6 +411,7 @@ export class TransactionApi extends runtime.BaseAPI {
413
411
 
414
412
  /**
415
413
  * Get transaction by hash or sequence index
414
+ * GetTx
416
415
  */
417
416
  async getTxRaw(requestParameters: GetTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnrichedTx>> {
418
417
  if (requestParameters['by'] == null) {
@@ -453,6 +452,7 @@ export class TransactionApi extends runtime.BaseAPI {
453
452
 
454
453
  /**
455
454
  * Get transaction by hash or sequence index
455
+ * GetTx
456
456
  */
457
457
  async getTx(requestParameters: GetTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnrichedTx> {
458
458
  const response = await this.getTxRaw(requestParameters, initOverrides);
@@ -461,6 +461,7 @@ export class TransactionApi extends runtime.BaseAPI {
461
461
 
462
462
  /**
463
463
  * Get L1 transaction by L1 transaction hash
464
+ * getTxFromL1TxHash
464
465
  */
465
466
  async getTxFromL1TxHashRaw(requestParameters: GetTxFromL1TxHashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnrichedTx>> {
466
467
  if (requestParameters['hash'] == null) {
@@ -490,6 +491,7 @@ export class TransactionApi extends runtime.BaseAPI {
490
491
 
491
492
  /**
492
493
  * Get L1 transaction by L1 transaction hash
494
+ * getTxFromL1TxHash
493
495
  */
494
496
  async getTxFromL1TxHash(requestParameters: GetTxFromL1TxHashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnrichedTx> {
495
497
  const response = await this.getTxFromL1TxHashRaw(requestParameters, initOverrides);
@@ -498,6 +500,7 @@ export class TransactionApi extends runtime.BaseAPI {
498
500
 
499
501
  /**
500
502
  * Get transactions which are already packed into blocks
503
+ * GetTxs
501
504
  */
502
505
  async getTxsRaw(requestParameters: GetTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
503
506
  if (requestParameters['limit'] == null) {
@@ -531,6 +534,7 @@ export class TransactionApi extends runtime.BaseAPI {
531
534
 
532
535
  /**
533
536
  * Get transactions which are already packed into blocks
537
+ * GetTxs
534
538
  */
535
539
  async getTxs(requestParameters: GetTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
536
540
  const response = await this.getTxsRaw(requestParameters, initOverrides);
@@ -539,22 +543,9 @@ export class TransactionApi extends runtime.BaseAPI {
539
543
 
540
544
  /**
541
545
  * Send raw transaction
546
+ * SendTx
542
547
  */
543
548
  async sendTxRaw(requestParameters: SendTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TxHash>> {
544
- if (requestParameters['txType'] == null) {
545
- throw new runtime.RequiredError(
546
- 'txType',
547
- 'Required parameter "txType" was null or undefined when calling sendTx().'
548
- );
549
- }
550
-
551
- if (requestParameters['txInfo'] == null) {
552
- throw new runtime.RequiredError(
553
- 'txInfo',
554
- 'Required parameter "txInfo" was null or undefined when calling sendTx().'
555
- );
556
- }
557
-
558
549
  const queryParameters: any = {};
559
550
 
560
551
  const headerParameters: runtime.HTTPHeaders = {};
@@ -594,8 +585,9 @@ export class TransactionApi extends runtime.BaseAPI {
594
585
 
595
586
  /**
596
587
  * Send raw transaction
588
+ * SendTx
597
589
  */
598
- async sendTx(requestParameters: SendTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TxHash> {
590
+ async sendTx(requestParameters: SendTxRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TxHash> {
599
591
  const response = await this.sendTxRaw(requestParameters, initOverrides);
600
592
  return await response.value();
601
593
  }
package/apis/WsApi.ts CHANGED
@@ -29,6 +29,7 @@ export class WsApi extends runtime.BaseAPI {
29
29
 
30
30
  /**
31
31
  * WebSocket Status
32
+ * GetWebSocketStatus
32
33
  */
33
34
  async getWebSocketStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
34
35
  const queryParameters: any = {};
@@ -47,6 +48,7 @@ export class WsApi extends runtime.BaseAPI {
47
48
 
48
49
  /**
49
50
  * WebSocket Status
51
+ * GetWebSocketStatus
50
52
  */
51
53
  async getWebSocketStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
52
54
  const response = await this.getWebSocketStatusRaw(initOverrides);
@@ -55,6 +57,7 @@ export class WsApi extends runtime.BaseAPI {
55
57
 
56
58
  /**
57
59
  * WebSocket
60
+ * Stream
58
61
  */
59
62
  async streamRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
60
63
  const queryParameters: any = {};
@@ -73,6 +76,7 @@ export class WsApi extends runtime.BaseAPI {
73
76
 
74
77
  /**
75
78
  * WebSocket
79
+ * Stream
76
80
  */
77
81
  async stream(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
78
82
  const response = await this.streamRaw(initOverrides);