hermez-node/api/swagger.yml
api/swagger.ymlRaw
1openapi: 3.0.0
2info:
3 description: |
4 This API server is the layer that allows 3rd party apps and services interfacing with the coordinator to explore, monitor and use the Hermez rollup.
5 Example of these apps are:
6 * Wallet: send L2 transactions, check balance, ...
7 * Explorer: List transactions, slots, batches, ...
8 * Exchange integrations
9
10 ### Pagination
11
12 #### Usage
13
14 All the endpoints that return a list of undefined size use pagination. Unless the opposite is explicitly said.
15 In order to use pagination, three query parameters are used:
16 * `fromItem`: indicates the first item to be returned. In general, this parameter shouldn't be provided in the first call to the endpoint, and use the `itemId` of the last returned item (+/-) 1, if the order is (ascending/descending).
17 * `order`: all pginated items are ordered chronologicaly. However the specific fields to guarantee this order depend on each endpoint. For this purpose, `itemId` is used (itemId follows ascending chronological order except for unforged L1 user transactions). If the parameter is not provided, ascending order will be used by default.
18 * `limit`: maximum amount of items to include in each response. Default is 20, maximum 2049.
19
20 Responses for those endpoint will always include a `pagination` object. This object includes the total amount of items that the endpoint will return at a given time with the given filters. Apart from that, it also includes the `itemId` of the last and first items that will be returned (not in a single response but within the total items). These two properties can be used to know when to stop querying.
21
22 #### Reorgs and safetyness
23
24 Since all the items are ordered chronologicaly, there are no safety problems when fetching items in ascending order, except for reorgs (more on this later).
25 On the other hand, when iterating in descending order, new items will be added at the beginning. This doesn't cause any safety problem, but to get those new items, it's necessary to start queryng without the `fromItem` set to `pagination.lastItem`.
26 To handle reorgs, the `itemId` can be used since it will change. This is important since other identifiers may be the same but with different content. As an example, if the batch 424 get's reorged, it will be deleted, but eventualy, a new batch 424 will appear with potentialy different content.
27
28 ### Signatures
29
30 The POST endpoint require to be signed using BabyJubJub or Ethereum keys. TODO: add references to libraries / examples / ...
31
32 version: "0.0.1"
33 title: Hermez Network API
34# termsOfService: 'http://swagger.io/terms/'
35# contact:
36# email: apiteam@swagger.io
37# license:
38# name: Apache 2.0
39# url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
40externalDocs:
41 description: Find out more about Hermez.
42 url: 'https://hermez.io'
43servers:
44 - description: Hosted mock up
45 url: http://167.71.59.190:4010
46 - description: Localhost mock Up
47 url: http://localhost:4010
48tags:
49 - name: Account
50 description: Hermez account and the tokens it holds.
51 externalDocs:
52 description: Find out more.
53 url: 'https://idocs.hermez.io/#/spec/zkrollup/README?id=account-types'
54 - name: Transaction
55 description: Send tokens off chain and track transactions.
56 externalDocs:
57 description: Find out more
58 url: 'https://idocs.hermez.io/#/spec/zkrollup/README?id=transaction-types'
59 - name: Hermez status
60 description: Info about operators, tokens, auctions and more.
61 externalDocs:
62 description: Find out more.
63 url: 'https://idocs.hermez.io/#/spec/zkrollup/README'
64paths:
65 '/account-creation-authorization':
66 post:
67 tags:
68 - Account
69 summary: Send an authorization that will allow the coordinator to register accounts associated to an Ethereum address on behalf of the user.
70 description: >-
71 Send an authorization to create rollup accounts associated to an Ethereum address. Each account creation (an account can only hold a specific token) is effective once the coordinator forges the corresponding L1CoordinatorTx (which are always of type *account creation*).
72 operationId: postRegister
73 requestBody:
74 description: Account creation authorization.
75 required: true
76 content:
77 application/json:
78 schema:
79 $ref: '#/components/schemas/AccountCreationAuthorization'
80 responses:
81 '200':
82 description: Successful operation.
83 '400':
84 description: Bad request.
85 content:
86 application/json:
87 schema:
88 $ref: '#/components/schemas/Error400'
89 '500':
90 description: Internal server error.
91 content:
92 application/json:
93 schema:
94 $ref: '#/components/schemas/Error500'
95 '/account-creation-authorization/{hezEthereumAddress}':
96 get:
97 tags:
98 - Account
99 summary: Get to know if the coordinator has the ability to create accounts associated to an Ethereum address.
100 description: >-
101 True if the coordinator has the required authorization to perform an account creation with the given Ethereum address on behalf of the Ethereum address holder.
102 operationId: getAccountCreationAuthorization
103 parameters:
104 - name: hezEthereumAddress
105 in: path
106 description: Ethereum address.
107 required: true
108 schema:
109 $ref: '#/components/schemas/HezEthereumAddress'
110 responses:
111 '200':
112 description: Successful operation.
113 content:
114 application/json:
115 schema:
116 $ref: '#/components/schemas/AccountCreationAuthorization'
117 '400':
118 description: Bad request.
119 content:
120 application/json:
121 schema:
122 $ref: '#/components/schemas/Error400'
123 '404':
124 description: Not found.
125 content:
126 application/json:
127 schema:
128 $ref: '#/components/schemas/Error404'
129 '500':
130 description: Internal server error.
131 content:
132 application/json:
133 schema:
134 $ref: '#/components/schemas/Error500'
135 '/accounts':
136 get:
137 tags:
138 - Account
139 summary: Get accounts balances and other associated information.
140 description: Get accounts balances and other associated information.
141 operationId: getAccounts
142 parameters:
143 - name: hezEthereumAddress
144 in: query
145 description: Only get accounts associated to an Ethereum address. Incompatible with the query `BJJ`.
146 required: false
147 schema:
148 $ref: '#/components/schemas/HezEthereumAddress'
149 - name: BJJ
150 in: query
151 description: Only get accounts associated to a BabyJubJub public key. Incompatible with the query `hezEthereumAddress`.
152 required: false
153 schema:
154 $ref: '#/components/schemas/BJJ'
155 - name: tokenIds
156 in: query
157 required: false
158 description: Only get accounts of specific tokens.
159 schema:
160 type: string
161 description: Comma separated list of token identifiers.
162 example: "3,87,91"
163 - name: fromItem
164 in: query
165 required: false
166 description: Indicates the desired first item (using the itemId property) to be included in the response.
167 schema:
168 type: number
169 - name: order
170 in: query
171 required: false
172 description: Order of the returned items. Accounts will be ordered by increasing account index.
173 schema:
174 type: string
175 default: ASC
176 enum:
177 - ASC
178 - DESC
179 - name: limit
180 in: query
181 required: false
182 description: Maximum number of items to be returned.
183 schema:
184 type: integer
185 minimum: 1
186 maximum: 2049
187 responses:
188 '200':
189 description: Successful operation.
190 content:
191 application/json:
192 schema:
193 $ref: '#/components/schemas/Accounts'
194 '400':
195 description: Bad request.
196 content:
197 application/json:
198 schema:
199 $ref: '#/components/schemas/Error400'
200 '404':
201 description: Not found.
202 content:
203 application/json:
204 schema:
205 $ref: '#/components/schemas/Error404'
206 '500':
207 description: Internal server error.
208 content:
209 application/json:
210 schema:
211 $ref: '#/components/schemas/Error500'
212 '/accounts/{accountIndex}':
213 get:
214 tags:
215 - Account
216 summary: Get an account by its index.
217 description: Get an account by its index.
218 operationId: getAccount
219 parameters:
220 - name: accountIndex
221 in: path
222 description: Identifier of an account.
223 required: true
224 schema:
225 $ref: '#/components/schemas/AccountIndex'
226 responses:
227 '200':
228 description: Successful operation.
229 content:
230 application/json:
231 schema:
232 $ref: '#/components/schemas/Account'
233 '400':
234 description: Bad request.
235 content:
236 application/json:
237 schema:
238 $ref: '#/components/schemas/Error400'
239 '404':
240 description: Not found.
241 content:
242 application/json:
243 schema:
244 $ref: '#/components/schemas/Error404'
245 '500':
246 description: Internal server error.
247 content:
248 application/json:
249 schema:
250 $ref: '#/components/schemas/Error500'
251 '/exits':
252 get:
253 tags:
254 - Account
255 summary: Get exit information. This information is required to perform a withdraw.
256 description: Get exit information. This information is required to perform a withdraw.
257 operationId: getExits
258 parameters:
259 - name: tokenId
260 in: query
261 required: false
262 description: Only get exits of specific token
263 schema:
264 $ref: '#/components/schemas/TokenId'
265 - name: hezEthereumAddress
266 in: query
267 description: Get exits associated to a Ethereum address. Incompatible with query `BJJ` and `accountIndex`.
268 required: false
269 schema:
270 $ref: '#/components/schemas/HezEthereumAddress'
271 - name: BJJ
272 in: query
273 description: Get exits associated to a BabyJubJub public key. Incompatible with query `hezEthereumAddress` and `accountIndex`.
274 required: false
275 schema:
276 $ref: '#/components/schemas/BJJ'
277 - name: accountIndex
278 in: query
279 description: Get exits associated to a specific account. Incompatible with queries `tokenId`, `hezEthereumAddress` and `BJJ`.
280 required: false
281 schema:
282 $ref: '#/components/schemas/AccountIndex'
283 - name: batchNum
284 in: query
285 description: Get exits from the exit tree of a specific batch.
286 required: false
287 schema:
288 $ref: '#/components/schemas/BatchNum'
289 - name: fromItem
290 in: query
291 required: false
292 description: Indicates the desired first item (using the itemId property) to be included in the response.
293 schema:
294 type: number
295 - name: order
296 in: query
297 required: false
298 description: Order of the returned items. Exits will be ordered by increasing (batchNum, accountIndex).
299 schema:
300 type: string
301 default: ASC
302 enum:
303 - ASC
304 - DESC
305 - name: limit
306 in: query
307 required: false
308 description: Maximum number of items to be returned.
309 schema:
310 type: integer
311 minimum: 1
312 maximum: 2049
313 responses:
314 '200':
315 description: Successful operation.
316 content:
317 application/json:
318 schema:
319 $ref: '#/components/schemas/Exits'
320 '400':
321 description: Bad request.
322 content:
323 application/json:
324 schema:
325 $ref: '#/components/schemas/Error400'
326 '404':
327 description: Not found.
328 content:
329 application/json:
330 schema:
331 $ref: '#/components/schemas/Error404'
332 '500':
333 description: Internal server error.
334 content:
335 application/json:
336 schema:
337 $ref: '#/components/schemas/Error500'
338 '/exits/{batchNum}/{accountIndex}':
339 get:
340 tags:
341 - Account
342 summary: Get specific exit information.
343 description: Get exit information form a specific exit tree and account. This information is required to perform a withdraw.
344 operationId: getExit
345 parameters:
346 - name: batchNum
347 in: path
348 description: Batch of the exit tree.
349 required: true
350 schema:
351 $ref: '#/components/schemas/BatchNum'
352 - name: accountIndex
353 in: path
354 description: Account identifier.
355 required: true
356 schema:
357 $ref: '#/components/schemas/AccountIndex'
358 responses:
359 '200':
360 description: Successful operation.
361 content:
362 application/json:
363 schema:
364 $ref: '#/components/schemas/Exit'
365 '400':
366 description: Bad request.
367 content:
368 application/json:
369 schema:
370 $ref: '#/components/schemas/Error400'
371 '404':
372 description: Not found.
373 content:
374 application/json:
375 schema:
376 $ref: '#/components/schemas/Error404'
377 '500':
378 description: Internal server error.
379 content:
380 application/json:
381 schema:
382 $ref: '#/components/schemas/Error500'
383 '/transactions-pool':
384 post:
385 tags:
386 - Transaction
387 summary: Add an L2 transaction to the coordinator's pool
388 description: >-
389 Send L2 transaction. The transaction will be stored in the transaction pool of the coordinator and eventually forged.
390 operationId: postTx
391 requestBody:
392 description: Signed transaction.
393 required: true
394 content:
395 application/json:
396 schema:
397 $ref: '#/components/schemas/PostPoolL2Transaction'
398 responses:
399 '200':
400 description: Successful operation.
401 content:
402 application/json:
403 schema:
404 $ref: '#/components/schemas/TransactionId'
405 '400':
406 description: Bad request.
407 content:
408 application/json:
409 schema:
410 $ref: '#/components/schemas/Error400'
411 '500':
412 description: Internal server error.
413 content:
414 application/json:
415 schema:
416 $ref: '#/components/schemas/Error500'
417 '/transactions-pool/{id}':
418 get:
419 tags:
420 - Transaction
421 summary: Get details and status of a transaction that is in the pool.
422 description: >-
423 Get transaction from the pool by its id. This endpoint is specially useful for tracking the status of a transaction that may not be forged yet.
424 Only transactions from the pool will be returned.
425 Note that the transaction pool is different for each coordinator and therefore only a coordinator that has received a specific transaction
426 will be able to provide information about that transaction.
427 operationId: getPoolTx
428 parameters:
429 - name: id
430 in: path
431 description: Transaction identifier.
432 required: true
433 schema:
434 $ref: '#/components/schemas/TransactionId'
435 responses:
436 '200':
437 description: Successful operation.
438 content:
439 application/json:
440 schema:
441 $ref: '#/components/schemas/PoolL2Transaction'
442 '400':
443 description: Bad request.
444 content:
445 application/json:
446 schema:
447 $ref: '#/components/schemas/Error400'
448 '404':
449 description: Not found.
450 content:
451 application/json:
452 schema:
453 $ref: '#/components/schemas/Error404'
454 '500':
455 description: Internal server error.
456 content:
457 application/json:
458 schema:
459 $ref: '#/components/schemas/Error500'
460 '/transactions-history':
461 get:
462 tags:
463 - Transaction
464 summary: Get details and status of transactions that have been forged.
465 description: >-
466 Get historical transactions. This endpoint will return all the different types of transactions except for:
467 - Transactions that are still in the transaction pool of any coordinator. These transactions can be fetched using `GET /transactions-pool/{id}`.
468 - L1 transactions sent by users that have not been forged yet. These transactions can be fetched using `GET /transactions-history/{id}`.
469 operationId: getHistoryTxs
470 parameters:
471 - name: tokenId
472 in: query
473 required: false
474 description: Only get transactions of specific token
475 schema:
476 $ref: '#/components/schemas/TokenId'
477 - name: hezEthereumAddress
478 in: query
479 required: false
480 description: Only get transactions sent from or to an account associated to an Ethereum address Incompatible with the queries `BJJ` and `accountIndex`.
481 schema:
482 $ref: '#/components/schemas/HezEthereumAddress'
483 - name: BJJ
484 in: query
485 description: Only get transactions associated to a BabyJubJub public key. Incompatible with the queries `hezEthereumAddress` and `accountIndex`.
486 required: false
487 schema:
488 $ref: '#/components/schemas/BJJ'
489 - name: accountIndex
490 in: query
491 required: false
492 description: Only get transactions sent from or to a specific account. Incompatible with the queries `tokenId`, `hezEthereumAddress` and `BJJ`.
493 schema:
494 $ref: '#/components/schemas/AccountIndex'
495 - name: batchNum
496 in: query
497 required: false
498 description: Only get transactions forged in a specific batch.
499 schema:
500 $ref: '#/components/schemas/BatchNum'
501 - name: type
502 in: query
503 required: false
504 description: Only get transactions of a specific type.
505 schema:
506 $ref: '#/components/schemas/TransactionType'
507 - name: fromItem
508 in: query
509 required: false
510 description: Indicates the desired first item (using the itemId property) to be included in the response.
511 schema:
512 type: number
513 - name: order
514 in: query
515 required: false
516 description: Order of the returned items. History transactions will be ordered by (batchNum, position).
517 schema:
518 type: string
519 default: ASC
520 enum:
521 - ASC
522 - DESC
523 - name: limit
524 in: query
525 required: false
526 description: Maximum number of items to be returned.
527 schema:
528 type: integer
529 minimum: 1
530 maximum: 2049
531 responses:
532 '200':
533 description: Successful operation.
534 content:
535 application/json:
536 schema:
537 $ref: '#/components/schemas/HistoryTransactions'
538 '400':
539 description: Bad request.
540 content:
541 application/json:
542 schema:
543 $ref: '#/components/schemas/Error400'
544 '404':
545 description: Not found.
546 content:
547 application/json:
548 schema:
549 $ref: '#/components/schemas/Error404'
550 '500':
551 description: Internal server error.
552 content:
553 application/json:
554 schema:
555 $ref: '#/components/schemas/Error500'
556 '/transactions-history/{id}':
557 get:
558 tags:
559 - Transaction
560 summary: Get details and status of a historical transaction.
561 description: >-
562 Get transaction from the history by its id. This endpoint will return all the different types of transactions except those that are still in the pool of any coordinator.
563 operationId: getHistoryTx
564 parameters:
565 - name: id
566 in: path
567 description: Transaction identifier.
568 required: true
569 schema:
570 $ref: '#/components/schemas/TransactionId'
571 responses:
572 '200':
573 description: Successful operation.
574 content:
575 application/json:
576 schema:
577 $ref: '#/components/schemas/HistoryTransaction'
578 '400':
579 description: Bad request.
580 content:
581 application/json:
582 schema:
583 $ref: '#/components/schemas/Error400'
584 '404':
585 description: Not found.
586 content:
587 application/json:
588 schema:
589 $ref: '#/components/schemas/Error404'
590 '500':
591 description: Internal server error.
592 content:
593 application/json:
594 schema:
595 $ref: '#/components/schemas/Error500'
596 '/batches':
597 get:
598 tags:
599 - Hermez status
600 summary: Get information about forged batches.
601 description: >-
602 Get information about forged batches.
603 operationId: getBatches
604 parameters:
605 - name: minBatchNum
606 in: query
607 required: false
608 description: Include only `batchNum < minBatchNum` batches.
609 schema:
610 $ref: '#/components/schemas/BatchNum'
611 - name: maxBatchNum
612 in: query
613 required: false
614 description: Include only `batchNum > maxBatchNum` batches.
615 schema:
616 type: number
617 - name: forgerAddr
618 in: query
619 required: false
620 description: Include only batches forged by `forgerAddr`
621 schema:
622 $ref: '#/components/schemas/EthereumAddress'
623 - name: fromItem
624 in: query
625 required: false
626 description: Indicates the desired first item (using the itemId property) to be included in the response.
627 schema:
628 type: number
629 - name: order
630 in: query
631 required: false
632 description: Order of the returned items. Batches will be ordered by increasing `batchNum`.
633 schema:
634 type: string
635 default: ASC
636 enum:
637 - ASC
638 - DESC
639 - name: limit
640 in: query
641 required: false
642 description: Maximum number of items to be returned.
643 schema:
644 type: integer
645 minimum: 1
646 maximum: 2049
647 responses:
648 '200':
649 description: Successful operation.
650 content:
651 application/json:
652 schema:
653 $ref: '#/components/schemas/Batches'
654 '400':
655 description: Bad request.
656 content:
657 application/json:
658 schema:
659 $ref: '#/components/schemas/Error400'
660 '404':
661 description: Not found.
662 content:
663 application/json:
664 schema:
665 $ref: '#/components/schemas/Error404'
666 '500':
667 description: Internal server error.
668 content:
669 application/json:
670 schema:
671 $ref: '#/components/schemas/Error500'
672 '/batches/{batchNum}':
673 get:
674 tags:
675 - Hermez status
676 summary: Get a specific batch.
677 description: >-
678 Get a specific batch.
679 operationId: getBatch
680 parameters:
681 - name: batchNum
682 in: path
683 description: Batch identifier.
684 required: true
685 schema:
686 $ref: '#/components/schemas/BatchNum'
687 responses:
688 '200':
689 description: Successful operation
690 content:
691 application/json:
692 schema:
693 $ref: '#/components/schemas/Batch'
694 '400':
695 description: Bad request.
696 content:
697 application/json:
698 schema:
699 $ref: '#/components/schemas/Error400'
700 '404':
701 description: Not found.
702 content:
703 application/json:
704 schema:
705 $ref: '#/components/schemas/Error404'
706 '500':
707 description: Internal server error.
708 content:
709 application/json:
710 schema:
711 $ref: '#/components/schemas/Error500'
712 '/full-batches/{batchNum}':
713 get:
714 tags:
715 - Hermez status
716 summary: Get a full batch
717 description: >-
718 Get a specific batch, including the associated transactions. The object returned in this method can be a bit heavy.
719 If you're devloping a front end, you may consider using a combinaton of `GET /batches/{batchnum}` and `GET /history-transactions?batchNum={batchNum}`.
720 operationId: getFullBatch
721 parameters:
722 - name: batchNum
723 in: path
724 description: Batch identifier
725 required: true
726 schema:
727 $ref: '#/components/schemas/BatchNum'
728 responses:
729 '200':
730 description: successful operation
731 content:
732 application/json:
733 schema:
734 $ref: '#/components/schemas/FullBatch'
735 '400':
736 description: Bad request.
737 content:
738 application/json:
739 schema:
740 $ref: '#/components/schemas/Error400'
741 '404':
742 description: Not found.
743 content:
744 application/json:
745 schema:
746 $ref: '#/components/schemas/Error404'
747 '500':
748 description: Internal server error.
749 content:
750 application/json:
751 schema:
752 $ref: '#/components/schemas/Error500'
753 '/slots':
754 get:
755 tags:
756 - Hermez status
757 summary: Get information about slots.
758 description: >-
759 Get information about slots.
760 operationId: getSlots
761 parameters:
762 - name: minSlotNum
763 in: query
764 required: false
765 description: Only include batches with `slotNum < minSlotNum`.
766 schema:
767 $ref: '#/components/schemas/SlotNum'
768 - name: maxSlothNum
769 in: query
770 required: false
771 description: Only include batches with `slotNum > maxSlotNum`.
772 schema:
773 $ref: '#/components/schemas/SlotNum'
774 - name: wonByEthereumAddress
775 in: query
776 required: false
777 description: Only include slots won by a coordinator whose `forgerAddr == wonByEthereumAddress`.
778 schema:
779 $ref: '#/components/schemas/EthereumAddress'
780 - name: finishedAuction
781 in: query
782 required: false
783 description: If set to true, only include slots whose auction has finished.
784 schema:
785 type: boolean
786 - name: fromItem
787 in: query
788 required: false
789 description: Indicates the desired first item (using the itemId property) to be included in the response.
790 schema:
791 type: number
792 - name: order
793 in: query
794 required: false
795 description: Order of the returned items. Slots will be ordered by increasing `slotNum`.
796 schema:
797 type: string
798 default: ASC
799 enum:
800 - ASC
801 - DESC
802 - name: limit
803 in: query
804 required: false
805 description: Maximum number of items to be returned.
806 schema:
807 type: integer
808 minimum: 1
809 maximum: 2049
810 responses:
811 '200':
812 description: Successful operation.
813 content:
814 application/json:
815 schema:
816 $ref: '#/components/schemas/Slots'
817 '400':
818 description: Bad request.
819 content:
820 application/json:
821 schema:
822 $ref: '#/components/schemas/Error400'
823 '404':
824 description: Not found.
825 content:
826 application/json:
827 schema:
828 $ref: '#/components/schemas/Error404'
829 '500':
830 description: Internal server error.
831 content:
832 application/json:
833 schema:
834 $ref: '#/components/schemas/Error500'
835 '/slots/{slotNum}':
836 get:
837 tags:
838 - Hermez status
839 summary: Get information about a specific slot.
840 description: >-
841 Get information about a specific slot.
842 operationId: getSlot
843 parameters:
844 - name: slotNum
845 in: path
846 required: true
847 description: Identifier of the slot.
848 schema:
849 $ref: '#/components/schemas/SlotNum'
850 responses:
851 '200':
852 description: Successful operation.
853 content:
854 application/json:
855 schema:
856 $ref: '#/components/schemas/Slot'
857 '400':
858 description: Bad request.
859 content:
860 application/json:
861 schema:
862 $ref: '#/components/schemas/Error400'
863 '404':
864 description: Not found.
865 content:
866 application/json:
867 schema:
868 $ref: '#/components/schemas/Error404'
869 '500':
870 description: Internal server error.
871 content:
872 application/json:
873 schema:
874 $ref: '#/components/schemas/Error500'
875 '/bids':
876 get:
877 tags:
878 - Hermez status
879 summary: Get a list of bids made for a specific slot auction.
880 description: Get a list of bids made for a specific slot auction.
881 operationId: getSlotBids
882 parameters:
883 - name: slotNum
884 in: query
885 description: Slot identifier. Specify the auction where the returned bids were made.
886 required: false
887 schema:
888 $ref: '#/components/schemas/SlotNum'
889 - name: forgerAddr
890 in: query
891 description: Get only bids made by a coordinator identified by its forger address.
892 required: false
893 schema:
894 $ref: '#/components/schemas/EthereumAddress'
895 - name: fromItem
896 in: query
897 required: false
898 description: Indicates the desired first item (using the itemId property) to be included in the response.
899 schema:
900 type: number
901 - name: order
902 in: query
903 required: false
904 description: Order of the returned items. Bids will be ordered by increasing (slotNum, bidValue)`.
905 schema:
906 type: string
907 default: ASC
908 enum:
909 - ASC
910 - DESC
911 - name: limit
912 in: query
913 required: false
914 description: Maximum number of items to be returned.
915 schema:
916 type: integer
917 minimum: 1
918 maximum: 2049
919 responses:
920 '200':
921 description: Successful operation
922 content:
923 application/json:
924 schema:
925 $ref: '#/components/schemas/Bids'
926 '400':
927 description: Bad request.
928 content:
929 application/json:
930 schema:
931 $ref: '#/components/schemas/Error400'
932 '404':
933 description: Not found.
934 content:
935 application/json:
936 schema:
937 $ref: '#/components/schemas/Error404'
938 '500':
939 description: Internal server error.
940 content:
941 application/json:
942 schema:
943 $ref: '#/components/schemas/Error500'
944 '/next-forgers':
945 get:
946 tags:
947 - Hermez status
948 summary: Get next coordinators to forge.
949 description: >-
950 Return a list of the coordinators that will forge in the next slots.
951 The response includes the coordinator that is currently forging, and the ones that have won the upcomming slots whose auctions are closed.
952 operationId: getNextForgers
953 responses:
954 '200':
955 description: Successful operation.
956 content:
957 application/json:
958 schema:
959 $ref: '#/components/schemas/NextForgers'
960 '400':
961 description: Bad request.
962 content:
963 application/json:
964 schema:
965 $ref: '#/components/schemas/Error400'
966 '500':
967 description: Internal server error.
968 content:
969 application/json:
970 schema:
971 $ref: '#/components/schemas/Error500'
972 '/state':
973 get:
974 tags:
975 - Hermez status
976 summary: Return global statistics and metrics of the network.
977 description: Return global statistics and metrics of the network.
978 operationId: getState
979 responses:
980 '200':
981 description: Successful operation.
982 content:
983 application/json:
984 schema:
985 $ref: '#/components/schemas/State'
986 '400':
987 description: Bad request.
988 content:
989 application/json:
990 schema:
991 $ref: '#/components/schemas/Error400'
992 '500':
993 description: Internal server error.
994 content:
995 application/json:
996 schema:
997 $ref: '#/components/schemas/Error500'
998 '/config':
999 get:
1000 tags:
1001 - Hermez status
1002 summary: Return constant configuration of the network.
1003 description: Return constant configuration of the network.
1004 operationId: getConfig
1005 responses:
1006 '200':
1007 description: Successful operation.
1008 content:
1009 application/json:
1010 schema:
1011 $ref: '#/components/schemas/Config'
1012 '500':
1013 description: Internal server error.
1014 content:
1015 application/json:
1016 schema:
1017 $ref: '#/components/schemas/Error500'
1018 '/tokens':
1019 get:
1020 tags:
1021 - Hermez status
1022 summary: Get information of the supported tokens in the Hermez network.
1023 description: Get information of the supported tokens in the Hermez network.
1024 operationId: getTokens
1025 parameters:
1026 - name: ids
1027 in: query
1028 required: false
1029 description: Include only specific tokens by their Hermez identifiers.
1030 schema:
1031 type: string
1032 description: Comma separated list of token identifiers
1033 example: "2,44,689"
1034 - name: symbols
1035 in: query
1036 required: false
1037 description: Include only specific tokens by their symbols.
1038 schema:
1039 type: string
1040 description: Comma separated list of token symbols.
1041 example: "DAI,NEC,UMA"
1042 - name: name
1043 in: query
1044 required: false
1045 description: Include token(s) by their names (or a substring of the name).
1046 schema:
1047 type: string
1048 - name: fromItem
1049 in: query
1050 required: false
1051 description: Indicates the desired first item (using the itemId property) to be included in the response.
1052 schema:
1053 type: number
1054 - name: order
1055 in: query
1056 required: false
1057 description: Order of the returned items. Tokens will be ordered by increasing tokenID.
1058 schema:
1059 type: string
1060 default: ASC
1061 enum:
1062 - ASC
1063 - DESC
1064 - name: limit
1065 in: query
1066 required: false
1067 description: Maximum number of items to be returned.
1068 schema:
1069 type: integer
1070 minimum: 1
1071 maximum: 2049
1072 responses:
1073 '200':
1074 description: Successful operation.
1075 content:
1076 application/json:
1077 schema:
1078 $ref: '#/components/schemas/Tokens'
1079 '400':
1080 description: Bad request.
1081 content:
1082 application/json:
1083 schema:
1084 $ref: '#/components/schemas/Error400'
1085 '404':
1086 description: Not found.
1087 content:
1088 application/json:
1089 schema:
1090 $ref: '#/components/schemas/Error404'
1091 '500':
1092 description: Internal server error.
1093 content:
1094 application/json:
1095 schema:
1096 $ref: '#/components/schemas/Error500'
1097 '/tokens/{id}':
1098 get:
1099 tags:
1100 - Hermez status
1101 summary: Get information of a token supported by Hermez network.
1102 description: Get information of a token supported by Hermez network.
1103 operationId: getToken
1104 parameters:
1105 - name: id
1106 in: path
1107 description: Token identifier
1108 required: true
1109 schema:
1110 $ref: '#/components/schemas/TokenId'
1111 responses:
1112 '200':
1113 description: Successful operation.
1114 content:
1115 application/json:
1116 schema:
1117 $ref: '#/components/schemas/Token'
1118 '400':
1119 description: Bad request.
1120 content:
1121 application/json:
1122 schema:
1123 $ref: '#/components/schemas/Error400'
1124 '404':
1125 description: Not found.
1126 content:
1127 application/json:
1128 schema:
1129 $ref: '#/components/schemas/Error404'
1130 '500':
1131 description: Internal server error.
1132 content:
1133 application/json:
1134 schema:
1135 $ref: '#/components/schemas/Error500'
1136 '/recommended-fee':
1137 get:
1138 tags:
1139 - Hermez status
1140 summary: Get recommended fee in USD.
1141 description: >-
1142 Get recommended fee in USD. Recommended price to pay according to the status of the destination account.
1143 operationId: getFee
1144 responses:
1145 '200':
1146 description: Successful operation
1147 content:
1148 application/json:
1149 schema:
1150 $ref: '#/components/schemas/RecommendedFee'
1151 '500':
1152 description: Internal server error.
1153 content:
1154 application/json:
1155 schema:
1156 $ref: '#/components/schemas/Error500'
1157 '/coordinators':
1158 get:
1159 tags:
1160 - Hermez status
1161 summary: Get information about coordinators.
1162 description: Get information about coordinators.
1163 operationId: getCoordinators
1164 parameters:
1165 - name: fromItem
1166 in: query
1167 required: false
1168 description: Indicates the desired first item (using the itemId property) to be included in the response.
1169 schema:
1170 type: number
1171 - name: order
1172 in: query
1173 required: false
1174 description: Order of the returned items. Coordinators will be ordered by increasing (ethereumBlock, forgerAddr).
1175 schema:
1176 type: string
1177 default: ASC
1178 enum:
1179 - ASC
1180 - DESC
1181 - name: limit
1182 in: query
1183 required: false
1184 description: Maximum number of items to be returned.
1185 schema:
1186 type: integer
1187 minimum: 1
1188 maximum: 2049
1189 responses:
1190 '200':
1191 description: Successful operation.
1192 content:
1193 application/json:
1194 schema:
1195 $ref: '#/components/schemas/Coordinators'
1196 '400':
1197 description: Bad request.
1198 content:
1199 application/json:
1200 schema:
1201 $ref: '#/components/schemas/Error400'
1202 '500':
1203 description: Internal server error.
1204 content:
1205 application/json:
1206 schema:
1207 $ref: '#/components/schemas/Error500'
1208 '/coordinators/{forgerAddr}':
1209 get:
1210 tags:
1211 - Hermez status
1212 summary: Get the information of a coordinator.
1213 description: Get the information of a coordinator.
1214 operationId: getCoordinator
1215 parameters:
1216 - name: forgerAddr
1217 in: path
1218 description: Coordinator identifier
1219 required: true
1220 schema:
1221 $ref: '#/components/schemas/EthereumAddress'
1222 responses:
1223 '200':
1224 description: Successful operation.
1225 content:
1226 application/json:
1227 schema:
1228 $ref: '#/components/schemas/Coordinator'
1229 '400':
1230 description: Bad request.
1231 content:
1232 application/json:
1233 schema:
1234 $ref: '#/components/schemas/Error400'
1235 '404':
1236 description: Not found.
1237 content:
1238 application/json:
1239 schema:
1240 $ref: '#/components/schemas/Error404'
1241 '500':
1242 description: Internal server error.
1243 content:
1244 application/json:
1245 schema:
1246 $ref: '#/components/schemas/Error500'
1247components:
1248 schemas:
1249 ItemId:
1250 type: integer
1251 description: Position of the item in the DB. This is useful for pagination, but has nothing to do with the protocol.
1252 PostPoolL2Transaction:
1253 type: object
1254 properties:
1255 id:
1256 $ref: '#/components/schemas/TransactionId'
1257 type:
1258 $ref: '#/components/schemas/TransactionTypeL2'
1259 tokenId:
1260 $ref: '#/components/schemas/TokenId'
1261 fromAccountIndex:
1262 $ref: '#/components/schemas/AccountIndex'
1263 toAccountIndex:
1264 type: string
1265 description: >-
1266 Identifier of the destination account. It references the position where the account is inside the state Merkle tree.
1267 The identifier is built using: `hez:` + `token symbol:` + `index`
1268 example: null
1269 nullable: true
1270 toHezEthereumAddress:
1271 type: string
1272 description: "Address of an Etherum account linked to the Hermez network."
1273 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1274 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1275 nullable: true
1276 toBjj:
1277 type: string
1278 description: "BabyJubJub public key, encoded as base64 URL (RFC 4648), which result in 33 bytes. The padding byte is replaced by a sum of the encoded bytes."
1279 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1280 example: null
1281 nullable: true
1282 amount:
1283 allOf:
1284 - $ref: '#/components/schemas/BigInt'
1285 - description: Amount of tokens to be sent.
1286 example: "6300000000000000000"
1287 fee:
1288 $ref: '#/components/schemas/FeeSelector'
1289 nonce:
1290 $ref: '#/components/schemas/Nonce'
1291 signature:
1292 allOf:
1293 - $ref: '#/components/schemas/Signature'
1294 - description: Signature of the transaction. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=l2a-idl2).
1295 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1296 requestFromAccountIndex:
1297 type: string
1298 description: References the `fromAccountIndex` of the requested transaction.
1299 example: null
1300 nullable: true
1301 requestToAccountIndex:
1302 type: string
1303 description: References the `toAccountIndex` of the requested transaction.
1304 example: null
1305 nullable: true
1306 requestToHezEthereumAddress:
1307 type: string
1308 description: References the `toHezEthereumAddress` of the requested transaction.
1309 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1310 example: null
1311 nullable: true
1312 requestToBJJ:
1313 type: string
1314 description: References the `toBJJ` of the requested transaction.
1315 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1316 example: null
1317 nullable: true
1318 requestTokenId:
1319 type: integer
1320 description: References the `tokenId` of the requested transaction.
1321 example: null
1322 nullable: true
1323 requestAmount:
1324 type: string
1325 description: References the `amount` of the requested transaction.
1326 example: null
1327 nullable: true
1328 requestFee:
1329 type: integer
1330 description: References the `fee` of the requested transaction.
1331 example: null
1332 nullable: true
1333 requestNonce:
1334 type: integer
1335 description: References the `nonce` of the requested transaction.
1336 example: null
1337 nullable: true
1338 required:
1339 - id
1340 - type
1341 - tokenId
1342 - fromAccountIndex
1343 - toAccountIndex
1344 - toHezAccountIndex
1345 - toHezEthereumAddress
1346 - toBjj
1347 - amount
1348 - fee
1349 - nonce
1350 - signature
1351 - requestFromAccountIndex
1352 - requestToAccountIndex
1353 - requestToHezEthereumAddress
1354 - requestToBJJ
1355 - requestTokenId
1356 - requestAmount
1357 - requestFee
1358 - requestNonce
1359 PoolL2Transaction:
1360 type: object
1361 properties:
1362 id:
1363 $ref: '#/components/schemas/TransactionId'
1364 type:
1365 $ref: '#/components/schemas/TransactionTypeL2'
1366 fromAccountIndex:
1367 $ref: '#/components/schemas/AccountIndex'
1368 toAccountIndex:
1369 type: string
1370 description: >-
1371 Identifier of the destination account. It references the position where the account is inside the state Merkle tree.
1372 The identifier is built using: `hez:` + `token symbol:` + `index`
1373 example: "hez:DAI:309"
1374 nullable: true
1375 toHezEthereumAddress:
1376 type: string
1377 description: "Address of an Etherum account linked to the Hermez network."
1378 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1379 example: null
1380 nullable: true
1381 toBjj:
1382 type: string
1383 description: "BabyJubJub public key, encoded as base64 URL (RFC 4648), which result in 33 bytes. The padding byte is replaced by a sum of the encoded bytes."
1384 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1385 example: null
1386 nullable: true
1387 amount:
1388 allOf:
1389 - $ref: '#/components/schemas/BigInt'
1390 - description: Amount of tokens to be sent.
1391 example: "6303020000000000000"
1392 fee:
1393 $ref: '#/components/schemas/FeeSelector'
1394 nonce:
1395 $ref: '#/components/schemas/Nonce'
1396 state:
1397 $ref: '#/components/schemas/PoolL2TransactionState'
1398 signature:
1399 allOf:
1400 - $ref: '#/components/schemas/Signature'
1401 - description: Signature of the transaction. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=l2a-idl2).
1402 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1403 timestamp:
1404 type: string
1405 description: Moment in which the transaction was added to the pool.
1406 format: date-time
1407 batchNum:
1408 allOf:
1409 - $ref: '#/components/schemas/BatchNum'
1410 - nullable: true
1411 - example: 5432
1412 requestFromAccountIndex:
1413 allOf:
1414 - $ref: '#/components/schemas/AccountIndex'
1415 - nullable: true
1416 - example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1417 requestToAccountIndex:
1418 allOf:
1419 - $ref: '#/components/schemas/AccountIndex'
1420 - nullable: true
1421 - example: "hez:DAI:33"
1422 requestToHezEthereumAddress:
1423 allOf:
1424 - $ref: '#/components/schemas/HezEthereumAddress'
1425 - nullable: true
1426 - example: "hez:0xbb942cfcd25ad4d90a62358b0dd84f33b3982699"
1427 requestToBJJ:
1428 allOf:
1429 - $ref: '#/components/schemas/BJJ'
1430 - nullable: true
1431 - example: "hez:HVrB8xQHAYt9QTpPUsj3RGOzDmrCI4IgrYslTeTqo6Ix"
1432 requestTokenId:
1433 allOf:
1434 - $ref: '#/components/schemas/TokenId'
1435 - nullable: true
1436 - example: 4444
1437 requestAmount:
1438 allOf:
1439 - $ref: '#/components/schemas/BigInt'
1440 - description: Amount of tokens to be sent.
1441 - example: "700000000000000000"
1442 - nullable: true
1443 requestFee:
1444 allOf:
1445 - $ref: '#/components/schemas/FeeSelector'
1446 - nullable: true
1447 - example: 8
1448 requestNonce:
1449 allOf:
1450 - $ref: '#/components/schemas/Nonce'
1451 - nullable: true
1452 - example: 6
1453 token:
1454 $ref: '#/components/schemas/Token'
1455 required:
1456 - fromAccountIndex
1457 - toHezAccountIndex
1458 - toHezEthereumAddress
1459 - toBjj
1460 - tokenId
1461 - amount
1462 - fee
1463 - nonce
1464 - signature
1465 TransactionId:
1466 type: string
1467 description: Identifier for transactions. Used for any kind of transaction (both L1 and L2). More info on how the identifiers are built [here](https://idocs.hermez.io/#/spec/architecture/db/README?id=txid)
1468 example: "0x00000000000001e240004700"
1469 EthereumAddress:
1470 type: string
1471 description: "Address of an Etherum account."
1472 pattern: "^0x[a-fA-F0-9]{40}$"
1473 example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1474 HezEthereumAddress:
1475 type: string
1476 description: "Address of an Etherum account linked to the Hermez network."
1477 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1478 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1479 BJJ:
1480 type: string
1481 description: "BabyJubJub public key, encoded as base64 URL (RFC 4648), which result in 33 bytes. The padding byte is replaced by a sum of the encoded bytes."
1482 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1483 example: "hez:rR7LXKal-av7I56Y0dEBCVmwc9zpoLY5ERhy5w7G-xwe"
1484 AccountIndex:
1485 type: string
1486 description: >-
1487 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1488 The identifier is built using: `hez:` + `token symbol:` + `index`
1489 example: "hez:DAI:4444"
1490 TransactionType:
1491 type: string
1492 description: Type of transaction.
1493 enum:
1494 - Exit
1495 - Transfer
1496 - Deposit
1497 - CreateAccountDeposit
1498 - CreateAccountDepositTransfer
1499 - DepositTransfer
1500 - ForceTransfer
1501 - ForceExit
1502 - TransferToEthAddr
1503 - TransferToBJJ
1504 TransactionTypeL2:
1505 type: string
1506 description: Type of transaction.
1507 enum:
1508 - Exit
1509 - Transfer
1510 - TransferToEthAddr
1511 - TransferToBJJ
1512 TokenId:
1513 type: integer
1514 description: Identifier of a token registered in the network.
1515 minimum: 0
1516 maximum: 4294967295
1517 example: 4444
1518 BigInt:
1519 type: string
1520 description: BigInt is an integer encoded as a string for numbers that are very large.
1521 example: "8708856933496328593"
1522 FeeSelector:
1523 type: integer
1524 description: Index of the fee type to select, more info [here](https://idocs.hermez.io/#/spec/zkrollup/fee-table?id=transaction-fee-table).
1525 minimum: 0
1526 maximum: 256
1527 example: 36
1528 Nonce:
1529 type: integer
1530 description: Number that can only be used once per account, increments by one at each transaction.
1531 minimum: 0
1532 maximum: 1.84467440737096e+19
1533 example: 121
1534 PoolL2TransactionState:
1535 type: string
1536 description: >
1537 State of a L2 transaction from the coordinator pool.
1538 * pend: Pending
1539 * fing: Forging
1540 * fged: Forged
1541 * invl: Invalid
1542 enum:
1543 - pend
1544 - fing
1545 - fged
1546 - invl
1547 Signature:
1548 type: string
1549 description: BabyJubJub compressed signature.
1550 pattern: "^[a-fA-F0-9]{128}$"
1551 example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1552 BatchNum:
1553 type: integer
1554 description: Identifier of a batch. Every new forged batch increments by one the batchNum, starting at 0.
1555 minimum: 0
1556 maximum: 4294967295
1557 example: 5432
1558 AccountCreationAuthorization:
1559 type: object
1560 properties:
1561 timestamp:
1562 type: string
1563 format: date-time
1564 hezEthereumAddress:
1565 $ref: '#/components/schemas/HezEthereumAddress'
1566 bjj:
1567 $ref: '#/components/schemas/BJJ'
1568 signature:
1569 allOf:
1570 - $ref: '#/components/schemas/Signature'
1571 - description: Signature of the auth message. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=regular-rollup-account).
1572 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1573 required:
1574 - ethereumAddress
1575 - bjj
1576 - signature
1577 HistoryTransaction:
1578 type: object
1579 description: Transaction of the Hermez network
1580 properties:
1581 L1orL2:
1582 type: string
1583 enum:
1584 - L1
1585 - L2
1586 id:
1587 $ref: '#/components/schemas/TransactionId'
1588 itemId:
1589 $ref: '#/components/schemas/ItemId'
1590 type:
1591 $ref: '#/components/schemas/TransactionType'
1592 position:
1593 $ref: '#/components/schemas/TransactionPosition'
1594 fromAccountIndex:
1595 type: string
1596 description: >-
1597 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1598 The identifier is built using: `hez:` + `token symbol:` + `index`
1599 example: "hez:DAI:4444"
1600 nullable: true
1601 toAccountIndex:
1602 allOf:
1603 - $ref: '#/components/schemas/AccountIndex'
1604 - example: "hez:DAI:672"
1605 amount:
1606 allOf:
1607 - $ref: '#/components/schemas/BigInt'
1608 - description: Amount of tokens to be sent.
1609 - example: "4903020000000000000"
1610 batchNum:
1611 type: integer
1612 description: Batch in which the transaction was forged. Null indicates not forged yet.
1613 minimum: 0
1614 maximum: 4294967295
1615 example: 5432
1616 nullable: true
1617 historicUSD:
1618 type: number
1619 description: Value in USD at the moment the transaction was forged.
1620 example: 49.7
1621 nullable: true
1622 timestamp:
1623 type: string
1624 format: date-time
1625 description: In the case of L1 indicates the moment where the transaction was added in the smart contract. For L2 indicates when the transaction was forged.
1626 token:
1627 $ref: '#/components/schemas/Token'
1628 L1Info:
1629 type: object
1630 description: Additional information that only applies to L1 transactions.
1631 nullable: true
1632 properties:
1633 toForgeL1TransactionsNum:
1634 $ref: '#/components/schemas/ToForgeL1TransactionsNum'
1635 userOrigin:
1636 type: boolean
1637 description: True if the transaction was sent by a user. False if it was sent by a coordinator.
1638 fromHezEthereumAddress:
1639 $ref: '#/components/schemas/HezEthereumAddress'
1640 fromBJJ:
1641 $ref: '#/components/schemas/BJJ'
1642 loadAmount:
1643 allOf:
1644 - $ref: '#/components/schemas/BigInt'
1645 - description: Tokens transfered from L1 to L2.
1646 - example: "4900000000000000000"
1647 historicLoadAmountUSD:
1648 type: number
1649 description: Load amount in USD, at the moment the transaction was made.
1650 example: 3.897
1651 nullable: true
1652 ethereumBlockNum:
1653 allOf:
1654 - $ref: '#/components/schemas/EthBlockNum'
1655 - description: Ethereum block in which the transaction was added to the smart contract forge queue.
1656 - example: 258723049
1657 required:
1658 - toForgeL1TransactionsNum
1659 - userOrigin
1660 - fromHezEthereumAddress
1661 - fromBJJ
1662 - loadAmount
1663 - historicLoadAmountUSD
1664 - ethereumBlockNum
1665 additionalProperties: false
1666 L2Info:
1667 type: object
1668 description: Additional information that only applies to L2 transactions.
1669 nullable: true
1670 properties:
1671 fee:
1672 $ref: '#/components/schemas/FeeSelector'
1673 historicFeeUSD:
1674 type: number
1675 description: Fee in USD, at the moment the transaction was forged.
1676 example: 263.89
1677 nullable: true
1678 nonce:
1679 $ref: '#/components/schemas/Nonce'
1680 example: null
1681 required:
1682 - fee
1683 - historicFeeUSD
1684 - nonce
1685 additionalProperties: false
1686 required:
1687 - L1orL2
1688 - id
1689 - itemId
1690 - type
1691 - position
1692 - fromAccountIndex
1693 - toAccountIndex
1694 - amount
1695 - batchNum
1696 - historicUSD
1697 - timestamp
1698 - token
1699 - L1Info
1700 - L2Info
1701 additionalProperties: false
1702 HistoryTransactions:
1703 type: object
1704 properties:
1705 transactions:
1706 type: array
1707 description: List of history transactions.
1708 items:
1709 $ref: '#/components/schemas/HistoryTransaction'
1710 pagination:
1711 $ref: '#/components/schemas/PaginationInfo'
1712 required:
1713 - transactions
1714 - pagination
1715 additionalProperties: false
1716 EthBlockNum:
1717 type: integer
1718 description: Ethereum block number
1719 minimum: 0
1720 maximum: 1.84467440737096e+19
1721 example: 762375478
1722 ToForgeL1TransactionsNum:
1723 type: integer
1724 description: Reference to know in which batch a L1 transaction was forged / will be forged.
1725 minimum: 0
1726 maximum: 4294967295
1727 example: 784
1728 nullable: true
1729 TransactionPosition:
1730 type: integer
1731 description: Position that a transaction occupies in a batch.
1732 minimum: 0
1733 example: 5
1734 URL:
1735 type: string
1736 description: HTTP URL
1737 example: "https://hermez.io"
1738 TokenSymbol:
1739 type: string
1740 description: Abreviation of the token name.
1741 example: "DAI"
1742 TokenName:
1743 type: string
1744 description: Token name.
1745 example: "Dai"
1746 CollectedFees:
1747 type: array
1748 description: Collected fees by the forger of the batch. A maximum of 64 different tokens can be used.
1749 items:
1750 type: object
1751 properties:
1752 tokenId:
1753 $ref: '#/components/schemas/TokenId'
1754 amount:
1755 allOf:
1756 - $ref: '#/components/schemas/BigInt'
1757 - description: Ammount of collected tokens
1758 - example: "53"
1759 Batch:
1760 type: object
1761 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
1762 properties:
1763 batchNum:
1764 $ref: '#/components/schemas/BatchNum'
1765 ethereumBlockNum:
1766 $ref: '#/components/schemas/EthBlockNum'
1767 ethereumBlockHash:
1768 type: string
1769 description: hash of the Ethereum block in which the batch was forged
1770 example: "0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553"
1771 timestamp:
1772 type: string
1773 format: date-time
1774 description: Time in which the batch was forged.
1775 forgerAddr:
1776 $ref: '#/components/schemas/EthereumAddress'
1777 collectedFees:
1778 $ref: '#/components/schemas/CollectedFees'
1779 totalCollectedFeesUSD:
1780 type: number
1781 description: Value in USD of the collected tokens by the forger in concept of fees. This is calculated at the moment the batch is forged, with the conversion rates at that time.
1782 historicTotalCollectedFeesUSD:
1783 type: number
1784 description: Sum of the all the fees collected, in USD, at the moment the batch was forged.
1785 example: 23.3
1786 stateRoot:
1787 allOf:
1788 - $ref: '#/components/schemas/Hash'
1789 - description: Root of the accounts Merkle Tree.
1790 - example: "2734657026572a8708d883"
1791 numAccounts:
1792 type: integer
1793 description: Number of registered accounts in this batch.
1794 exitRoot:
1795 allOf:
1796 - $ref: '#/components/schemas/Hash'
1797 - description: Root of the exit Merkle Tree associated to this batch.
1798 - example: "2734657026572a8708d883"
1799 forgeL1TransactionsNum:
1800 allOf:
1801 - $ref: '#/components/schemas/ToForgeL1TransactionsNum'
1802 - description: Identifier that corresponds to the group of L1 transactions forged in the current batch.
1803 - example: 5
1804 slotNum:
1805 $ref: '#/components/schemas/SlotNum'
1806 FullBatch:
1807 type: object
1808 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
1809 properties:
1810 batch:
1811 $ref: '#/components/schemas/Batch'
1812 transactions:
1813 type: array
1814 description: List of forged transactions in the batch
1815 items:
1816 $ref: '#/components/schemas/HistoryTransaction'
1817 Hash:
1818 type: string
1819 description: hashed data
1820 example: "2734657026572a8708d883"
1821 SlotNum:
1822 type: integer
1823 description: Identifier of a slot.
1824 minimum: 0
1825 maximum: 4294967295
1826 example: 784
1827 Batches:
1828 type: object
1829 properties:
1830 batches:
1831 type: array
1832 description: List of batches.
1833 items:
1834 $ref: '#/components/schemas/Batch'
1835 pagination:
1836 $ref: '#/components/schemas/PaginationInfo'
1837 Coordinator:
1838 type: object
1839 properties:
1840 forgerAddr:
1841 $ref: '#/components/schemas/EthereumAddress'
1842 withdrawAddr:
1843 $ref: '#/components/schemas/EthereumAddress'
1844 URL:
1845 $ref: '#/components/schemas/URL'
1846 ethereumBlock:
1847 allOf:
1848 - $ref: '#/components/schemas/EthBlockNum'
1849 - description: Ethereum block in which the coordinator registered into the network.
1850 - example: 5735943738
1851 Coordinators:
1852 type: object
1853 properties:
1854 coordinators:
1855 type: array
1856 description: List of coordinators.
1857 items:
1858 $ref: '#/components/schemas/Coordinator'
1859 pagination:
1860 $ref: '#/components/schemas/PaginationInfo'
1861 Bid:
1862 type: object
1863 description: Tokens placed in an auction by a coordinator to gain the right to forge batches during a specific slot.
1864 properties:
1865 forgerAddr:
1866 $ref: '#/components/schemas/EthereumAddress'
1867 slotNum:
1868 $ref: '#/components/schemas/SlotNum'
1869 withdrawAddr:
1870 $ref: '#/components/schemas/EthereumAddress'
1871 URL:
1872 $ref: '#/components/schemas/URL'
1873 bidValue:
1874 $ref: '#/components/schemas/BigInt'
1875 ethereumBlockNum:
1876 $ref: '#/components/schemas/EthBlockNum'
1877 timestamp:
1878 type: string
1879 format: date-time
1880 Bids:
1881 type: object
1882 properties:
1883 bids:
1884 type: array
1885 description: List of bids.
1886 items:
1887 $ref: '#/components/schemas/Bid'
1888 pagination:
1889 $ref: '#/components/schemas/PaginationInfo'
1890 RecommendedFee:
1891 type: object
1892 description: Fee that the coordinator recommends per transaction in USD.
1893 properties:
1894 existingAccount:
1895 type: number
1896 description: Recommended fee if the destination account of the transaction already exists.
1897 minimum: 0
1898 example: 0.1
1899 createAccount:
1900 type: number
1901 description: Recommended fee if the destination account of the transaction doesn't exist, but the coordinator has an authorization to create a valid account associated to an Ethereum address and a BJJ public key controlled by the receiver.
1902 minimum: 0
1903 example: 1.3
1904 createAccountInternal:
1905 type: number
1906 description: Recommended fee if the destination account of the transaction doesn't exist, but the coordinator has the ability to create a valid account associated to a BJJ public key controlled by the receiver. Note that these kind of accounts are not associated to an Ethereum address and therefore can only operate in L2.
1907 minimum: 0
1908 example: 0.5
1909 Token:
1910 type: object
1911 description: Hermez network compatible and registered token.
1912 properties:
1913 id:
1914 $ref: '#/components/schemas/TokenId'
1915 ethereumAddress:
1916 allOf:
1917 - $ref: '#/components/schemas/EthereumAddress'
1918 - description: Ethereum address in which the token is deployed.
1919 - example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1920 itemId:
1921 $ref: '#/components/schemas/ItemId'
1922 name:
1923 type: string
1924 description: full name of the token
1925 example: Maker Dai
1926 symbol:
1927 allOf:
1928 - $ref: '#/components/schemas/TokenSymbol'
1929 - example: DAI
1930 decimals:
1931 type: integer
1932 description: Number of decimals of the token.
1933 example: 18
1934 ethereumBlockNum:
1935 allOf:
1936 - $ref: '#/components/schemas/EthBlockNum'
1937 - description: Ethereum block number in which the token was added to the Hermez network.
1938 - example: 539847538
1939 USD:
1940 type: number
1941 description: Value of the token in USD.
1942 example: 1.01
1943 nullable: true
1944 fiatUpdate:
1945 type: string
1946 format: date-time
1947 description: Timestamp of the moment the `USD` value was updated.
1948 nullable: true
1949 required:
1950 - id
1951 - ethereumAddress
1952 - itemId
1953 - name
1954 - symbol
1955 - decimals
1956 - ethereumBlockNum
1957 - USD
1958 - fiatUpdate
1959 additionalProperties: false
1960 Tokens:
1961 type: object
1962 properties:
1963 tokens:
1964 type: array
1965 description: List of tokens.
1966 items:
1967 $ref: '#/components/schemas/Token'
1968 pagination:
1969 $ref: '#/components/schemas/PaginationInfo'
1970 Exit:
1971 type: object
1972 description: Exit tree leaf. It Contains the necessary information to perform a withdrawal.
1973 properties:
1974 batchNum:
1975 allOf:
1976 - $ref: '#/components/schemas/BatchNum'
1977 - description: Batch in which the exit was forged.
1978 - example: 7394
1979 accountIndex:
1980 $ref: '#/components/schemas/AccountIndex'
1981 itemId:
1982 $ref: '#/components/schemas/ItemId'
1983 merkleProof:
1984 type: object
1985 description: Existence proof of a leaf in a given Merkle Root. Encoded as hexadecimal string.
1986 properties:
1987 Root:
1988 $ref: '#/components/schemas/BigInt'
1989 Siblings:
1990 type: array
1991 items:
1992 $ref: '#/components/schemas/BigInt'
1993 OldKey:
1994 $ref: '#/components/schemas/BigInt'
1995 OldValue:
1996 $ref: '#/components/schemas/BigInt'
1997 IsOld0:
1998 type: boolean
1999 Key:
2000 $ref: '#/components/schemas/BigInt'
2001 Value:
2002 $ref: '#/components/schemas/BigInt'
2003 Fnc:
2004 type: integer
2005 maximum: 3
2006 minimum: 0
2007 required:
2008 - Root
2009 - Siblings
2010 - OldKey
2011 - OldValue
2012 - IsOld0
2013 - Key
2014 - Value
2015 - Fnc
2016 additionalProperties: false
2017 example: {"Root":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Siblings":[0,1,2],"OldKey":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"OldValue":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"IsOld0":true,"Key":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Value":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Fnc":0}
2018 balance:
2019 $ref: '#/components/schemas/BigInt'
2020 instantWithdrawn:
2021 type: integer
2022 description: Block in which the exit balance was instantly withdrawn. Null indicates that an instant withdrawn hasn't been performed.
2023 minimum: 0
2024 maximum: 1.84467440737096e+19
2025 example: 74747363
2026 nullable: true
2027 delayedWithdrawRequest:
2028 type: integer
2029 description: Block in which the exit balance was requested to delay withdraw. Null indicates that a delay withdraw hasn't been performed.
2030 minimum: 0
2031 maximum: 1.84467440737096e+19
2032 example: null
2033 nullable: true
2034 delayedWithdrawn:
2035 type: integer
2036 description: Block in which the exit balance was delayed withdrawn after a delay withdraw request. Null indicates that a delay withdraw hasn't been performed.
2037 minimum: 0
2038 maximum: 1.84467440737096e+19
2039 example: null
2040 nullable: true
2041 token:
2042 $ref: '#/components/schemas/Token'
2043 required:
2044 - batchNum
2045 - accountIndex
2046 - itemId
2047 - merkleProof
2048 - balance
2049 - instantWithdrawn
2050 - delayedWithdrawRequest
2051 - delayedWithdrawn
2052 - token
2053 additionalProperties: false
2054 Exits:
2055 type: object
2056 properties:
2057 exits:
2058 type: array
2059 description: List of exits.
2060 items:
2061 $ref: '#/components/schemas/Exit'
2062 pagination:
2063 $ref: '#/components/schemas/PaginationInfo'
2064 required:
2065 - exits
2066 - pagination
2067 additionalProperties: false
2068 Account:
2069 type: object
2070 description: State tree leaf. It contains balance and nonce of an account.
2071 properties:
2072 accountIndex:
2073 $ref: '#/components/schemas/AccountIndex'
2074 nonce:
2075 $ref: '#/components/schemas/Nonce'
2076 balance:
2077 $ref: '#/components/schemas/BigInt'
2078 bjj:
2079 $ref: '#/components/schemas/BJJ'
2080 hezEthereumAddress:
2081 $ref: '#/components/schemas/HezEthereumAddress'
2082 token:
2083 $ref: '#/components/schemas/Token'
2084 Accounts:
2085 type: object
2086 properties:
2087 accounts:
2088 type: array
2089 description: List of accounts.
2090 items:
2091 $ref: '#/components/schemas/Account'
2092 pagination:
2093 $ref: '#/components/schemas/PaginationInfo'
2094 Slot:
2095 type: object
2096 description: Slot information.
2097 properties:
2098 slotNum:
2099 $ref: '#/components/schemas/SlotNum'
2100 firstBlock:
2101 allOf:
2102 - $ref: '#/components/schemas/EthBlockNum'
2103 - description: Block in which the slot began or will begin
2104 - example: 76238647846
2105 lastBlock:
2106 allOf:
2107 - $ref: '#/components/schemas/EthBlockNum'
2108 - description: Block in which the slot ended or will end
2109 - example: 4475934
2110 closedAuction:
2111 type: boolean
2112 description: Whether the auction of the slot has finished or not.
2113 winner:
2114 allOf:
2115 - $ref: '#/components/schemas/Coordinator'
2116 - description: Coordinator who won the auction. Only applicable if the auction is closed.
2117 - nullable: true
2118 - example: null
2119 batchNums:
2120 type: array
2121 description: List of batch numbers that were forged during the slot
2122 items:
2123 $ref: '#/components/schemas/BatchNum'
2124 Slots:
2125 type: object
2126 properties:
2127 nextForgers:
2128 type: array
2129 description: List of slots.
2130 items:
2131 $ref: '#/components/schemas/Slot'
2132 pagination:
2133 $ref: '#/components/schemas/PaginationInfo'
2134 NextForger:
2135 type: object
2136 description: Coordinator information along with the scheduled forging period
2137 properties:
2138 coordinator:
2139 $ref: '#/components/schemas/Coordinator'
2140 period:
2141 type: object
2142 description: Time period in which the coordinator will have the ability to forge. Specified both in Ethereum blocks and timestamp
2143 properties:
2144 fromBlock:
2145 $ref: '#/components/schemas/EthBlockNum'
2146 toBlock:
2147 $ref: '#/components/schemas/EthBlockNum'
2148 fromTimestamp:
2149 type: string
2150 format: date-time
2151 toTimestamp:
2152 type: string
2153 format: date-time
2154 NextForgers:
2155 type: object
2156 properties:
2157 nextForgers:
2158 type: array
2159 description: List of next coordinators to forge.
2160 items:
2161 $ref: '#/components/schemas/NextForger'
2162 pagination:
2163 $ref: '#/components/schemas/PaginationInfo'
2164 State:
2165 type: object
2166 description: Gobal statistics of the network.
2167 properties:
2168 lastBlock:
2169 allOf:
2170 - $ref: '#/components/schemas/EthBlockNum'
2171 - description: Last synchronized Etherum block.
2172 - example: 3457437
2173 lastBatch:
2174 allOf:
2175 - $ref: '#/components/schemas/BatchNum'
2176 - description: Last batch that has been forged.
2177 - example: 76523
2178 currentSlot:
2179 allOf:
2180 - $ref: '#/components/schemas/SlotNum'
2181 - description: Slot where batches are currently being forged.
2182 - example: 2334
2183 transactionsPerBatch:
2184 type: number
2185 description: Average transactions per batch in the last 24 hours.
2186 example: 2002.7
2187 batchFrequency:
2188 type: number
2189 description: Average elapsed time between batches in the last 24 hours, in seconds.
2190 example: 8.9
2191 transactionsPerSecond:
2192 type: number
2193 description: Average transactions per second in the last 24 hours.
2194 example: 302.3
2195 totalAccounts:
2196 type: integer
2197 description: Number of created accounts.
2198 example: 90473
2199 totalBJJs:
2200 type: integer
2201 description: Number of different registered BJJs.
2202 example: 23067
2203 avgTransactionFee:
2204 type: number
2205 description: Average fee percentage paid for L2 transactions in the last 24 hours.
2206 example: 1.54
2207 governance:
2208 type: object
2209 description: Network setings that are updatable by the governance.
2210 properties:
2211 rollup:
2212 type: object
2213 description: Rollup parameters.
2214 properties:
2215 forgeTimeout:
2216 type: integer
2217 description: Time delay between the beggining of a slot and the beggining of the period in which anyone can forge if the auction winner of the slot hasn't forged any batch yet. Time is measured in Ethereum blocks.
2218 example: 5
2219 feeAddToken:
2220 type: integer
2221 description: fee to pay when registering tokens into the network.
2222 example: 5698
2223 auction:
2224 type: object
2225 description: Auction parameters.
2226 properties:
2227 bootCoordinator:
2228 allOf:
2229 - $ref: '#/components/schemas/EthereumAddress'
2230 - description: Ethereum address of the boot coordinator.
2231 - example: "0x997dc4262BCDbf85190C01c996b4C06a461d2430"
2232 slotDeadline:
2233 type: integer
2234 description: Number of blocks at the end of a slot in which any coordinator can forge if the winner has not forged one before.
2235 example: 3
2236 closedAuctionSlots:
2237 type: integer
2238 description: Amount of slots between the current slot and the slot auction that is closed. Example if the value is 2, when slot 10 begins, the auction of the slot 12 gets closed.
2239 example: 2
2240 openAuctionSlots:
2241 type: integer
2242 description: How many days in advance are auctions opened.
2243 defaultSlotSetBid:
2244 type: array
2245 description: "Initial minimal bid for each auction. Expressed as an array of 6 values. To calculate which value corresponds to each slot: `initialMinimalBidding[slotNum%6]`."
2246 items:
2247 type: integer
2248 example: [32,0,68,21,55,99]
2249 outbidding:
2250 type: number
2251 description: Minimum outbid over the previous one to consider it valid.
2252 example: 3.64
2253 donationAddress:
2254 allOf:
2255 - $ref: '#/components/schemas/EthereumAddress'
2256 - description: Ethereum address where the donations will go to.
2257 - example: "0x887dc4262BCDbf85190C01c996b4C06a461d2430"
2258 allocationRatio:
2259 type: array
2260 description: Percentage in which fees will be splitted between donations, governance and burning. The sum of the tree values should be 100.
2261 items:
2262 type: integer
2263 example: [80,10,10]
2264 withdrawalDelayer:
2265 type: object
2266 description: Withdrawal delayer parameters.
2267 properties:
2268 rollupAddress:
2269 allOf:
2270 - $ref: '#/components/schemas/EthereumAddress'
2271 - description: Ethereum address of the rollup smart contract.
2272 - example: "0x777dc4262BCDbf85190C01c996b4C06a461d2430"
2273 governanceAddress:
2274 allOf:
2275 - $ref: '#/components/schemas/EthereumAddress'
2276 - description: Ethereum address of the governance mechanism.
2277 - example: "0x667dc4262BCDbf85190C01c996b4C06a461d2430"
2278 whitheHackerGroupAddress:
2279 allOf:
2280 - $ref: '#/components/schemas/EthereumAddress'
2281 - description: Ethereum Address that can claim the funds in an emergency when the maximum emergency mode time is exceeded.
2282 - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430"
2283 keeperAddress:
2284 allOf:
2285 - $ref: '#/components/schemas/EthereumAddress'
2286 - description: Ethereum Address that can enable emergency mode and modify the delay to make a withdrawal.
2287 - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430"
2288 withdrawalDelay:
2289 allOf:
2290 - $ref: '#/components/schemas/EthBlockNum'
2291 - description: The time that anyone needs to wait until a withdrawal of the funds is allowed, in Ethereum blocks.
2292 - example: 539573849
2293 emergencyModeStartingTime:
2294 type: integer
2295 description: Ethereum block in which the emergency mode will be activated.
2296 example: 10
2297 emergencyMode:
2298 type: boolean
2299 description: Indicates if emergency mode has been activated.
2300
2301 PaginationInfo:
2302 type: object
2303 description: Give pagination information
2304 properties:
2305 totalItems:
2306 type: integer
2307 description: Amount of items that the endpoint can return given the filters and the current state of the database.
2308 example: 2048
2309 firstItem:
2310 type: integer
2311 description: The smallest itemId that the endpoint will return with the given filters.
2312 example: 50
2313 lastItem:
2314 type: integer
2315 description: The greatest itemId that the endpoint will return with the given filters.
2316 example: 2130
2317 Config:
2318 type: object
2319 description: Configuration parameters of the different smart contracts that power the Hermez network.
2320 properties:
2321 hermez:
2322 type: object
2323 description: Constant configuration of the Hermez smart contract.
2324 properties:
2325 HEZTokenAddress:
2326 allOf:
2327 - $ref: '#/components/schemas/EthereumAddress'
2328 - description: Ethereum address of the HEZ token.
2329 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2330 maxTxVerifiers:
2331 type: integer
2332 description: Maximum transactions of the verifiers.
2333 example: 100
2334 maxLoadAmount:
2335 type: integer
2336 description: Maximum load amount (L1 to L2) allowed.
2337 example: 321
2338 maxAmount:
2339 type: integer
2340 description: Maximum amount (L2 to L2) allowed.
2341 example: 837
2342 maxTokens:
2343 type: integer
2344 description: Maximum number of different tokens that can be registered in the network.
2345 example: 4294967295
2346 reservedAccountIndex:
2347 type: integer
2348 description: First user index. Bellow this number the indexes are reserved for the protocol.
2349 example: 256
2350 lastAccountIndex:
2351 type: integer
2352 description: Biggest account index that can be registered.
2353 example: 4294967295
2354 exitAccountIndex:
2355 type: integer
2356 description: Account index used to indicate that a transaction is an `exit` or `force exit`.
2357 example: 1
2358 L1CoordinatorBytes:
2359 type: integer
2360 description: Number of bytes that a L1 coordinator transaction has ([4 bytes] token + [32 bytes] babyjub + [65 bytes] compressedSignature).
2361 example: 23
2362 L1UserBytes:
2363 type: integer
2364 description: Number of bytes that a L2 transaction has ([4 bytes] fromIdx + [4 bytes] toIdx + [2 bytes] amountFloat16 + [1 bytes] fee).
2365 example: 32
2366 L2Bytes:
2367 type: integer
2368 description: Number of bytes that a L2 transaction has ([4 bytes] fromIdx + [4 bytes] toIdx + [2 bytes] amountFloat16 + [1 bytes] fee).
2369 example: 33
2370 maxL1Transactions:
2371 type: integer
2372 description: Maximum L1 transactions allowed to be queued in a batch.
2373 example: 128
2374 maxL1UserTransactions:
2375 type: integer
2376 description: Maximum L1 transactions allowed to be queued in a batch by users (anyone who is not a coordinator).
2377 example: 32
2378 RField:
2379 allOf:
2380 - $ref: '#/components/schemas/BigInt'
2381 - description: Modulus zkSNARK.
2382 withdrawManager:
2383 type: object
2384 description: Constant configuration of the withdraw manager smart contract.
2385 properties:
2386 noLimit:
2387 type: integer
2388 description: Reserved bucket index when the token value is 0 USD.
2389 example: 0
2390 amountOfBuckets:
2391 type: integer
2392 description: Number of buckets
2393 maxWithdrawalDelay:
2394 type: integer
2395 description: Maximum delay to withdraw tokens. Time is measured in Ethereum blocks.
2396 auction:
2397 type: object
2398 description: Constant configuration of the auction smart contract.
2399 properties:
2400 HEZTokenAddress:
2401 allOf:
2402 - $ref: '#/components/schemas/EthereumAddress'
2403 - description: Ethereum address of the HEZ token.
2404 - example: "0x333dc4262BCDbf85190C01c996b4C06a461d2430"
2405 rollupAddress:
2406 allOf:
2407 - $ref: '#/components/schemas/EthereumAddress'
2408 - description: Ethereum address of the rollup smart contract.
2409 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
2410 genesisBlockNum:
2411 allOf:
2412 - $ref: '#/components/schemas/EthBlockNum'
2413 - description: Ethereum block number in which the smart contract starts operating.
2414 delayGenesis:
2415 type: integer
2416 description: Time delay between `genesisBlockNum` and the beginning of the first block. Time is measured in Ethereum blocks.
2417 blocksPerSlot:
2418 type: integer
2419 description: Blocks per slot.
2420 initialMinimalBidding:
2421 type: integer
2422 description: Minimum bid when no one has bid yet.
2423 withdrawalDelayer:
2424 type: object
2425 description: Constant configuration of the withdrawal delayer smart contract.
2426 properties:
2427 maxWithdrawalDelay:
2428 type: integer
2429 description: Maximum time delay in which the tokens can be locked in the contract. Time is measured in Ethereum blocks.
2430 example: 200
2431 maxEmergencyModeTime:
2432 type: integer
2433 description: Maximum amount of time in which the contract can be in emergency mode. Time is measured in Ethereum blocks.
2434 example: 2000
2435 Error:
2436 type: object
2437 description: Error response.
2438 properties:
2439 message:
2440 type: string
2441 Error400:
2442 allOf:
2443 - $ref: '#/components/schemas/Error'
2444 - example:
2445 message: Invalid signature.
2446 Error404:
2447 allOf:
2448 - $ref: '#/components/schemas/Error'
2449 - example:
2450 message: Item(s) not found.
2451 Error500:
2452 allOf:
2453 - $ref: '#/components/schemas/Error'
2454 - example:
2455 message: Database error.