hermez-node/api/swagger.yml
api/swagger.ymlRaw
1openapi: 3.0.0
2info:
3 description: |
4 This Hermez node API is the layer that allows 3rd party apps and services to interface with the node to use the layer two features of 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 Note that some of the interactions with the rollup must be done using the Ethereum network directly.
11 Another way to integrate with the rollup is to [deploy a node](github.com/hermeznetwork/hermez-node/) and connect directly to its PostgreSQL database.
12
13 ### Pagination
14
15 #### Usage
16
17 All the endpoints that return a list of undefined size use pagination. Unless the opposite is explicitly said.
18 In order to use pagination, three query parameters are used:
19 * `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).
20 * `order`: all paginated items are ordered chronologically. 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.
21 * `limit`: maximum amount of items to include in each response. Default is 20, maximum is 2049.
22
23 Responses for those endpoints will always include a `pendingItems` property. This property includes the amount of items that are not fetched yet. This can be used to:
24 * Calculate the amount of items that match the filters: `totalItems = length(alreadyFetchedItems) + pendingItems`
25 * Know when all items have been fetched: `if pendingItems == 0 {/* all items have been fetched */}`
26
27 #### Reorgs and Safety
28
29 Since all the items are ordered chronologically, there are no safety problems when fetching items in ascending order, except for reorgs (more on this later).
30 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 querying without the `fromItem` set to `pagination.lastItem`.
31 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 batch 424 gets reorged, it will be deleted, but eventually, a new batch 424 will appear with potentially different content. However, these two batches number 424, will have different `itemId`.
32
33 ### Signatures
34
35 There are two endpoints that require signatures:
36 * POST /account-creation-authorization: signed using an Ethereum key.
37 * POST /transactions-pool: signed using BJJ key.
38
39 More details on how to sign will be provided soon.
40
41 ### Contact
42
43 If you have any doubt or suggestion, please contact us at:
44 * [GitHub](https://github.com/hermeznetwork/hermez-node/)
45 * [Telegram](https://t.me/hermez_network)
46 * [Discord](https://bit.ly/3nohULM)
47 * Email: hello@hermez.network
48 * [Twitter](https://twitter.com/hermez_network)
49# TODO: add further documentation on how to sign auths and txs
50
51 version: "0.0.1"
52 title: Hermez Network API
53# TODO: update with support email
54# termsOfService: 'http://swagger.io/terms/'
55 license:
56 name: license AGPLv3
57 url: 'https://www.gnu.org/licenses/agpl-3.0.html'
58externalDocs:
59 description: Find out more about Hermez network.
60 url: 'https://hermez.io'
61servers:
62 - description: Hosted mock up
63 url: https://apimock.hermez.network
64 - description: Localhost mock Up
65 url: http://localhost:4010
66tags:
67 - name: Coordinator
68 description: Endpoints used by the nodes running in coordinator mode. They are used to interact with the network.
69 - name: Explorer
70 description: Endpoints used by the nodes running in explorer mode. They are used to get information of the netwrok.
71paths:
72 '/account-creation-authorization':
73 post:
74 tags:
75 - Coordinator
76 summary: Send an authorization that will allow the coordinator to register accounts associated to an Ethereum address on behalf of the user.
77 description: >-
78 Send an authorization to create rollup accounts associated with an Ethereum address. Each account creation (an account can only hold a specific token) is effective once the coordinator forges the corresponding L1CoordinatorTx (which is always of type *account creation*).
79 operationId: postRegister
80 requestBody:
81 description: Account creation authorization.
82 required: true
83 content:
84 application/json:
85 schema:
86 $ref: '#/components/schemas/AccountCreationAuthorizationPost'
87 responses:
88 '200':
89 description: Successful operation.
90 '400':
91 description: Bad request.
92 content:
93 application/json:
94 schema:
95 $ref: '#/components/schemas/Error400'
96 '500':
97 description: Internal server error.
98 content:
99 application/json:
100 schema:
101 $ref: '#/components/schemas/Error500'
102 '/account-creation-authorization/{hezEthereumAddress}':
103 get:
104 tags:
105 - Coordinator
106 summary: Find out if the coordinator has the ability to create accounts associated with an Ethereum address.
107 description: >-
108 Returns the authorization to perform an account creation with the given Ethereum address on behalf of the Ethereum address holder.
109 operationId: getAccountCreationAuthorization
110 parameters:
111 - name: hezEthereumAddress
112 in: path
113 description: Ethereum address.
114 required: true
115 schema:
116 $ref: '#/components/schemas/HezEthereumAddress'
117 responses:
118 '200':
119 description: Successful operation.
120 content:
121 application/json:
122 schema:
123 $ref: '#/components/schemas/AccountCreationAuthorization'
124 '400':
125 description: Bad request.
126 content:
127 application/json:
128 schema:
129 $ref: '#/components/schemas/Error400'
130 '404':
131 description: Not found.
132 content:
133 application/json:
134 schema:
135 $ref: '#/components/schemas/Error404'
136 '500':
137 description: Internal server error.
138 content:
139 application/json:
140 schema:
141 $ref: '#/components/schemas/Error500'
142 '/accounts':
143 get:
144 tags:
145 - Explorer
146 summary: Get accounts balances and other associated information.
147 description: Get account balances and other associated information.
148 operationId: getAccounts
149 parameters:
150 - name: hezEthereumAddress
151 in: query
152 description: Only get accounts associated to an Ethereum address. Incompatible with the query `BJJ`.
153 required: false
154 schema:
155 $ref: '#/components/schemas/HezEthereumAddress'
156 - name: BJJ
157 in: query
158 description: Only get accounts associated to a BabyJubJub compressed public key. Incompatible with the query `hezEthereumAddress`.
159 required: false
160 schema:
161 $ref: '#/components/schemas/BJJ'
162 - name: tokenIds
163 in: query
164 required: false
165 description: Only get accounts of specific tokens. This is represented by a comma separated list of token identifiers.
166 schema:
167 type: string
168 description: Comma separated list of token identifiers.
169 example: "3,87,91"
170 - name: fromItem
171 in: query
172 required: false
173 description: Indicates the desired first item (using the itemId property) to be included in the response.
174 schema:
175 type: number
176 - name: order
177 in: query
178 required: false
179 description: Order of the returned items. Accounts will be ordered by increasing account index.
180 schema:
181 type: string
182 default: ASC
183 enum:
184 - ASC
185 - DESC
186 - name: limit
187 in: query
188 required: false
189 description: Maximum number of items to be returned.
190 schema:
191 type: integer
192 minimum: 1
193 maximum: 2049
194 responses:
195 '200':
196 description: Successful operation.
197 content:
198 application/json:
199 schema:
200 $ref: '#/components/schemas/Accounts'
201 '400':
202 description: Bad request.
203 content:
204 application/json:
205 schema:
206 $ref: '#/components/schemas/Error400'
207 '500':
208 description: Internal server error.
209 content:
210 application/json:
211 schema:
212 $ref: '#/components/schemas/Error500'
213 '/accounts/{accountIndex}':
214 get:
215 tags:
216 - Explorer
217 summary: Get an account by its index.
218 description: Get an account by its index.
219 operationId: getAccount
220 parameters:
221 - name: accountIndex
222 in: path
223 description: Identifier of an account.
224 required: true
225 schema:
226 $ref: '#/components/schemas/AccountIndex'
227 responses:
228 '200':
229 description: Successful operation.
230 content:
231 application/json:
232 schema:
233 $ref: '#/components/schemas/Account'
234 '400':
235 description: Bad request.
236 content:
237 application/json:
238 schema:
239 $ref: '#/components/schemas/Error400'
240 '404':
241 description: Not found.
242 content:
243 application/json:
244 schema:
245 $ref: '#/components/schemas/Error404'
246 '500':
247 description: Internal server error.
248 content:
249 application/json:
250 schema:
251 $ref: '#/components/schemas/Error500'
252 '/exits':
253 get:
254 tags:
255 - Explorer
256 summary: Get exit information. This information is required to perform a withdraw.
257 description: Get exit information. This information is required to perform a withdraw.
258 operationId: getExits
259 parameters:
260 - name: tokenId
261 in: query
262 required: false
263 description: Only get exits of specific token
264 schema:
265 $ref: '#/components/schemas/TokenId'
266 - name: hezEthereumAddress
267 in: query
268 description: Get exits associated to an Ethereum address. Incompatible with query `BJJ` and `accountIndex`.
269 required: false
270 schema:
271 $ref: '#/components/schemas/HezEthereumAddress'
272 - name: BJJ
273 in: query
274 description: Get exits associated to a BabyJubJub compressed public key. Incompatible with query `hezEthereumAddress` and `accountIndex`.
275 required: false
276 schema:
277 $ref: '#/components/schemas/BJJ'
278 - name: accountIndex
279 in: query
280 description: Get exits associated to a specific account. Incompatible with queries `tokenId`, `hezEthereumAddress` and `BJJ`.
281 required: false
282 schema:
283 $ref: '#/components/schemas/AccountIndex'
284 - name: batchNum
285 in: query
286 description: Get exits from the exit tree of a specific batch.
287 required: false
288 schema:
289 $ref: '#/components/schemas/BatchNum'
290 - name: onlyPendingWithdraws
291 in: query
292 description: Get exits with pending withdrawals.
293 required: false
294 schema:
295 type: boolean
296 - name: fromItem
297 in: query
298 required: false
299 description: Indicates the desired first item (using the itemId property) to be included in the response.
300 schema:
301 type: number
302 - name: order
303 in: query
304 required: false
305 description: Order of the returned items. Exits will be ordered by increasing (batchNum, accountIndex).
306 schema:
307 type: string
308 default: ASC
309 enum:
310 - ASC
311 - DESC
312 - name: limit
313 in: query
314 required: false
315 description: Maximum number of items to be returned.
316 schema:
317 type: integer
318 minimum: 1
319 maximum: 2049
320 responses:
321 '200':
322 description: Successful operation.
323 content:
324 application/json:
325 schema:
326 $ref: '#/components/schemas/Exits'
327 '400':
328 description: Bad request.
329 content:
330 application/json:
331 schema:
332 $ref: '#/components/schemas/Error400'
333 '500':
334 description: Internal server error.
335 content:
336 application/json:
337 schema:
338 $ref: '#/components/schemas/Error500'
339 '/exits/{batchNum}/{accountIndex}':
340 get:
341 tags:
342 - Explorer
343 summary: Get specific exit information.
344 description: Get exit information form a specific exit tree and account. This information is required to perform a withdraw. Exits are identified with accounIndex and batchNum since every batch that has exits has a different exit tree.
345 operationId: getExit
346 parameters:
347 - name: batchNum
348 in: path
349 description: Batch of the exit tree.
350 required: true
351 schema:
352 $ref: '#/components/schemas/BatchNum'
353 - name: accountIndex
354 in: path
355 description: Account identifier.
356 required: true
357 schema:
358 $ref: '#/components/schemas/AccountIndex'
359 responses:
360 '200':
361 description: Successful operation.
362 content:
363 application/json:
364 schema:
365 $ref: '#/components/schemas/Exit'
366 '400':
367 description: Bad request.
368 content:
369 application/json:
370 schema:
371 $ref: '#/components/schemas/Error400'
372 '404':
373 description: Not found.
374 content:
375 application/json:
376 schema:
377 $ref: '#/components/schemas/Error404'
378 '500':
379 description: Internal server error.
380 content:
381 application/json:
382 schema:
383 $ref: '#/components/schemas/Error500'
384 '/transactions-pool':
385 post:
386 tags:
387 - Coordinator
388 summary: Add an L2 transaction to the coordinator's pool.
389 description: >-
390 Send L2 transaction. The transaction will be stored in the transaction pool of the coordinator and eventually forged.
391 operationId: postTx
392 requestBody:
393 description: Signed transaction.
394 required: true
395 content:
396 application/json:
397 schema:
398 $ref: '#/components/schemas/PostPoolL2Transaction'
399 responses:
400 '200':
401 description: Successful operation.
402 content:
403 application/json:
404 schema:
405 $ref: '#/components/schemas/TransactionId'
406 '400':
407 description: Bad request.
408 content:
409 application/json:
410 schema:
411 $ref: '#/components/schemas/Error400'
412 '500':
413 description: Internal server error.
414 content:
415 application/json:
416 schema:
417 $ref: '#/components/schemas/Error500'
418 '/transactions-pool/{id}':
419 get:
420 tags:
421 - Coordinator
422 summary: Get details and status of a transaction that is in the pool.
423 description: >-
424 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.
425 Only transactions from the pool will be returned.
426 Note that the transaction pool is different for each coordinator and therefore only a coordinator that has received a specific transaction
427 will be able to provide information about that transaction.
428 operationId: getPoolTx
429 parameters:
430 - name: id
431 in: path
432 description: Transaction identifier.
433 required: true
434 schema:
435 $ref: '#/components/schemas/TransactionId'
436 responses:
437 '200':
438 description: Successful operation.
439 content:
440 application/json:
441 schema:
442 $ref: '#/components/schemas/PoolL2Transaction'
443 '400':
444 description: Bad request.
445 content:
446 application/json:
447 schema:
448 $ref: '#/components/schemas/Error400'
449 '404':
450 description: Not found.
451 content:
452 application/json:
453 schema:
454 $ref: '#/components/schemas/Error404'
455 '500':
456 description: Internal server error.
457 content:
458 application/json:
459 schema:
460 $ref: '#/components/schemas/Error500'
461 '/transactions-history':
462 get:
463 tags:
464 - Explorer
465 summary: Get details and status of transactions that have been forged.
466 description: >-
467 Get historical transactions. This endpoint will return all the different types of **forged** transactions, this means that:
468 * Transactions that are still in the transaction pool of any coordinator are not included. These transactions can be fetched using `GET /transactions-pool/{id}`.
469 * L1 transactions sent by users that have not been forged yet are not included. These transactions can be fetched using `GET /transactions-history/{id}`.
470 operationId: getHistoryTxs
471 parameters:
472 - name: tokenId
473 in: query
474 required: false
475 description: Only get transactions of specific token
476 schema:
477 $ref: '#/components/schemas/TokenId'
478 - name: hezEthereumAddress
479 in: query
480 required: false
481 description: Only get transactions sent from or to an account associated with an Ethereum address Incompatible with the queries `BJJ` and `accountIndex`.
482 schema:
483 $ref: '#/components/schemas/HezEthereumAddress'
484 - name: BJJ
485 in: query
486 description: Only get transactions associated with a BabyJubJub compressed public key. Incompatible with the queries `hezEthereumAddress` and `accountIndex`.
487 required: false
488 schema:
489 $ref: '#/components/schemas/BJJ'
490 - name: accountIndex
491 in: query
492 required: false
493 description: Only get transactions sent from or to a specific account. Incompatible with the queries `tokenId`, `hezEthereumAddress` and `BJJ`.
494 schema:
495 $ref: '#/components/schemas/AccountIndex'
496 - name: batchNum
497 in: query
498 required: false
499 description: Only get transactions forged in a specific batch.
500 schema:
501 $ref: '#/components/schemas/BatchNum'
502 - name: type
503 in: query
504 required: false
505 description: Only get transactions of a specific type.
506 schema:
507 $ref: '#/components/schemas/TransactionType'
508 - name: fromItem
509 in: query
510 required: false
511 description: Indicates the desired first item (using the itemId property) to be included in the response.
512 schema:
513 type: number
514 - name: order
515 in: query
516 required: false
517 description: Order of the returned items. History transactions will be ordered by (batchNum, position).
518 schema:
519 type: string
520 default: ASC
521 enum:
522 - ASC
523 - DESC
524 - name: limit
525 in: query
526 required: false
527 description: Maximum number of items to be returned.
528 schema:
529 type: integer
530 minimum: 1
531 maximum: 2049
532 responses:
533 '200':
534 description: Successful operation.
535 content:
536 application/json:
537 schema:
538 $ref: '#/components/schemas/HistoryTransactions'
539 '400':
540 description: Bad request.
541 content:
542 application/json:
543 schema:
544 $ref: '#/components/schemas/Error400'
545 '500':
546 description: Internal server error.
547 content:
548 application/json:
549 schema:
550 $ref: '#/components/schemas/Error500'
551 '/transactions-history/{id}':
552 get:
553 tags:
554 - Explorer
555 summary: Get details and status of a historical transaction.
556 description: >-
557 Get transaction by its ID. This endpoint will return all the different types of transactions except those that are still in the pool of any coordinator.
558 operationId: getHistoryTx
559 parameters:
560 - name: id
561 in: path
562 description: Transaction identifier.
563 required: true
564 schema:
565 $ref: '#/components/schemas/TransactionId'
566 responses:
567 '200':
568 description: Successful operation.
569 content:
570 application/json:
571 schema:
572 $ref: '#/components/schemas/HistoryTransaction'
573 '400':
574 description: Bad request.
575 content:
576 application/json:
577 schema:
578 $ref: '#/components/schemas/Error400'
579 '404':
580 description: Not found.
581 content:
582 application/json:
583 schema:
584 $ref: '#/components/schemas/Error404'
585 '500':
586 description: Internal server error.
587 content:
588 application/json:
589 schema:
590 $ref: '#/components/schemas/Error500'
591 '/batches':
592 get:
593 tags:
594 - Explorer
595 summary: Get information about forged batches.
596 description: >-
597 Get information about forged batches.
598 operationId: getBatches
599 parameters:
600 - name: minBatchNum
601 in: query
602 required: false
603 description: Include only `batchNum > minBatchNum` batches.
604 schema:
605 $ref: '#/components/schemas/BatchNum'
606 - name: maxBatchNum
607 in: query
608 required: false
609 description: Include only `batchNum < maxBatchNum` batches.
610 schema:
611 type: number
612 - name: slotNum
613 in: query
614 required: false
615 description: Include only batches that were forged within the specified slot.
616 schema:
617 $ref: '#/components/schemas/SlotNum'
618 - name: forgerAddr
619 in: query
620 required: false
621 description: Include only batches forged by `forgerAddr`
622 schema:
623 $ref: '#/components/schemas/EthereumAddress'
624 - name: fromItem
625 in: query
626 required: false
627 description: Indicates the desired first item (using the itemId property) to be included in the response.
628 schema:
629 type: number
630 - name: order
631 in: query
632 required: false
633 description: Order of the returned items. Batches will be ordered by increasing `batchNum`.
634 schema:
635 type: string
636 default: ASC
637 enum:
638 - ASC
639 - DESC
640 - name: limit
641 in: query
642 required: false
643 description: Maximum number of items to be returned.
644 schema:
645 type: integer
646 minimum: 1
647 maximum: 2049
648 responses:
649 '200':
650 description: Successful operation.
651 content:
652 application/json:
653 schema:
654 $ref: '#/components/schemas/Batches'
655 '400':
656 description: Bad request.
657 content:
658 application/json:
659 schema:
660 $ref: '#/components/schemas/Error400'
661 '500':
662 description: Internal server error.
663 content:
664 application/json:
665 schema:
666 $ref: '#/components/schemas/Error500'
667 '/batches/{batchNum}':
668 get:
669 tags:
670 - Explorer
671 summary: Get a specific batch.
672 description: >-
673 Get a specific batch.
674 operationId: getBatch
675 parameters:
676 - name: batchNum
677 in: path
678 description: Batch identifier.
679 required: true
680 schema:
681 $ref: '#/components/schemas/BatchNum'
682 responses:
683 '200':
684 description: Successful operation
685 content:
686 application/json:
687 schema:
688 $ref: '#/components/schemas/Batch'
689 '400':
690 description: Bad request.
691 content:
692 application/json:
693 schema:
694 $ref: '#/components/schemas/Error400'
695 '404':
696 description: Not found.
697 content:
698 application/json:
699 schema:
700 $ref: '#/components/schemas/Error404'
701 '500':
702 description: Internal server error.
703 content:
704 application/json:
705 schema:
706 $ref: '#/components/schemas/Error500'
707 '/full-batches/{batchNum}':
708 get:
709 tags:
710 - Explorer
711 summary: Get a full batch.
712 description: >-
713 Get a specific batch, including the associated transactions. The object returned in this method can be a bit heavy.
714 If you're devloping a front end, you may consider using a combinaton of `GET /batches/{batchnum}` and `GET /history-transactions?batchNum={batchNum}`.
715 operationId: getFullBatch
716 parameters:
717 - name: batchNum
718 in: path
719 description: Batch identifier
720 required: true
721 schema:
722 $ref: '#/components/schemas/BatchNum'
723 responses:
724 '200':
725 description: successful operation
726 content:
727 application/json:
728 schema:
729 $ref: '#/components/schemas/FullBatch'
730 '400':
731 description: Bad request.
732 content:
733 application/json:
734 schema:
735 $ref: '#/components/schemas/Error400'
736 '404':
737 description: Not found.
738 content:
739 application/json:
740 schema:
741 $ref: '#/components/schemas/Error404'
742 '500':
743 description: Internal server error.
744 content:
745 application/json:
746 schema:
747 $ref: '#/components/schemas/Error500'
748 '/slots':
749 get:
750 tags:
751 - Explorer
752 summary: Get information about slots.
753 description: >-
754 Get information about slots.
755 operationId: getSlots
756 parameters:
757 - name: minSlotNum
758 in: query
759 required: false
760 description: Only include slots with `slotNum >= minSlotNum`. By default, `minSlotNum = 0`.
761 schema:
762 $ref: '#/components/schemas/SlotNum'
763 - name: maxSlotNum
764 in: query
765 required: false
766 description: Only include slots with `slotNum <= maxSlotNum`.
767 schema:
768 $ref: '#/components/schemas/SlotNum'
769 - name: wonByEthereumAddress
770 in: query
771 required: false
772 description: Only include slots won by a coordinator whose `bidderAddr == wonByEthereumAddress`.
773 schema:
774 $ref: '#/components/schemas/EthereumAddress'
775 - name: finishedAuction
776 in: query
777 required: false
778 description: If set to true, only include slots whose auction has finished.
779 schema:
780 type: boolean
781 - name: fromItem
782 in: query
783 required: false
784 description: Indicates the desired first item (using the itemId property) to be included in the response.
785 schema:
786 type: number
787 - name: order
788 in: query
789 required: false
790 description: Order of the returned items. Slots will be ordered by increasing `slotNum`.
791 schema:
792 type: string
793 default: ASC
794 enum:
795 - ASC
796 - DESC
797 - name: limit
798 in: query
799 required: false
800 description: Maximum number of items to be returned.
801 schema:
802 type: integer
803 minimum: 1
804 maximum: 2049
805 responses:
806 '200':
807 description: Successful operation.
808 content:
809 application/json:
810 schema:
811 $ref: '#/components/schemas/Slots'
812 '400':
813 description: Bad request.
814 content:
815 application/json:
816 schema:
817 $ref: '#/components/schemas/Error400'
818 '500':
819 description: Internal server error.
820 content:
821 application/json:
822 schema:
823 $ref: '#/components/schemas/Error500'
824 '/slots/{slotNum}':
825 get:
826 tags:
827 - Explorer
828 summary: Get information about a specific slot.
829 description: >-
830 Get information about a specific slot.
831 operationId: getSlot
832 parameters:
833 - name: slotNum
834 in: path
835 required: true
836 description: Identifier of the slot.
837 schema:
838 $ref: '#/components/schemas/SlotNum'
839 responses:
840 '200':
841 description: Successful operation.
842 content:
843 application/json:
844 schema:
845 $ref: '#/components/schemas/Slot'
846 '400':
847 description: Bad request.
848 content:
849 application/json:
850 schema:
851 $ref: '#/components/schemas/Error400'
852 '404':
853 description: Not found.
854 content:
855 application/json:
856 schema:
857 $ref: '#/components/schemas/Error404'
858 '500':
859 description: Internal server error.
860 content:
861 application/json:
862 schema:
863 $ref: '#/components/schemas/Error500'
864 '/bids':
865 get:
866 tags:
867 - Explorer
868 summary: Get a list of bids.
869 description: >-
870 Get a list of bids. It's necessary to provide at least one of the following filters: `slotNum`, `bidderAddr`.
871 operationId: getSlotBids
872 parameters:
873 - name: slotNum
874 in: query
875 description: Slot identifier. Specify the auction where the returned bids were made.
876 required: false
877 schema:
878 $ref: '#/components/schemas/SlotNum'
879 - name: bidderAddr
880 in: query
881 description: Get only bids made by a coordinator identified by its bidder address. In this case, the bids will be returned in the order that the coordinator made them.
882 required: false
883 schema:
884 $ref: '#/components/schemas/EthereumAddress'
885 - name: fromItem
886 in: query
887 required: false
888 description: Indicates the desired first item (using the itemId property) to be included in the response.
889 schema:
890 type: number
891 - name: order
892 in: query
893 required: false
894 description: Order of the returned items. Bids will be ordered by increasing (slotNum, bidValue)`.
895 schema:
896 type: string
897 default: ASC
898 enum:
899 - ASC
900 - DESC
901 - name: limit
902 in: query
903 required: false
904 description: Maximum number of items to be returned.
905 schema:
906 type: integer
907 minimum: 1
908 maximum: 2049
909 responses:
910 '200':
911 description: Successful operation
912 content:
913 application/json:
914 schema:
915 $ref: '#/components/schemas/Bids'
916 '400':
917 description: Bad request.
918 content:
919 application/json:
920 schema:
921 $ref: '#/components/schemas/Error400'
922 '500':
923 description: Internal server error.
924 content:
925 application/json:
926 schema:
927 $ref: '#/components/schemas/Error500'
928 '/state':
929 get:
930 tags:
931 - Explorer
932 summary: Return information that represents the current state of the network.
933 description: Return information that represents the current state of the network. It also includes metrics and statistics.
934 operationId: getState
935 responses:
936 '200':
937 description: Successful operation.
938 content:
939 application/json:
940 schema:
941 $ref: '#/components/schemas/State'
942 '400':
943 description: Bad request.
944 content:
945 application/json:
946 schema:
947 $ref: '#/components/schemas/Error400'
948 '500':
949 description: Internal server error.
950 content:
951 application/json:
952 schema:
953 $ref: '#/components/schemas/Error500'
954 '/config':
955 get:
956 tags:
957 - Explorer
958 summary: Return constant configuration of the network.
959 description: Return constant configuration of the network.
960 operationId: getConfig
961 responses:
962 '200':
963 description: Successful operation.
964 content:
965 application/json:
966 schema:
967 $ref: '#/components/schemas/Config'
968 '500':
969 description: Internal server error.
970 content:
971 application/json:
972 schema:
973 $ref: '#/components/schemas/Error500'
974 '/tokens':
975 get:
976 tags:
977 - Explorer
978 summary: Get information of the supported tokens in the Hermez Network.
979 description: Get information of the supported tokens in the Hermez Network.
980 operationId: getTokens
981 parameters:
982 - name: ids
983 in: query
984 required: false
985 description: Include only specific tokens by their Hermez identifiers.
986 schema:
987 type: string
988 description: Comma separated list of token identifiers
989 example: "2,44,689"
990 - name: symbols
991 in: query
992 required: false
993 description: Include only specific tokens by their symbols.
994 schema:
995 type: string
996 description: Comma separated list of token symbols.
997 example: "DAI,NEC,UMA"
998 - name: name
999 in: query
1000 required: false
1001 description: Include token(s) by their names (or a substring of the name).
1002 schema:
1003 type: string
1004 - name: fromItem
1005 in: query
1006 required: false
1007 description: Indicates the desired first item (using the itemId property) to be included in the response.
1008 schema:
1009 type: number
1010 - name: order
1011 in: query
1012 required: false
1013 description: Order of the returned items. Tokens will be ordered by increasing tokenID.
1014 schema:
1015 type: string
1016 default: ASC
1017 enum:
1018 - ASC
1019 - DESC
1020 - name: limit
1021 in: query
1022 required: false
1023 description: Maximum number of items to be returned.
1024 schema:
1025 type: integer
1026 minimum: 1
1027 maximum: 2049
1028 responses:
1029 '200':
1030 description: Successful operation.
1031 content:
1032 application/json:
1033 schema:
1034 $ref: '#/components/schemas/Tokens'
1035 '400':
1036 description: Bad request.
1037 content:
1038 application/json:
1039 schema:
1040 $ref: '#/components/schemas/Error400'
1041 '500':
1042 description: Internal server error.
1043 content:
1044 application/json:
1045 schema:
1046 $ref: '#/components/schemas/Error500'
1047 '/tokens/{id}':
1048 get:
1049 tags:
1050 - Explorer
1051 summary: Get information of a token supported by Hermez Network.
1052 description: Get information of a token supported by Hermez Network.
1053 operationId: getToken
1054 parameters:
1055 - name: id
1056 in: path
1057 description: Token identifier
1058 required: true
1059 schema:
1060 $ref: '#/components/schemas/TokenId'
1061 responses:
1062 '200':
1063 description: Successful operation.
1064 content:
1065 application/json:
1066 schema:
1067 $ref: '#/components/schemas/Token'
1068 '400':
1069 description: Bad request.
1070 content:
1071 application/json:
1072 schema:
1073 $ref: '#/components/schemas/Error400'
1074 '404':
1075 description: Not found.
1076 content:
1077 application/json:
1078 schema:
1079 $ref: '#/components/schemas/Error404'
1080 '500':
1081 description: Internal server error.
1082 content:
1083 application/json:
1084 schema:
1085 $ref: '#/components/schemas/Error500'
1086 '/coordinators':
1087 get:
1088 tags:
1089 - Explorer
1090 summary: Get information about coordinators.
1091 description: Get information about coordinators.
1092 operationId: getCoordinators
1093 parameters:
1094 - name: forgerAddr
1095 in: query
1096 required: false
1097 description: Get coordinators by it's forger address.
1098 schema:
1099 $ref: '#/components/schemas/EthereumAddress'
1100 - name: bidderAddr
1101 in: query
1102 required: false
1103 description: Get coordinators by it's bidder address.
1104 schema:
1105 $ref: '#/components/schemas/EthereumAddress'
1106 - name: fromItem
1107 in: query
1108 required: false
1109 description: Indicates the desired first item (using the itemId property) to be included in the response.
1110 schema:
1111 type: number
1112 - name: order
1113 in: query
1114 required: false
1115 description: Order of the returned items. Coordinators will be ordered by increasing (ethereumBlock, forgerAddr).
1116 schema:
1117 type: string
1118 default: ASC
1119 enum:
1120 - ASC
1121 - DESC
1122 - name: limit
1123 in: query
1124 required: false
1125 description: Maximum number of items to be returned.
1126 schema:
1127 type: integer
1128 minimum: 1
1129 maximum: 2049
1130 responses:
1131 '200':
1132 description: Successful operation.
1133 content:
1134 application/json:
1135 schema:
1136 $ref: '#/components/schemas/Coordinators'
1137 '400':
1138 description: Bad request.
1139 content:
1140 application/json:
1141 schema:
1142 $ref: '#/components/schemas/Error400'
1143 '500':
1144 description: Internal server error.
1145 content:
1146 application/json:
1147 schema:
1148 $ref: '#/components/schemas/Error500'
1149components:
1150 schemas:
1151 ItemId:
1152 type: integer
1153 description: Position of the item in the DB. This is useful for pagination, but has nothing to do with the protocol.
1154 PostPoolL2Transaction:
1155 type: object
1156 description: L2 transaction to be posted.
1157 properties:
1158 id:
1159 $ref: '#/components/schemas/TransactionId'
1160 type:
1161 $ref: '#/components/schemas/TransactionTypeL2'
1162 tokenId:
1163 $ref: '#/components/schemas/TokenId'
1164 fromAccountIndex:
1165 $ref: '#/components/schemas/AccountIndex'
1166 toAccountIndex:
1167 type: string
1168 description: >-
1169 Identifier of the destination account. It references the position where the account is inside the state Merkle tree.
1170 The identifier is built using: `hez:` + `token symbol:` + `index`. If this is provided, toHezEthereumAddress and toBjj
1171 must be null. To perform an exit the value hez:EXIT:1 must be used.
1172 example: null
1173 nullable: true
1174 toHezEthereumAddress:
1175 type: string
1176 description: "Address of an Etherum account linked to the Hermez Network. If this is provided, toAccountIndex and toBjj must be null."
1177 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1178 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1179 nullable: true
1180 toBjj:
1181 type: string
1182 description: >-
1183 BabyJubJub compressed 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.
1184 If this is provided, toAccountIndex must be null and toHezEthereumAddress must be hez:0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.
1185 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1186 example: null
1187 nullable: true
1188 amount:
1189 allOf:
1190 - $ref: '#/components/schemas/BigInt'
1191 - description: Amount of tokens to be sent.
1192 example: "6300000000000000000"
1193 fee:
1194 $ref: '#/components/schemas/FeeSelector'
1195 nonce:
1196 $ref: '#/components/schemas/Nonce'
1197 signature:
1198 allOf:
1199 - $ref: '#/components/schemas/BJJSignature'
1200 - description: Signature of the transaction. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=l2a-idl2).
1201 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1202 requestFromAccountIndex:
1203 type: string
1204 description: References the `fromAccountIndex` of the requested transaction.
1205 example: null
1206 nullable: true
1207 requestToAccountIndex:
1208 type: string
1209 description: References the `toAccountIndex` of the requested transaction.
1210 example: null
1211 nullable: true
1212 requestToHezEthereumAddress:
1213 type: string
1214 description: References the `toHezEthereumAddress` of the requested transaction.
1215 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1216 example: null
1217 nullable: true
1218 requestToBjj:
1219 type: string
1220 description: References the `toBjj` of the requested transaction.
1221 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1222 example: null
1223 nullable: true
1224 requestTokenId:
1225 type: integer
1226 description: References the `tokenId` of the requested transaction.
1227 example: null
1228 nullable: true
1229 requestAmount:
1230 type: string
1231 description: References the `amount` of the requested transaction.
1232 example: null
1233 nullable: true
1234 requestFee:
1235 type: integer
1236 description: References the `fee` of the requested transaction.
1237 example: null
1238 nullable: true
1239 requestNonce:
1240 type: integer
1241 description: References the `nonce` of the requested transaction.
1242 example: null
1243 nullable: true
1244 example:
1245 id: '0x020000000001000000000006'
1246 type: Transfer
1247 tokenId: 6
1248 fromAccountIndex: hez:DAI:256
1249 toAccountIndex: hez:DAI:257
1250 toHezEthereumAddress:
1251 toBjj:
1252 amount: '100000000000000'
1253 fee: 0
1254 nonce: 6
1255 signature: 1a79dd5e661d58266901a0de8afb046b466c4c1af937100f627a421771f2911fa3fde8ea2e272b4802a8b1f1229689292acd6f7e8ab4cadc4ab37b6b9e13a101
1256 additionalProperties: false
1257 required:
1258 - id
1259 - type
1260 - tokenId
1261 - fromAccountIndex
1262 - amount
1263 - fee
1264 - nonce
1265 - signature
1266 PoolL2Transaction:
1267 type: object
1268 properties:
1269 id:
1270 $ref: '#/components/schemas/TransactionId'
1271 type:
1272 $ref: '#/components/schemas/TransactionTypeL2'
1273 fromAccountIndex:
1274 $ref: '#/components/schemas/AccountIndex'
1275 fromHezEthereumAddress:
1276 type: string
1277 description: "Address of an Etherum account linked to the Hermez Network."
1278 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1279 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1280 nullable: true
1281 fromBJJ:
1282 type: string
1283 description: "BabyJubJub compressed 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."
1284 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1285 example: "hez:9CK9fjQdMUTGm8KDvGLy3MB-vnP0NCcGX7Uh7OO6KRJm"
1286 nullable: true
1287 toAccountIndex:
1288 type: string
1289 description: >-
1290 Identifier of the destination account. It references the position where the account is inside the state Merkle tree.
1291 The identifier is built using: `hez:` + `token symbol:` + `index`
1292 example: "hez:DAI:309"
1293 nullable: true
1294 toHezEthereumAddress:
1295 type: string
1296 description: "Address of an Etherum account linked to the Hermez Network."
1297 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1298 example: null
1299 nullable: true
1300 toBjj:
1301 type: string
1302 description: "BabyJubJub compressed 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."
1303 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1304 example: null
1305 nullable: true
1306 amount:
1307 allOf:
1308 - $ref: '#/components/schemas/BigInt'
1309 - description: Amount of tokens to be sent.
1310 example: "6303020000000000000"
1311 fee:
1312 $ref: '#/components/schemas/FeeSelector'
1313 nonce:
1314 $ref: '#/components/schemas/Nonce'
1315 state:
1316 $ref: '#/components/schemas/PoolL2TransactionState'
1317 signature:
1318 allOf:
1319 - $ref: '#/components/schemas/BJJSignature'
1320 - description: Signature of the transaction. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=l2a-idl2).
1321 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1322 timestamp:
1323 type: string
1324 description: Moment in which the transaction was added to the pool.
1325 format: date-time
1326 batchNum:
1327 type: integer
1328 description: Identifier of a batch. Every new forged batch increases by one the batchNum, starting at 0.
1329 minimum: 0
1330 maximum: 4294967295
1331 nullable: true
1332 example: null
1333 requestFromAccountIndex:
1334 type: string
1335 description: >-
1336 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1337 The identifier is built using: `hez:` + `token symbol:` + `index`
1338 nullable: true
1339 example: null
1340 requestToAccountIndex:
1341 type: string
1342 description: >-
1343 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1344 The identifier is built using: `hez:` + `token symbol:` + `index`
1345 nullable: true
1346 example: null
1347 requestToHezEthereumAddress:
1348 type: string
1349 description: "Address of an Etherum account linked to the Hermez Network."
1350 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1351 nullable: true
1352 example: null
1353 requestToBJJ:
1354 type: string
1355 description: "BabyJubJub compressed 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."
1356 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1357 nullable: true
1358 example: null
1359 requestTokenId:
1360 type: integer
1361 description: References the `tokenId` of the requested transaction.
1362 example: null
1363 nullable: true
1364 requestAmount:
1365 type: string
1366 description: BigInt is an integer encoded as a string for numbers that are very large.
1367 nullable: true
1368 example: null
1369 requestFee:
1370 type: integer
1371 description: Index of the fee type to select, more info [here](https://idocs.hermez.io/#/spec/zkrollup/fee-table?id=transaction-fee-table).
1372 minimum: 0
1373 maximum: 256
1374 nullable: true
1375 example: null
1376 requestNonce:
1377 type: integer
1378 description: Number that can only be used once per account. Increments by one with each transaction.
1379 minimum: 0
1380 maximum: 1.84467440737096e+19
1381 nullable: true
1382 example: null
1383 token:
1384 $ref: '#/components/schemas/Token'
1385 example:
1386 amount: '100000000000000'
1387 batchNum:
1388 fee: 0
1389 fromAccountIndex: hez:SCC:256
1390 fromBJJ: hez:r_trOasVEk0zNaalOoS9aLedu6mO7jI5XTIPu_zGXoyn
1391 fromHezEthereumAddress: hez:0x00000000000000000000000000000000004Ab84F
1392 id: '0x020000000001000000000006'
1393 nonce: 6
1394 requestAmount:
1395 requestFee: 0
1396 requestFromAccountIndex:
1397 requestNonce: 0
1398 requestToAccountIndex:
1399 requestToBJJ:
1400 requestToHezEthereumAddress:
1401 requestTokenId:
1402 signature: 5ee9c7b5baa243ba282d18596a55cc357b01513eaed75165365f802102cce4a7a1dd35e3ab31cf9039e2b8a9f570d935115be9379a3dd47813dfc014031ab201
1403 state: pend
1404 timestamp: '2020-11-17T13:58:54.422232Z'
1405 toAccountIndex: hez:SCC:257
1406 toBjj: hez:r_trOasVEk0zNaalOoS9aLedu6mO7jI5XTIPu_zGXoyn
1407 toHezEthereumAddress: hez:0x00000000000000000000000000000000004Ab84F
1408 token:
1409 USD: 23.74
1410 decimals: 7
1411 ethereumAddress: '0x0000000000000000000000000000000000000006'
1412 ethereumBlockNum: 2
1413 fiatUpdate:
1414 id: 6
1415 itemId: 7
1416 name: Some Cool Coin
1417 symbol: 'SCC'
1418 type: Transfer
1419 required:
1420 - id
1421 - type
1422 - fromAccountIndex
1423 - fromHezEthereumAddress
1424 - fromBJJ
1425 - toAccountIndex
1426 - toHezEthereumAddress
1427 - toBjj
1428 - amount
1429 - fee
1430 - nonce
1431 - state
1432 - signature
1433 - timestamp
1434 - batchNum
1435 - requestFromAccountIndex
1436 - requestToAccountIndex
1437 - requestToHezEthereumAddress
1438 - requestToBJJ
1439 - requestTokenId
1440 - requestAmount
1441 - requestFee
1442 - requestNonce
1443 - token
1444 TransactionId:
1445 type: string
1446 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)
1447 example: "0x00000000000001e240004700"
1448 EthereumAddress:
1449 type: string
1450 description: "Address of an Etherum account."
1451 pattern: "^0x[a-fA-F0-9]{40}$"
1452 example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1453 HezEthereumAddress:
1454 type: string
1455 description: "Address of an Etherum account linked to the Hermez Network."
1456 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1457 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1458 BJJ:
1459 type: string
1460 description: "BabyJubJub compressed 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."
1461 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1462 example: "hez:rR7LXKal-av7I56Y0dEBCVmwc9zpoLY5ERhy5w7G-xwe"
1463 AccountIndex:
1464 type: string
1465 description: >-
1466 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1467 The identifier is built using: `hez:` + `token symbol:` + `index`
1468 example: "hez:DAI:4444"
1469 TransactionType:
1470 type: string
1471 description: Type of transaction.
1472 enum:
1473 - Exit
1474 - Transfer
1475 - Deposit
1476 - CreateAccountDeposit
1477 - CreateAccountDepositTransfer
1478 - DepositTransfer
1479 - ForceTransfer
1480 - ForceExit
1481 - TransferToEthAddr
1482 - TransferToBJJ
1483 TransactionTypeL2:
1484 type: string
1485 description: Type of transaction.
1486 enum:
1487 - Exit
1488 - Transfer
1489 - TransferToEthAddr
1490 - TransferToBJJ
1491 TokenId:
1492 type: integer
1493 description: Identifier of a token registered in the network.
1494 minimum: 0
1495 maximum: 4294967295
1496 example: 98765
1497 BigInt:
1498 type: string
1499 description: BigInt is an integer encoded as a string for numbers that are very large.
1500 example: "8708856933496328593"
1501 pattern: "^\\d+$"
1502 FeeSelector:
1503 type: integer
1504 description: Index of the fee type to select, more info [here](https://idocs.hermez.io/#/spec/zkrollup/fee-table?id=transaction-fee-table).
1505 minimum: 0
1506 maximum: 256
1507 example: 36
1508 Nonce:
1509 type: integer
1510 description: Number that can only be used once per account, increments by one at each transaction.
1511 minimum: 0
1512 maximum: 1.84467440737096e+19
1513 example: 121
1514 PoolL2TransactionState:
1515 type: string
1516 description: >
1517 State of a L2 transaction from the coordinator pool.
1518 * pend: Pending
1519 * fing: Forging
1520 * fged: Forged
1521 * invl: Invalid
1522 enum:
1523 - pend
1524 - fing
1525 - fged
1526 - invl
1527 ETHSignature:
1528 type: string
1529 description: Ethereum signature.
1530 pattern: "^0x[a-fA-F0-9]{130}$"
1531 example: "0xf9161cd688394772d93aa3e7b3f8f9553ca4f94f65b7cece93ed4a239d5c0b4677dca6d1d459e3a5c271a34de735d4664a43e5a8960a9a6e027d12c562dd448e1c"
1532 BJJSignature:
1533 type: string
1534 description: BabyJubJub compressed signature.
1535 pattern: "^[a-fA-F0-9]{128}$"
1536 example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1537 BatchNum:
1538 type: integer
1539 description: Identifier of a batch. Every new forged batch increments by one the batchNum, starting at 0.
1540 minimum: 0
1541 maximum: 4294967295
1542 example: 5432
1543 AccountCreationAuthorizationPost:
1544 type: object
1545 properties:
1546 hezEthereumAddress:
1547 $ref: '#/components/schemas/HezEthereumAddress'
1548 bjj:
1549 $ref: '#/components/schemas/BJJ'
1550 signature:
1551 $ref: '#/components/schemas/ETHSignature'
1552 example:
1553 hezEthereumAddress: hez:0xb5270eB4ae11c6fAAff6F5fa0A5202B8d963634C
1554 bjj: hez:hg2Ydsb8O66H-steBR3cnHl944ua7E-PkTJ_SbPBBg5r
1555 signature: '0xb7cf237c4a2ff3d4df57752e7b9deb236fa384f03a79d39acf17ec5f8d12a3cf00b017c2466611310cb2bacac68460e96778278646842c6d2bcb79979271c28501'
1556 required:
1557 - hezEthereumAddress
1558 - bjj
1559 - signature
1560 AccountCreationAuthorization:
1561 type: object
1562 properties:
1563 timestamp:
1564 type: string
1565 format: date-time
1566 hezEthereumAddress:
1567 $ref: '#/components/schemas/HezEthereumAddress'
1568 bjj:
1569 $ref: '#/components/schemas/BJJ'
1570 signature:
1571 $ref: '#/components/schemas/ETHSignature'
1572 example:
1573 hezEthereumAddress: hez:0x74a549b410d01d9eC56346aE52b8550515B283b2
1574 bjj: hez:dEZ-Tj7d5h0TAqbnRTTYURYDEo5KZzB87_2WknUU8gCN
1575 signature: '0x8db6db2ad6cbe21297fb8ee01c59b01b52d4df7ea92a0f0dee0be0075a8f224a06b367407c8f402cfe0490c142a1c92da3fc29b51162ae160d35e1577d3071bb01'
1576 timestamp: '2020-11-17T13:25:36.784295Z'
1577 additionalProperties: false
1578 required:
1579 - timestamp
1580 - hezEthereumAddress
1581 - bjj
1582 - signature
1583 HistoryTransaction:
1584 type: object
1585 description: Transaction of the Hermez Network
1586 properties:
1587 L1orL2:
1588 type: string
1589 enum:
1590 - L1
1591 - L2
1592 id:
1593 $ref: '#/components/schemas/TransactionId'
1594 itemId:
1595 $ref: '#/components/schemas/ItemId'
1596 type:
1597 $ref: '#/components/schemas/TransactionType'
1598 position:
1599 $ref: '#/components/schemas/TransactionPosition'
1600 fromAccountIndex:
1601 type: string
1602 description: >-
1603 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1604 The identifier is built using: `hez:` + `token symbol:` + `index`
1605 example: "hez:DAI:4444"
1606 nullable: true
1607 fromHezEthereumAddress:
1608 type: string
1609 description: "Address of an Etherum account linked to the Hermez Network."
1610 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1611 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1612 nullable: true
1613 fromBJJ:
1614 type: string
1615 description: "BabyJubJub compressed 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."
1616 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1617 example: "hez:9CK9fjQdMUTGm8KDvGLy3MB-vnP0NCcGX7Uh7OO6KRJm"
1618 nullable: true
1619 toAccountIndex:
1620 allOf:
1621 - $ref: '#/components/schemas/AccountIndex'
1622 - example: "hez:DAI:672"
1623 toHezEthereumAddress:
1624 type: string
1625 description: "Address of an Etherum account linked to the Hermez Network."
1626 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1627 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1628 nullable: true
1629 toBJJ:
1630 type: string
1631 description: "BabyJubJub compressed 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."
1632 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1633 example: "hez:f1J78_6uqTyjX6jrVCqN4RFeRBnWQAGl477ZFtOnH6Sm"
1634 nullable: true
1635 amount:
1636 allOf:
1637 - $ref: '#/components/schemas/BigInt'
1638 - description: Amount of tokens to be sent.
1639 - example: "4903020000000000000"
1640 batchNum:
1641 type: integer
1642 description: Batch in which the transaction was forged. Null indicates not forged yet.
1643 minimum: 0
1644 maximum: 4294967295
1645 example: 5432
1646 nullable: true
1647 historicUSD:
1648 type: number
1649 description: Value in USD at the moment the transaction was forged.
1650 example: 49.7
1651 nullable: true
1652 timestamp:
1653 type: string
1654 format: date-time
1655 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.
1656 token:
1657 $ref: '#/components/schemas/Token'
1658 L1Info:
1659 type: object
1660 description: Additional information that only applies to L1 transactions.
1661 nullable: true
1662 properties:
1663 toForgeL1TransactionsNum:
1664 $ref: '#/components/schemas/ToForgeL1TransactionsNum'
1665 userOrigin:
1666 type: boolean
1667 description: True if the transaction was sent by a user. False if it was sent by a coordinator.
1668 depositAmount:
1669 allOf:
1670 - $ref: '#/components/schemas/BigInt'
1671 - description: Tokens transfered from L1 to L2.
1672 - example: "4900000000000000000"
1673 amountSuccess:
1674 type: boolean
1675 description: >-
1676 Indicates if the amount specified by the user has been sent propperly. If false, the amount that actualy has been sent is 0.
1677 If the transaction hasn't been forged yet (`batchNum == null`), this value will be false, as it's unknown if it has succeed or not.
1678 An example were this value could be false: a user send a `DepositTransfer` transaction, but when the tx is forged there are not
1679 enougth founds in the account. In this case the transfer part of the transaction won't be effective making the amount have a real value of 0.
1680 example: true
1681 depositAmountSuccess:
1682 type: boolean
1683 description: >-
1684 Indicates if the deposit amount specified by the user has been sent propperly. If false, the deposit amount that actualy has been sent is 0.
1685 If the transaction hasn't been forged yet (`batchNum == null`), this value will be false, as it's unknown if it has succeed or not.
1686 An example were this value could be false: a user send a `Deposit` transaction, but when the tx is forged the token id is not registered on the network.
1687 In this case transaction won't be effective making the deposit amount have a real value of 0.
1688 example: true
1689 historicDepositAmountUSD:
1690 type: number
1691 description: Deposit amount in USD, at the moment the transaction was made.
1692 example: 3.897
1693 nullable: true
1694 ethereumBlockNum:
1695 allOf:
1696 - $ref: '#/components/schemas/EthBlockNum'
1697 - description: Ethereum block in which the transaction was added to the smart contract forge queue.
1698 - example: 258723049
1699 required:
1700 - toForgeL1TransactionsNum
1701 - userOrigin
1702 - depositAmount
1703 - amountSuccess
1704 - depositAmountSuccess
1705 - historicDepositAmountUSD
1706 - ethereumBlockNum
1707 additionalProperties: false
1708 L2Info:
1709 type: object
1710 description: Additional information that only applies to L2 transactions.
1711 nullable: true
1712 properties:
1713 fee:
1714 $ref: '#/components/schemas/FeeSelector'
1715 historicFeeUSD:
1716 type: number
1717 description: Fee in USD, at the moment the transaction was forged.
1718 example: 263.89
1719 nullable: true
1720 nonce:
1721 $ref: '#/components/schemas/Nonce'
1722 example: null
1723 required:
1724 - fee
1725 - historicFeeUSD
1726 - nonce
1727 additionalProperties: false
1728 example:
1729 L1Info:
1730 ethereumBlockNum: 1
1731 historicDepositAmountUSD: 232.47
1732 depositAmount: '261'
1733 toForgeL1TransactionsNum: 10
1734 userOrigin: true
1735 L1orL2: L1
1736 L2Info:
1737 amount: '261'
1738 batchNum: 1
1739 fromAccountIndex: hez:ETH:276
1740 fromBJJ: hez:p_OohTzjzZnD3Sw93HQlK13DSxfD6lyvbfhh2kBsV6Z4
1741 fromHezEthereumAddress: hez:0x0000000000000000000000000000000000000114
1742 historicUSD: 3784.19
1743 id: '0x00000000000000000a000400'
1744 itemId: 2
1745 position: 4
1746 timestamp: '2020-11-17T14:08:12.197554Z'
1747 toAccountIndex: hez:ETH:276
1748 toBJJ: hez:p_OohTzjzZnD3Sw93HQlK13DSxfD6lyvbfhh2kBsV6Z4
1749 toHezEthereumAddress: hez:0x0000000000000000000000000000000000000114
1750 token:
1751 USD: 234.56
1752 decimals: 18
1753 ethereumAddress: '0x0000000000000000000000000000000000000000'
1754 ethereumBlockNum: 0
1755 fiatUpdate:
1756 id: 0
1757 itemId: 1
1758 name: Ether
1759 symbol: ETH
1760 type: CreateAccountDeposit
1761 required:
1762 - L1orL2
1763 - id
1764 - itemId
1765 - type
1766 - position
1767 - fromAccountIndex
1768 - fromHezEthereumAddress
1769 - fromBJJ
1770 - toAccountIndex
1771 - toHezEthereumAddress
1772 - toBJJ
1773 - amount
1774 - batchNum
1775 - historicUSD
1776 - timestamp
1777 - token
1778 - L1Info
1779 - L2Info
1780 additionalProperties: false
1781 HistoryTransactions:
1782 type: object
1783 properties:
1784 transactions:
1785 type: array
1786 description: List of history transactions.
1787 items:
1788 $ref: '#/components/schemas/HistoryTransaction'
1789 pendingItems:
1790 $ref: '#/components/schemas/PendingItems'
1791 example:
1792 transactions:
1793 - L1Info:
1794 ethereumBlockNum: 3
1795 historicDepositAmountUSD:
1796 depositAmount: '0'
1797 toForgeL1TransactionsNum: 7
1798 userOrigin: true
1799 L1orL2: L1
1800 L2Info:
1801 amount: '88888800000000000'
1802 batchNum: 9
1803 fromAccountIndex: hez:ETH:262
1804 fromBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1805 fromHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1806 historicUSD: 44.4444
1807 id: '0x000000000000000007000300'
1808 itemId: 28
1809 position: 3
1810 timestamp: '2020-11-26T09:18:40.004749Z'
1811 toAccountIndex: hez:EXIT:1
1812 toBJJ:
1813 toHezEthereumAddress:
1814 token:
1815 USD: 500
1816 decimals: 18
1817 ethereumAddress: '0x0000000000000000000000000000000000000000'
1818 ethereumBlockNum: 0
1819 fiatUpdate: '2020-11-26T09:18:27.034866Z'
1820 id: 0
1821 itemId: 1
1822 name: Ether
1823 symbol: ETH
1824 type: ForceExit
1825 - L1Info:
1826 L1orL2: L2
1827 L2Info:
1828 fee: 123
1829 historicFeeUSD: 2.15037380962404
1830 nonce: 1
1831 amount: '55555500000000000'
1832 batchNum: 8
1833 fromAccountIndex: hez:TKN1:264
1834 fromBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1835 fromHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1836 historicUSD: 23.4999765
1837 id: '0x020000000001080000000001'
1838 itemId: 19
1839 position: 2
1840 timestamp: '2020-11-26T09:18:40.004749Z'
1841 toAccountIndex: hez:TKN1:260
1842 toBJJ: hez:81h61cx0FKR1RXcLbHW8cZMPY8SR6yKU3ei4pmcLjpaQ
1843 toHezEthereumAddress: hez:0x6813Eb9362372EEF6200f3b1dbC3f819671cBA69
1844 token:
1845 USD: 423
1846 decimals: 18
1847 ethereumAddress: '0x0000000000000000000000000000000000000064'
1848 ethereumBlockNum: 2
1849 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1850 id: 1
1851 itemId: 2
1852 name: Test Token 1
1853 symbol: TKN1
1854 type: Transfer
1855 - L1Info:
1856 L1orL2: L2
1857 L2Info:
1858 fee: 44
1859 historicFeeUSD: 0.1973587359744
1860 nonce: 2
1861 amount: '66666600000000000'
1862 batchNum: 8
1863 fromAccountIndex: hez:ETH:259
1864 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1865 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1866 historicUSD: 33.3333
1867 id: '0x020000000001030000000002'
1868 itemId: 20
1869 position: 3
1870 timestamp: '2020-11-26T09:18:40.004749Z'
1871 toAccountIndex: hez:EXIT:1
1872 toBJJ:
1873 toHezEthereumAddress:
1874 token:
1875 USD: 500
1876 decimals: 18
1877 ethereumAddress: '0x0000000000000000000000000000000000000000'
1878 ethereumBlockNum: 0
1879 fiatUpdate: '2020-11-26T09:18:27.034866Z'
1880 id: 0
1881 itemId: 1
1882 name: Ether
1883 symbol: ETH
1884 type: Exit
1885 - L1Info:
1886 ethereumBlockNum: 3
1887 historicDepositAmountUSD: 14099.9999859
1888 depositAmount: '33333333300000000000'
1889 toForgeL1TransactionsNum: 2
1890 userOrigin: true
1891 L1orL2: L1
1892 L2Info:
1893 amount: '0'
1894 batchNum: 4
1895 fromAccountIndex: hez:TKN1:0
1896 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1897 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1898 historicUSD:
1899 id: '0x000000000000000002000000'
1900 itemId: 9
1901 position: 0
1902 timestamp: '2020-11-26T09:18:40.004749Z'
1903 toAccountIndex: hez:TKN1:0
1904 toBJJ:
1905 toHezEthereumAddress:
1906 token:
1907 USD: 423
1908 decimals: 18
1909 ethereumAddress: '0x0000000000000000000000000000000000000064'
1910 ethereumBlockNum: 2
1911 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1912 id: 1
1913 itemId: 2
1914 name: Test Token 1
1915 symbol: TKN1
1916 type: CreateAccountDeposit
1917 - L1Info:
1918 L1orL2: L2
1919 L2Info:
1920 fee: 2
1921 historicFeeUSD: 3.87833366166246e-17
1922 nonce: 1
1923 amount: '11111100000000000'
1924 batchNum: 7
1925 fromAccountIndex: hez:TKN1:261
1926 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1927 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1928 historicUSD: 4.6999953
1929 id: '0x020000000001050000000001'
1930 itemId: 15
1931 position: 2
1932 timestamp: '2020-11-26T09:18:40.004749Z'
1933 toAccountIndex: hez:TKN1:264
1934 toBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1935 toHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1936 token:
1937 USD: 423
1938 decimals: 18
1939 ethereumAddress: '0x0000000000000000000000000000000000000064'
1940 ethereumBlockNum: 2
1941 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1942 id: 1
1943 itemId: 2
1944 name: Test Token 1
1945 symbol: TKN1
1946 type: Transfer
1947 pendingItems: 23
1948 required:
1949 - transactions
1950 - pendingItems
1951 additionalProperties: false
1952 EthBlockNum:
1953 type: integer
1954 description: Ethereum block number
1955 minimum: 0
1956 maximum: 1.84467440737096e+19
1957 example: 762375478
1958 ToForgeL1TransactionsNum:
1959 type: integer
1960 description: Reference to know in which batch a L1 transaction was forged / will be forged.
1961 minimum: 0
1962 maximum: 4294967295
1963 example: 784
1964 nullable: true
1965 TransactionPosition:
1966 type: integer
1967 description: Position that a transaction occupies in a batch.
1968 minimum: 0
1969 example: 5
1970 URL:
1971 type: string
1972 description: HTTP URL
1973 example: "https://apimock.hermez.network"
1974 TokenSymbol:
1975 type: string
1976 description: Abreviation of the token name.
1977 example: "DAI"
1978 TokenName:
1979 type: string
1980 description: Token name.
1981 example: "Dai"
1982 CollectedFees:
1983 type: object
1984 description: Collected fees by the forger of the batch, represented by a map of tokenId => amount. A maximum of 64 different tokens can be used.
1985 additionalProperties:
1986 type: string
1987 example:
1988 1234: "425632785672345647"
1989 4321: "86538967235465432654352"
1990 Batch:
1991 type: object
1992 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
1993 properties:
1994 itemId:
1995 $ref: '#/components/schemas/ItemId'
1996 batchNum:
1997 $ref: '#/components/schemas/BatchNum'
1998 ethereumBlockNum:
1999 $ref: '#/components/schemas/EthBlockNum'
2000 ethereumBlockHash:
2001 type: string
2002 description: hash of the Ethereum block in which the batch was forged
2003 example: "0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553"
2004 timestamp:
2005 type: string
2006 format: date-time
2007 description: Time in which the batch was forged.
2008 forgerAddr:
2009 $ref: '#/components/schemas/EthereumAddress'
2010 collectedFees:
2011 $ref: '#/components/schemas/CollectedFees'
2012 historicTotalCollectedFeesUSD:
2013 type: number
2014 description: Sum of the all the fees collected, in USD, at the moment the batch was forged.
2015 example: 23.3
2016 stateRoot:
2017 allOf:
2018 - $ref: '#/components/schemas/Hash'
2019 - description: Root of the accounts Merkle Tree.
2020 - example: "2734657026572a8708d883"
2021 numAccounts:
2022 type: integer
2023 description: Number of registered accounts in this batch.
2024 exitRoot:
2025 allOf:
2026 - $ref: '#/components/schemas/Hash'
2027 - description: Root of the exit Merkle Tree associated to this batch.
2028 - example: "2734657026572a8708d883"
2029 forgeL1TransactionsNum:
2030 type: integer
2031 description: Identifier that corresponds to the group of L1 transactions forged in the current batch.
2032 example: 5
2033 nullable: true
2034 slotNum:
2035 $ref: '#/components/schemas/SlotNum'
2036 forgedTransactions:
2037 type: integer
2038 description: Amount of forged transactions in this batch.
2039 example: 318
2040 additionalProperties: false
2041 required:
2042 - itemId
2043 - batchNum
2044 - ethereumBlockNum
2045 - ethereumBlockHash
2046 - timestamp
2047 - forgerAddr
2048 - collectedFees
2049 - historicTotalCollectedFeesUSD
2050 - stateRoot
2051 - numAccounts
2052 - exitRoot
2053 - forgeL1TransactionsNum
2054 - slotNum
2055 - forgedTransactions
2056 FullBatch:
2057 type: object
2058 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
2059 properties:
2060 batch:
2061 $ref: '#/components/schemas/Batch'
2062 transactions:
2063 type: array
2064 description: List of forged transactions in the batch
2065 items:
2066 $ref: '#/components/schemas/HistoryTransaction'
2067 nullable: true
2068 additionalProperties: false
2069 required:
2070 - batch
2071 - transactions
2072 Hash:
2073 type: string
2074 description: hashed data
2075 example: "2734657026572a8708d883"
2076 SlotNum:
2077 type: integer
2078 description: Identifier of a slot.
2079 minimum: 0
2080 maximum: 4294967295
2081 example: 784
2082 Batches:
2083 type: object
2084 properties:
2085 batches:
2086 type: array
2087 description: List of batches.
2088 items:
2089 $ref: '#/components/schemas/Batch'
2090 pendingItems:
2091 $ref: '#/components/schemas/PendingItems'
2092 additionalProperties: false
2093 required:
2094 - batches
2095 - pendingItems
2096 Coordinator:
2097 type: object
2098 properties:
2099 itemId:
2100 $ref: '#/components/schemas/ItemId'
2101 forgerAddr:
2102 $ref: '#/components/schemas/EthereumAddress'
2103 bidderAddr:
2104 $ref: '#/components/schemas/EthereumAddress'
2105 URL:
2106 $ref: '#/components/schemas/URL'
2107 ethereumBlock:
2108 allOf:
2109 - $ref: '#/components/schemas/EthBlockNum'
2110 - description: Ethereum block in which the coordinator registered into the network.
2111 - example: 5735943738
2112 additionalProperties: false
2113 required:
2114 - itemId
2115 - forgerAddr
2116 - bidderAddr
2117 - URL
2118 - ethereumBlock
2119 Coordinators:
2120 type: object
2121 properties:
2122 coordinators:
2123 type: array
2124 description: List of coordinators.
2125 items:
2126 $ref: '#/components/schemas/Coordinator'
2127 pendingItems:
2128 $ref: '#/components/schemas/PendingItems'
2129 additionalProperties: false
2130 required:
2131 - coordinators
2132 - pendingItems
2133 Bid:
2134 type: object
2135 description: Tokens placed in an auction by a coordinator to gain the right to forge batches during a specific slot.
2136 properties:
2137 itemId:
2138 $ref: '#/components/schemas/ItemId'
2139 bidderAddr:
2140 $ref: '#/components/schemas/EthereumAddress'
2141 forgerAddr:
2142 $ref: '#/components/schemas/EthereumAddress'
2143 slotNum:
2144 $ref: '#/components/schemas/SlotNum'
2145 URL:
2146 $ref: '#/components/schemas/URL'
2147 bidValue:
2148 $ref: '#/components/schemas/BigInt'
2149 ethereumBlockNum:
2150 $ref: '#/components/schemas/EthBlockNum'
2151 timestamp:
2152 type: string
2153 format: date-time
2154 additionalProperties: false
2155 required:
2156 - bidderAddr
2157 - forgerAddr
2158 - slotNum
2159 - URL
2160 - bidValue
2161 - ethereumBlockNum
2162 - timestamp
2163 Bids:
2164 type: object
2165 properties:
2166 bids:
2167 type: array
2168 description: List of bids.
2169 items:
2170 $ref: '#/components/schemas/Bid'
2171 pendingItems:
2172 $ref: '#/components/schemas/PendingItems'
2173 additionalProperties: false
2174 required:
2175 - bids
2176 - pendingItems
2177 RecommendedFee:
2178 type: object
2179 description: Fee that the coordinator recommends per transaction in USD.
2180 properties:
2181 existingAccount:
2182 type: number
2183 description: Recommended fee if the destination account of the transaction already exists.
2184 minimum: 0
2185 example: 0.1
2186 createAccount:
2187 type: number
2188 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.
2189 minimum: 0
2190 example: 1.3
2191 createAccountInternal:
2192 type: number
2193 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 with an Ethereum address and therefore can only operate in L2.
2194 minimum: 0
2195 example: 0.5
2196 Token:
2197 type: object
2198 description: Hermez Network compatible and registered token.
2199 properties:
2200 id:
2201 $ref: '#/components/schemas/TokenId'
2202 ethereumAddress:
2203 allOf:
2204 - $ref: '#/components/schemas/EthereumAddress'
2205 - description: Ethereum address in which the token is deployed.
2206 - example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
2207 itemId:
2208 $ref: '#/components/schemas/ItemId'
2209 name:
2210 type: string
2211 description: full name of the token
2212 example: Maker Dai
2213 symbol:
2214 allOf:
2215 - $ref: '#/components/schemas/TokenSymbol'
2216 - example: DAI
2217 decimals:
2218 type: integer
2219 description: Number of decimals of the token.
2220 example: 18
2221 ethereumBlockNum:
2222 allOf:
2223 - $ref: '#/components/schemas/EthBlockNum'
2224 - description: Ethereum block number in which the token was added to the Hermez Network.
2225 - example: 539847538
2226 USD:
2227 type: number
2228 description: Value of the token in USD.
2229 example: 1.01
2230 nullable: true
2231 fiatUpdate:
2232 type: string
2233 format: date-time
2234 description: Timestamp of the moment the `USD` value was updated.
2235 nullable: true
2236 required:
2237 - id
2238 - ethereumAddress
2239 - itemId
2240 - name
2241 - symbol
2242 - decimals
2243 - ethereumBlockNum
2244 - USD
2245 - fiatUpdate
2246 additionalProperties: false
2247 Tokens:
2248 type: object
2249 properties:
2250 tokens:
2251 type: array
2252 description: List of tokens.
2253 items:
2254 $ref: '#/components/schemas/Token'
2255 pendingItems:
2256 $ref: '#/components/schemas/PendingItems'
2257 Exit:
2258 type: object
2259 description: Exit tree leaf. It Contains the necessary information to perform a withdrawal.
2260 properties:
2261 batchNum:
2262 allOf:
2263 - $ref: '#/components/schemas/BatchNum'
2264 - description: Batch in which the exit was forged.
2265 - example: 7394
2266 accountIndex:
2267 $ref: '#/components/schemas/AccountIndex'
2268 bjj:
2269 $ref: '#/components/schemas/BJJ'
2270 hezEthereumAddress:
2271 $ref: '#/components/schemas/HezEthereumAddress'
2272 itemId:
2273 $ref: '#/components/schemas/ItemId'
2274 merkleProof:
2275 type: object
2276 description: Existence proof of a leaf in a given Merkle Root. Encoded as hexadecimal string.
2277 properties:
2278 root:
2279 $ref: '#/components/schemas/BigInt'
2280 siblings:
2281 type: array
2282 items:
2283 $ref: '#/components/schemas/BigInt'
2284 oldKey:
2285 $ref: '#/components/schemas/BigInt'
2286 oldValue:
2287 $ref: '#/components/schemas/BigInt'
2288 isOld0:
2289 type: boolean
2290 key:
2291 $ref: '#/components/schemas/BigInt'
2292 value:
2293 $ref: '#/components/schemas/BigInt'
2294 fnc:
2295 type: integer
2296 maximum: 3
2297 minimum: 0
2298 required:
2299 - root
2300 - siblings
2301 - oldKey
2302 - oldValue
2303 - isOld0
2304 - key
2305 - value
2306 - fnc
2307 additionalProperties: false
2308 balance:
2309 $ref: '#/components/schemas/BigInt'
2310 instantWithdraw:
2311 type: integer
2312 description: Block in which the exit balance was instantly withdrawn. Null indicates that an instant withdrawn hasn't been performed.
2313 minimum: 0
2314 maximum: 1.84467440737096e+19
2315 example: 74747363
2316 nullable: true
2317 delayedWithdrawRequest:
2318 type: integer
2319 description: Block in which the exit balance was requested to delay withdraw. Null indicates that a delay withdraw hasn't been performed.
2320 minimum: 0
2321 maximum: 1.84467440737096e+19
2322 example: null
2323 nullable: true
2324 delayedWithdraw:
2325 type: integer
2326 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.
2327 minimum: 0
2328 maximum: 1.84467440737096e+19
2329 example: null
2330 nullable: true
2331 token:
2332 $ref: '#/components/schemas/Token'
2333 required:
2334 - batchNum
2335 - accountIndex
2336 - bjj
2337 - hezEthereumAddress
2338 - itemId
2339 - merkleProof
2340 - balance
2341 - instantWithdraw
2342 - delayedWithdrawRequest
2343 - delayedWithdraw
2344 - token
2345 additionalProperties: false
2346 Exits:
2347 type: object
2348 properties:
2349 exits:
2350 type: array
2351 description: List of exits.
2352 items:
2353 $ref: '#/components/schemas/Exit'
2354 pendingItems:
2355 $ref: '#/components/schemas/PendingItems'
2356 required:
2357 - exits
2358 - pendingItems
2359 additionalProperties: false
2360 Account:
2361 type: object
2362 description: State tree leaf. It contains balance and nonce of an account.
2363 properties:
2364 itemId:
2365 $ref: '#/components/schemas/ItemId'
2366 accountIndex:
2367 $ref: '#/components/schemas/AccountIndex'
2368 nonce:
2369 $ref: '#/components/schemas/Nonce'
2370 balance:
2371 $ref: '#/components/schemas/BigInt'
2372 bjj:
2373 $ref: '#/components/schemas/BJJ'
2374 hezEthereumAddress:
2375 $ref: '#/components/schemas/HezEthereumAddress'
2376 token:
2377 $ref: '#/components/schemas/Token'
2378 example:
2379 accountIndex: hez:ETH:259
2380 balance: '2590000000000000000'
2381 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2382 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2383 itemId: 4
2384 nonce: 0
2385 token:
2386 USD: 500
2387 decimals: 18
2388 ethereumAddress: '0x0000000000000000000000000000000000000000'
2389 ethereumBlockNum: 0
2390 fiatUpdate: '2020-11-26T09:53:47.444444Z'
2391 id: 0
2392 itemId: 1
2393 name: Ether
2394 symbol: ETH
2395 additionalProperties: false
2396 required:
2397 - itemId
2398 - accountIndex
2399 - nonce
2400 - balance
2401 - bjj
2402 - hezEthereumAddress
2403 - token
2404 Accounts:
2405 type: object
2406 properties:
2407 accounts:
2408 type: array
2409 description: List of accounts.
2410 items:
2411 $ref: '#/components/schemas/Account'
2412 pendingItems:
2413 $ref: '#/components/schemas/PendingItems'
2414 example:
2415 accounts:
2416 - accountIndex: hez:ETH:259
2417 balance: '2590000000000000000'
2418 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2419 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2420 itemId: 4
2421 nonce: 0
2422 token:
2423 USD: 500
2424 decimals: 18
2425 ethereumAddress: '0x0000000000000000000000000000000000000000'
2426 ethereumBlockNum: 0
2427 fiatUpdate: '2020-11-26T09:53:47.444444Z'
2428 id: 0
2429 itemId: 1
2430 name: Ether
2431 symbol: ETH
2432 - accountIndex: hez:TKN1:261
2433 balance: '2610000000'
2434 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2435 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2436 itemId: 6
2437 nonce: 0
2438 token:
2439 USD: 423
2440 decimals: 18
2441 ethereumAddress: '0x0000000000000000000000000000000000000064'
2442 ethereumBlockNum: 2
2443 fiatUpdate: '2020-11-26T09:53:47.456619Z'
2444 id: 1
2445 itemId: 2
2446 name: Test Token 1
2447 symbol: TKN1
2448 pendingItems: 0
2449 additionalProperties: false
2450 required:
2451 - accounts
2452 - pendingItems
2453 Slot:
2454 type: object
2455 description: Slot information.
2456 properties:
2457 itemId:
2458 $ref: '#/components/schemas/ItemId'
2459 slotNum:
2460 $ref: '#/components/schemas/SlotNum'
2461 firstBlock:
2462 allOf:
2463 - $ref: '#/components/schemas/EthBlockNum'
2464 - description: Block in which the slot began or will begin
2465 - example: 76238647846
2466 lastBlock:
2467 allOf:
2468 - $ref: '#/components/schemas/EthBlockNum'
2469 - description: Block in which the slot ended or will end
2470 - example: 4475934
2471 openAuction:
2472 type: boolean
2473 description: Whether the auction of the slot is open or not.
2474 bestBid:
2475 type: object
2476 description: The best bid of the auction. If the bestBid is null, it is because no coordinator has bid for that slot.
2477 nullable: true
2478 properties:
2479 itemId:
2480 $ref: '#/components/schemas/ItemId'
2481 bidderAddr:
2482 $ref: '#/components/schemas/EthereumAddress'
2483 forgerAddr:
2484 $ref: '#/components/schemas/EthereumAddress'
2485 slotNum:
2486 $ref: '#/components/schemas/SlotNum'
2487 URL:
2488 $ref: '#/components/schemas/URL'
2489 bidValue:
2490 type: string
2491 description: BigInt is an integer encoded as a string for numbers that are very large.
2492 example: "8708856933496328593"
2493 pattern: "^\\d+$"
2494 ethereumBlockNum:
2495 $ref: '#/components/schemas/EthBlockNum'
2496 timestamp:
2497 type: string
2498 format: date-time
2499 additionalProperties: false
2500 required:
2501 - bidderAddr
2502 - forgerAddr
2503 - slotNum
2504 - URL
2505 - bidValue
2506 - ethereumBlockNum
2507 - timestamp
2508 additionalProperties: false
2509 required:
2510 - slotNum
2511 - firstBlock
2512 - lastBlock
2513 - openAuction
2514 - bestBid
2515 Slots:
2516 type: object
2517 properties:
2518 slots:
2519 type: array
2520 description: List of slots.
2521 items:
2522 allOf:
2523 - $ref: '#/components/schemas/Slot'
2524 - description: Last synchronized Etherum block.
2525 pendingItems:
2526 $ref: '#/components/schemas/PendingItems'
2527 additionalProperties: false
2528 required:
2529 - slots
2530 - pendingItems
2531 NextForger:
2532 type: object
2533 description: Coordinator information along with the scheduled forging period
2534 properties:
2535 coordinator:
2536 $ref: '#/components/schemas/Coordinator'
2537 period:
2538 type: object
2539 description: Time period in which the coordinator will have the ability to forge. Specified both in Ethereum blocks and timestamp
2540 properties:
2541 slotNum:
2542 $ref: '#/components/schemas/SlotNum'
2543 fromBlock:
2544 $ref: '#/components/schemas/EthBlockNum'
2545 toBlock:
2546 $ref: '#/components/schemas/EthBlockNum'
2547 fromTimestamp:
2548 type: string
2549 format: date-time
2550 toTimestamp:
2551 type: string
2552 format: date-time
2553 required:
2554 - slotNum
2555 - fromBlock
2556 - toBlock
2557 - fromTimestamp
2558 - toTimestamp
2559 additionalProperties: false
2560 required:
2561 - coordinator
2562 - period
2563 additionalProperties: false
2564 NextForgers:
2565 type: array
2566 description: List of next coordinators to forge.
2567 items:
2568 $ref: '#/components/schemas/NextForger'
2569 State:
2570 type: object
2571 description: Gobal variables of the network
2572 properties:
2573 network:
2574 $ref: '#/components/schemas/StateNetwork'
2575 metrics:
2576 $ref: '#/components/schemas/StateMetrics'
2577 rollup:
2578 $ref: '#/components/schemas/StateRollup'
2579 auction:
2580 $ref: '#/components/schemas/StateAuction'
2581 withdrawalDelayer:
2582 $ref: '#/components/schemas/StateWithdrawDelayer'
2583 recommendedFee:
2584 $ref: '#/components/schemas/RecommendedFee'
2585 additionalProperties: false
2586 required:
2587 - network
2588 - metrics
2589 - rollup
2590 - auction
2591 - withdrawalDelayer
2592 - recommendedFee
2593 StateNetwork:
2594 type: object
2595 description: Gobal statistics of the network
2596 properties:
2597 lastEthereumBlock:
2598 allOf:
2599 - $ref: '#/components/schemas/EthBlockNum'
2600 - description: Current Etherum block. Note that this is the actual last block of Ethereum, not the last synchronized block by the node.
2601 - example: 3457437
2602 lastSynchedBlock:
2603 allOf:
2604 - $ref: '#/components/schemas/EthBlockNum'
2605 - description: Last synchronized Etherum block. Compare with lastEthereumBlock to check the synchronization status of the node.
2606 - example: 3457437
2607 lastBatch:
2608 $ref: '#/components/schemas/Batch'
2609 currentSlot:
2610 allOf:
2611 - $ref: '#/components/schemas/SlotNum'
2612 - description: Slot where batches are currently being forged.
2613 - example: 2334
2614 nextForgers:
2615 $ref: '#/components/schemas/NextForgers'
2616 additionalProperties: false
2617 required:
2618 - lastEthereumBlock
2619 - lastSynchedBlock
2620 - lastBatch
2621 - currentSlot
2622 - nextForgers
2623 StateAuction:
2624 type: object
2625 description: Auction parameters.
2626 properties:
2627 ethereumBlockNum:
2628 $ref: '#/components/schemas/EthBlockNum'
2629 bootCoordinator:
2630 allOf:
2631 - $ref: '#/components/schemas/EthereumAddress'
2632 - description: Ethereum address of the boot coordinator.
2633 - example: "0x997dc4262BCDbf85190C01c996b4C06a461d2430"
2634 bootCoordinatorUrl:
2635 type: string
2636 description: Boot Coordinator URL
2637 example: "https://boot.coordinator.io"
2638 slotDeadline:
2639 type: integer
2640 description: Number of blocks after the beginning of a slot after which any coordinator can forge if the winner has not forged any batch in that slot.
2641 example: 3
2642 closedAuctionSlots:
2643 type: integer
2644 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.
2645 example: 2
2646 openAuctionSlots:
2647 type: integer
2648 description: Amount of days in advance are auctions opened.
2649 defaultSlotSetBid:
2650 type: array
2651 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]`."
2652 items:
2653 type: integer
2654 example: [32,0,68,21,55,99]
2655 defaultSlotSetBidSlotNum:
2656 type: integer
2657 description: Slot in which the changes will be applied for the first time.
2658 outbidding:
2659 type: number
2660 description: Minimum outbid over the previous one to consider it valid.
2661 example: 3.64
2662 donationAddress:
2663 allOf:
2664 - $ref: '#/components/schemas/EthereumAddress'
2665 - description: Ethereum address where the donations will go to.
2666 - example: "0x887dc4262BCDbf85190C01c996b4C06a461d2430"
2667 allocationRatio:
2668 type: array
2669 description: Percentage in which fees will be split between donations, governance, and burning. The sum of the tree values should be 100.
2670 items:
2671 type: integer
2672 example: [80,10,10]
2673 additionalProperties: false
2674 required:
2675 - ethereumBlockNum
2676 - bootCoordinator
2677 - bootCoordinatorUrl
2678 - slotDeadline
2679 - closedAuctionSlots
2680 - openAuctionSlots
2681 - defaultSlotSetBid
2682 - outbidding
2683 - donationAddress
2684 - allocationRatio
2685 StateRollup:
2686 type: object
2687 description: Rollup parameters
2688 properties:
2689 ethereumBlockNum:
2690 $ref: '#/components/schemas/EthBlockNum'
2691 forgeL1L2BatchTimeout:
2692 type: integer
2693 description: Max Ethereum blocks after the last L1-L2-batch, when exceeds the timeout only L1-L2-batch are allowed.
2694 example: 5
2695 feeAddToken:
2696 type: string
2697 description: Fee to pay when registering tokens into the network.
2698 example: 5698
2699 withdrawalDelay:
2700 type: integer
2701 description: Withdraw delay in seconds
2702 example: 432000
2703 buckets:
2704 type: array
2705 description: List of buckets state
2706 items:
2707 type: object
2708 properties:
2709 ceilUSD:
2710 type: string
2711 description: Max USD value
2712 example: 1000
2713 withdrawals:
2714 type: string
2715 description: Available withdrawals of the bucket
2716 example: 4
2717 blockWithdrawalRate:
2718 type: string
2719 description: Every `blockWithdrawalRate` blocks add 1 withdrawal
2720 example: 8
2721 maxWithdrawals:
2722 type: string
2723 description: Max withdrawals the bucket can hold
2724 example: 4
2725 additionalProperties: false
2726 required:
2727 - ceilUSD
2728 - withdrawals
2729 - blockWithdrawalRate
2730 - maxWithdrawals
2731 additionalProperties: false
2732 required:
2733 - ethereumBlockNum
2734 - forgeL1L2BatchTimeout
2735 - feeAddToken
2736 - withdrawalDelay
2737 - buckets
2738 StateWithdrawDelayer:
2739 type: object
2740 description: Withdrawal delayer parameters
2741 properties:
2742 ethereumBlockNum:
2743 $ref: '#/components/schemas/EthBlockNum'
2744 hermezGovernanceAddress:
2745 allOf:
2746 - $ref: '#/components/schemas/EthereumAddress'
2747 - description: Ethereum address of the governance.
2748 - example: "0x667dc4262BCDbf85190C01c996b4C06a461d2430"
2749 emergencyCouncilAddress:
2750 allOf:
2751 - $ref: '#/components/schemas/EthereumAddress'
2752 - description: Ethereum address that can claim the funds in an emergency when the maximum emergency mode time is exceeded.
2753 - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430"
2754 withdrawalDelay:
2755 allOf:
2756 - $ref: '#/components/schemas/EthBlockNum'
2757 - description: The time that everyone needs to wait until a withdrawal of the funds is allowed, in seconds.
2758 - example: 539573849
2759 emergencyModeStartingBlock:
2760 type: integer
2761 description: Block number in which the emergency mode has been activated.
2762 example: 10
2763 emergencyMode:
2764 type: boolean
2765 description: Indicates if emergency mode has been activated.
2766 example: false
2767 additionalProperties: false
2768 required:
2769 - ethereumBlockNum
2770 - hermezGovernanceAddress
2771 - emergencyCouncilAddress
2772 - withdrawalDelay
2773 - emergencyModeStartingBlock
2774 - emergencyMode
2775 StateMetrics:
2776 type: object
2777 description: Metrics of the network
2778 properties:
2779 transactionsPerBatch:
2780 type: number
2781 description: Average transactions per batch in the last 24 hours.
2782 example: 2002.7
2783 batchFrequency:
2784 type: number
2785 description: Average elapsed time between batches in the last 24 hours, in seconds.
2786 example: 8.9
2787 transactionsPerSecond:
2788 type: number
2789 description: Average transactions per second in the last 24 hours.
2790 example: 302.3
2791 totalAccounts:
2792 type: integer
2793 description: Number of created accounts.
2794 example: 90473
2795 totalBJJs:
2796 type: integer
2797 description: Number of different registered BJJs.
2798 example: 23067
2799 avgTransactionFee:
2800 type: number
2801 description: Average fee percentage paid for L2 transactions in the last 24 hours.
2802 example: 1.54
2803 additionalProperties: false
2804 required:
2805 - transactionsPerBatch
2806 - batchFrequency
2807 - transactionsPerSecond
2808 - totalAccounts
2809 - totalBJJs
2810 - avgTransactionFee
2811 PendingItems:
2812 type: integer
2813 description: Amount of items that will be returned in subsequent calls to the endpoint, as long as they are done with same filters. When the value is 0 it means that all items have been sent.
2814 example: 15
2815 Config:
2816 type: object
2817 description: Configuration parameters of the different smart contracts that power the Hermez Network.
2818 properties:
2819 hermez:
2820 type: object
2821 description: Constant configuration of the Hermez smart contract.
2822 properties:
2823 publicConstants:
2824 type: object
2825 description: Public Hermez smart contract constants
2826 properties:
2827 tokenHEZ:
2828 allOf:
2829 - $ref: '#/components/schemas/EthereumAddress'
2830 - description: Ethereum address of the HEZ token.
2831 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2832 absoluteMaxL1L2BatchTimeout:
2833 type: integer
2834 description: L1L2 Batch Timeout
2835 example: 240
2836 verifiers:
2837 type: array
2838 description: List of verifiers struct
2839 items:
2840 type: object
2841 properties:
2842 maxTx:
2843 type: integer
2844 description: Maximum rollup transactions in a batch
2845 example: 512
2846 nlevels:
2847 type: integer
2848 description: Number of levels of the circuit
2849 example: 32
2850 required:
2851 - maxTx
2852 - nlevels
2853 additionalProperties: false
2854 hermezAuctionContract:
2855 allOf:
2856 - $ref: '#/components/schemas/EthereumAddress'
2857 - description: Ethereum address of the auction smart contract.
2858 - example: "0x111dc4262BCDbf85190C01c996b4C06a461d2430"
2859 hermezGovernanceAddress:
2860 allOf:
2861 - $ref: '#/components/schemas/EthereumAddress'
2862 - description: Ethereum address of the governance.
2863 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
2864 withdrawDelayerContract:
2865 allOf:
2866 - $ref: '#/components/schemas/EthereumAddress'
2867 - description: Ethereum address of the withdraw delayer contracts.
2868 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2869 required:
2870 - tokenHEZ
2871 - absoluteMaxL1L2BatchTimeout
2872 - verifiers
2873 - hermezAuctionContract
2874 - hermezGovernanceAddress
2875 - withdrawDelayerContract
2876 additionalProperties: false
2877 maxFeeIdxCoordinator:
2878 type: integer
2879 description: is the maximum number of tokens the coordinator can use to collect fees.
2880 example: 64
2881 reservedIdx:
2882 type: integer
2883 description: First 256 indexes reserved, first user index will be the 256.
2884 example: 255
2885 exitIdx:
2886 type: integer
2887 description: Account index used to indicate that a transaction is an `exit` or `force exit`.
2888 example: 1
2889 limitDepositAmount:
2890 type: integer
2891 description: Maximum deposit amount (L1 to L2) allowed.
2892 example: 321
2893 limitL2TransferAmount:
2894 type: integer
2895 description: Maximum amount (L2 to L2) allowed.
2896 example: 837
2897 limitTokens:
2898 type: integer
2899 description: Maximum number of different tokens that can be registered in the network.
2900 example: 4294967295
2901 l1CoordinatorTotalBytes:
2902 type: integer
2903 description: Number of bytes that a L1 coordinator transaction has ([4 bytes] token + [32 bytes] babyjub + [65 bytes] compressedSignature).
2904 example: 101
2905 l1UserTotalBytes:
2906 type: integer
2907 description: Number of bytes that a L1 user transaction has ([20 bytes] fromEthAddr + [32 bytes] fromBjj-compressed + [6 bytes] fromIdx + [2 bytes] depositAmountFloat16 + [2 bytes] amountFloat16 + [4 bytes] tokenId + [6 bytes] toIdx).
2908 example: 72
2909 maxL1UserTx:
2910 type: integer
2911 description: Maximum L1-user transactions allowed to be queued in a batch.
2912 example: 128
2913 maxL1Tx:
2914 type: integer
2915 description: Maximum L1 transactions allowed to be queued in a batch.
2916 example: 256
2917 inputSHAConstantBytes:
2918 type: integer
2919 description: Input SHA constant bytes
2920 example: 18542
2921 numBuckets:
2922 type: integer
2923 description: Number of buckets
2924 example: 5
2925 maxWithdrawalDelay:
2926 type: integer
2927 description: Maximum delay to withdraw tokens. Time is measured in seconds.
2928 example: 2 * 7 * 24 * 60 * 60
2929 exchangeMultiplier:
2930 type: integer
2931 description: exchange multiplier
2932 example: 1e14
2933 required:
2934 - publicConstants
2935 - reservedIdx
2936 - exitIdx
2937 - limitDepositAmount
2938 - limitL2TransferAmount
2939 - limitTokens
2940 - l1CoordinatorTotalBytes
2941 - l1UserTotalBytes
2942 - maxL1UserTx
2943 - maxL1Tx
2944 - inputSHAConstantBytes
2945 - numBuckets
2946 - maxWithdrawalDelay
2947 - exchangeMultiplier
2948 additionalProperties: false
2949 auction:
2950 type: object
2951 description: Constant configuration of the auction smart contract.
2952 properties:
2953 blocksPerSlot:
2954 type: integer
2955 description: Blocks per slot.
2956 initialMinimalBidding:
2957 type: integer
2958 description: Minimum bid when no one has bid yet.
2959 genesisBlockNum:
2960 allOf:
2961 - $ref: '#/components/schemas/EthBlockNum'
2962 - description: Ethereum block number in which the smart contract starts operating.
2963 tokenHEZ:
2964 allOf:
2965 - $ref: '#/components/schemas/EthereumAddress'
2966 - description: Ethereum address of the HEZ token.
2967 - example: "0x333dc4262BCDbf85190C01c996b4C06a461d2430"
2968 hermezRollup:
2969 allOf:
2970 - $ref: '#/components/schemas/EthereumAddress'
2971 - description: Ethereum address of the rollup smart contract.
2972 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
2973 governanceAddress:
2974 allOf:
2975 - $ref: '#/components/schemas/EthereumAddress'
2976 - description: Ethereum address of the governance.
2977 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2978 required:
2979 - blocksPerSlot
2980 - initialMinimalBidding
2981 - genesisBlockNum
2982 - tokenHEZ
2983 - hermezRollup
2984 - governanceAddress
2985 additionalProperties: false
2986 withdrawalDelayer:
2987 type: object
2988 description: Constant configuration of the withdrawal delayer smart contract.
2989 properties:
2990 maxWithdrawalDelay:
2991 type: integer
2992 description: Maximum time delay in which the tokens can be locked in the contract. Time is measured in seconds.
2993 example: 200
2994 maxEmergencyModeTime:
2995 type: integer
2996 description: Maximum amount of time in which the contract can be in emergency mode. Time is measured in seconds.
2997 example: 2000
2998 hermezRollup:
2999 allOf:
3000 - $ref: '#/components/schemas/EthereumAddress'
3001 - description: Ethereum address of the rollup smart contract.
3002 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
3003 required:
3004 - maxWithdrawalDelay
3005 - maxEmergencyModeTime
3006 - hermezRollup
3007 additionalProperties: false
3008 required:
3009 - hermez
3010 - auction
3011 - withdrawalDelayer
3012 additionalProperties: false
3013 Error:
3014 type: object
3015 description: Error response.
3016 properties:
3017 message:
3018 type: string
3019 Error400:
3020 allOf:
3021 - $ref: '#/components/schemas/Error'
3022 - example:
3023 message: Invalid signature.
3024 Error404:
3025 allOf:
3026 - $ref: '#/components/schemas/Error'
3027 - example:
3028 message: Item(s) not found.
3029 Error500:
3030 allOf:
3031 - $ref: '#/components/schemas/Error'
3032 - example:
3033 message: Database error.