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 info:
1318 type: string
1319 description: "Info contains information about the status & State of the transaction. As for example, if the Tx has not been selected in the last batch due not enough Balance at the Sender account, this reason would appear at this parameter."
1320 pattern: ".*"
1321 example: "Tx not selected due not enough Balance at the sender."
1322 nullable: true
1323 signature:
1324 allOf:
1325 - $ref: '#/components/schemas/BJJSignature'
1326 - description: Signature of the transaction. More info [here](https://idocs.hermez.io/#/spec/zkrollup/README?id=l2a-idl2).
1327 - example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1328 timestamp:
1329 type: string
1330 description: Moment in which the transaction was added to the pool.
1331 format: date-time
1332 batchNum:
1333 type: integer
1334 description: Identifier of a batch. Every new forged batch increases by one the batchNum, starting at 0.
1335 minimum: 0
1336 maximum: 4294967295
1337 nullable: true
1338 example: null
1339 requestFromAccountIndex:
1340 type: string
1341 description: >-
1342 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1343 The identifier is built using: `hez:` + `token symbol:` + `index`
1344 nullable: true
1345 example: null
1346 requestToAccountIndex:
1347 type: string
1348 description: >-
1349 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1350 The identifier is built using: `hez:` + `token symbol:` + `index`
1351 nullable: true
1352 example: null
1353 requestToHezEthereumAddress:
1354 type: string
1355 description: "Address of an Etherum account linked to the Hermez Network."
1356 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1357 nullable: true
1358 example: null
1359 requestToBJJ:
1360 type: string
1361 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."
1362 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1363 nullable: true
1364 example: null
1365 requestTokenId:
1366 type: integer
1367 description: References the `tokenId` of the requested transaction.
1368 example: null
1369 nullable: true
1370 requestAmount:
1371 type: string
1372 description: BigInt is an integer encoded as a string for numbers that are very large.
1373 nullable: true
1374 example: null
1375 requestFee:
1376 type: integer
1377 description: Index of the fee type to select, more info [here](https://idocs.hermez.io/#/spec/zkrollup/fee-table?id=transaction-fee-table).
1378 minimum: 0
1379 maximum: 256
1380 nullable: true
1381 example: null
1382 requestNonce:
1383 type: integer
1384 description: Number that can only be used once per account. Increments by one with each transaction.
1385 minimum: 0
1386 maximum: 1.84467440737096e+19
1387 nullable: true
1388 example: null
1389 token:
1390 $ref: '#/components/schemas/Token'
1391 example:
1392 amount: '100000000000000'
1393 batchNum:
1394 fee: 0
1395 fromAccountIndex: hez:SCC:256
1396 fromBJJ: hez:r_trOasVEk0zNaalOoS9aLedu6mO7jI5XTIPu_zGXoyn
1397 fromHezEthereumAddress: hez:0x00000000000000000000000000000000004Ab84F
1398 id: '0x020000000001000000000006'
1399 nonce: 6
1400 requestAmount:
1401 requestFee: 0
1402 requestFromAccountIndex:
1403 requestNonce: 0
1404 requestToAccountIndex:
1405 requestToBJJ:
1406 requestToHezEthereumAddress:
1407 requestTokenId:
1408 signature: 5ee9c7b5baa243ba282d18596a55cc357b01513eaed75165365f802102cce4a7a1dd35e3ab31cf9039e2b8a9f570d935115be9379a3dd47813dfc014031ab201
1409 state: pend
1410 timestamp: '2020-11-17T13:58:54.422232Z'
1411 toAccountIndex: hez:SCC:257
1412 toBjj: hez:r_trOasVEk0zNaalOoS9aLedu6mO7jI5XTIPu_zGXoyn
1413 toHezEthereumAddress: hez:0x00000000000000000000000000000000004Ab84F
1414 token:
1415 USD: 23.74
1416 decimals: 7
1417 ethereumAddress: '0x0000000000000000000000000000000000000006'
1418 ethereumBlockNum: 2
1419 fiatUpdate:
1420 id: 6
1421 itemId: 7
1422 name: Some Cool Coin
1423 symbol: 'SCC'
1424 type: Transfer
1425 required:
1426 - id
1427 - type
1428 - fromAccountIndex
1429 - fromHezEthereumAddress
1430 - fromBJJ
1431 - toAccountIndex
1432 - toHezEthereumAddress
1433 - toBjj
1434 - amount
1435 - fee
1436 - nonce
1437 - state
1438 - info
1439 - signature
1440 - timestamp
1441 - batchNum
1442 - requestFromAccountIndex
1443 - requestToAccountIndex
1444 - requestToHezEthereumAddress
1445 - requestToBJJ
1446 - requestTokenId
1447 - requestAmount
1448 - requestFee
1449 - requestNonce
1450 - token
1451 TransactionId:
1452 type: string
1453 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)
1454 example: "0x00000000000001e240004700"
1455 EthereumAddress:
1456 type: string
1457 description: "Address of an Etherum account."
1458 pattern: "^0x[a-fA-F0-9]{40}$"
1459 example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1460 HezEthereumAddress:
1461 type: string
1462 description: "Address of an Etherum account linked to the Hermez Network."
1463 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1464 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1465 BJJ:
1466 type: string
1467 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."
1468 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1469 example: "hez:rR7LXKal-av7I56Y0dEBCVmwc9zpoLY5ERhy5w7G-xwe"
1470 AccountIndex:
1471 type: string
1472 description: >-
1473 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1474 The identifier is built using: `hez:` + `token symbol:` + `index`
1475 example: "hez:DAI:4444"
1476 TransactionType:
1477 type: string
1478 description: Type of transaction.
1479 enum:
1480 - Exit
1481 - Transfer
1482 - Deposit
1483 - CreateAccountDeposit
1484 - CreateAccountDepositTransfer
1485 - DepositTransfer
1486 - ForceTransfer
1487 - ForceExit
1488 - TransferToEthAddr
1489 - TransferToBJJ
1490 TransactionTypeL2:
1491 type: string
1492 description: Type of transaction.
1493 enum:
1494 - Exit
1495 - Transfer
1496 - TransferToEthAddr
1497 - TransferToBJJ
1498 TokenId:
1499 type: integer
1500 description: Identifier of a token registered in the network.
1501 minimum: 0
1502 maximum: 4294967295
1503 example: 98765
1504 BigInt:
1505 type: string
1506 description: BigInt is an integer encoded as a string for numbers that are very large.
1507 example: "8708856933496328593"
1508 pattern: "^\\d+$"
1509 FeeSelector:
1510 type: integer
1511 description: Index of the fee type to select, more info [here](https://idocs.hermez.io/#/spec/zkrollup/fee-table?id=transaction-fee-table).
1512 minimum: 0
1513 maximum: 256
1514 example: 36
1515 Nonce:
1516 type: integer
1517 description: Number that can only be used once per account, increments by one at each transaction.
1518 minimum: 0
1519 maximum: 1.84467440737096e+19
1520 example: 121
1521 PoolL2TransactionState:
1522 type: string
1523 description: >
1524 State of a L2 transaction from the coordinator pool.
1525 * pend: Pending
1526 * fing: Forging
1527 * fged: Forged
1528 * invl: Invalid
1529 enum:
1530 - pend
1531 - fing
1532 - fged
1533 - invl
1534 ETHSignature:
1535 type: string
1536 description: Ethereum signature.
1537 pattern: "^0x[a-fA-F0-9]{130}$"
1538 example: "0xf9161cd688394772d93aa3e7b3f8f9553ca4f94f65b7cece93ed4a239d5c0b4677dca6d1d459e3a5c271a34de735d4664a43e5a8960a9a6e027d12c562dd448e1c"
1539 BJJSignature:
1540 type: string
1541 description: BabyJubJub compressed signature.
1542 pattern: "^[a-fA-F0-9]{128}$"
1543 example: "72024a43f546b0e1d9d5d7c4c30c259102a9726363adcc4ec7b6aea686bcb5116f485c5542d27c4092ae0ceaf38e3bb44417639bd2070a58ba1aa1aab9d92c03"
1544 BatchNum:
1545 type: integer
1546 description: Identifier of a batch. Every new forged batch increments by one the batchNum, starting at 0.
1547 minimum: 0
1548 maximum: 4294967295
1549 example: 5432
1550 AccountCreationAuthorizationPost:
1551 type: object
1552 properties:
1553 hezEthereumAddress:
1554 $ref: '#/components/schemas/HezEthereumAddress'
1555 bjj:
1556 $ref: '#/components/schemas/BJJ'
1557 signature:
1558 $ref: '#/components/schemas/ETHSignature'
1559 example:
1560 hezEthereumAddress: hez:0xb5270eB4ae11c6fAAff6F5fa0A5202B8d963634C
1561 bjj: hez:hg2Ydsb8O66H-steBR3cnHl944ua7E-PkTJ_SbPBBg5r
1562 signature: '0xb7cf237c4a2ff3d4df57752e7b9deb236fa384f03a79d39acf17ec5f8d12a3cf00b017c2466611310cb2bacac68460e96778278646842c6d2bcb79979271c28501'
1563 required:
1564 - hezEthereumAddress
1565 - bjj
1566 - signature
1567 AccountCreationAuthorization:
1568 type: object
1569 properties:
1570 timestamp:
1571 type: string
1572 format: date-time
1573 hezEthereumAddress:
1574 $ref: '#/components/schemas/HezEthereumAddress'
1575 bjj:
1576 $ref: '#/components/schemas/BJJ'
1577 signature:
1578 $ref: '#/components/schemas/ETHSignature'
1579 example:
1580 hezEthereumAddress: hez:0x74a549b410d01d9eC56346aE52b8550515B283b2
1581 bjj: hez:dEZ-Tj7d5h0TAqbnRTTYURYDEo5KZzB87_2WknUU8gCN
1582 signature: '0x8db6db2ad6cbe21297fb8ee01c59b01b52d4df7ea92a0f0dee0be0075a8f224a06b367407c8f402cfe0490c142a1c92da3fc29b51162ae160d35e1577d3071bb01'
1583 timestamp: '2020-11-17T13:25:36.784295Z'
1584 additionalProperties: false
1585 required:
1586 - timestamp
1587 - hezEthereumAddress
1588 - bjj
1589 - signature
1590 HistoryTransaction:
1591 type: object
1592 description: Transaction of the Hermez Network
1593 properties:
1594 L1orL2:
1595 type: string
1596 enum:
1597 - L1
1598 - L2
1599 id:
1600 $ref: '#/components/schemas/TransactionId'
1601 itemId:
1602 $ref: '#/components/schemas/ItemId'
1603 type:
1604 $ref: '#/components/schemas/TransactionType'
1605 position:
1606 $ref: '#/components/schemas/TransactionPosition'
1607 fromAccountIndex:
1608 type: string
1609 description: >-
1610 Identifier of an account. It references the position where the account is inside the state Merkle tree.
1611 The identifier is built using: `hez:` + `token symbol:` + `index`
1612 example: "hez:DAI:4444"
1613 nullable: true
1614 fromHezEthereumAddress:
1615 type: string
1616 description: "Address of an Etherum account linked to the Hermez Network."
1617 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1618 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1619 nullable: true
1620 fromBJJ:
1621 type: string
1622 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."
1623 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1624 example: "hez:9CK9fjQdMUTGm8KDvGLy3MB-vnP0NCcGX7Uh7OO6KRJm"
1625 nullable: true
1626 toAccountIndex:
1627 allOf:
1628 - $ref: '#/components/schemas/AccountIndex'
1629 - example: "hez:DAI:672"
1630 toHezEthereumAddress:
1631 type: string
1632 description: "Address of an Etherum account linked to the Hermez Network."
1633 pattern: "^hez:0x[a-fA-F0-9]{40}$"
1634 example: "hez:0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
1635 nullable: true
1636 toBJJ:
1637 type: string
1638 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."
1639 pattern: "^hez:[A-Za-z0-9_-]{44}$"
1640 example: "hez:f1J78_6uqTyjX6jrVCqN4RFeRBnWQAGl477ZFtOnH6Sm"
1641 nullable: true
1642 amount:
1643 allOf:
1644 - $ref: '#/components/schemas/BigInt'
1645 - description: Amount of tokens to be sent.
1646 - example: "4903020000000000000"
1647 batchNum:
1648 type: integer
1649 description: Batch in which the transaction was forged. Null indicates not forged yet.
1650 minimum: 0
1651 maximum: 4294967295
1652 example: 5432
1653 nullable: true
1654 historicUSD:
1655 type: number
1656 description: Value in USD at the moment the transaction was forged.
1657 example: 49.7
1658 nullable: true
1659 timestamp:
1660 type: string
1661 format: date-time
1662 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.
1663 token:
1664 $ref: '#/components/schemas/Token'
1665 L1Info:
1666 type: object
1667 description: Additional information that only applies to L1 transactions.
1668 nullable: true
1669 properties:
1670 toForgeL1TransactionsNum:
1671 $ref: '#/components/schemas/ToForgeL1TransactionsNum'
1672 userOrigin:
1673 type: boolean
1674 description: True if the transaction was sent by a user. False if it was sent by a coordinator.
1675 depositAmount:
1676 allOf:
1677 - $ref: '#/components/schemas/BigInt'
1678 - description: Tokens transfered from L1 to L2.
1679 - example: "4900000000000000000"
1680 amountSuccess:
1681 type: boolean
1682 description: >-
1683 Indicates if the amount specified by the user has been sent propperly. If false, the amount that actualy has been sent is 0.
1684 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.
1685 An example were this value could be false: a user send a `DepositTransfer` transaction, but when the tx is forged there are not
1686 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.
1687 example: true
1688 depositAmountSuccess:
1689 type: boolean
1690 description: >-
1691 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.
1692 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.
1693 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.
1694 In this case transaction won't be effective making the deposit amount have a real value of 0.
1695 example: true
1696 historicDepositAmountUSD:
1697 type: number
1698 description: Deposit amount in USD, at the moment the transaction was made.
1699 example: 3.897
1700 nullable: true
1701 ethereumBlockNum:
1702 allOf:
1703 - $ref: '#/components/schemas/EthBlockNum'
1704 - description: Ethereum block in which the transaction was added to the smart contract forge queue.
1705 - example: 258723049
1706 required:
1707 - toForgeL1TransactionsNum
1708 - userOrigin
1709 - depositAmount
1710 - amountSuccess
1711 - depositAmountSuccess
1712 - historicDepositAmountUSD
1713 - ethereumBlockNum
1714 additionalProperties: false
1715 L2Info:
1716 type: object
1717 description: Additional information that only applies to L2 transactions.
1718 nullable: true
1719 properties:
1720 fee:
1721 $ref: '#/components/schemas/FeeSelector'
1722 historicFeeUSD:
1723 type: number
1724 description: Fee in USD, at the moment the transaction was forged.
1725 example: 263.89
1726 nullable: true
1727 nonce:
1728 $ref: '#/components/schemas/Nonce'
1729 example: null
1730 required:
1731 - fee
1732 - historicFeeUSD
1733 - nonce
1734 additionalProperties: false
1735 example:
1736 L1Info:
1737 ethereumBlockNum: 1
1738 historicDepositAmountUSD: 232.47
1739 depositAmount: '261'
1740 toForgeL1TransactionsNum: 10
1741 userOrigin: true
1742 L1orL2: L1
1743 L2Info:
1744 amount: '261'
1745 batchNum: 1
1746 fromAccountIndex: hez:ETH:276
1747 fromBJJ: hez:p_OohTzjzZnD3Sw93HQlK13DSxfD6lyvbfhh2kBsV6Z4
1748 fromHezEthereumAddress: hez:0x0000000000000000000000000000000000000114
1749 historicUSD: 3784.19
1750 id: '0x00000000000000000a000400'
1751 itemId: 2
1752 position: 4
1753 timestamp: '2020-11-17T14:08:12.197554Z'
1754 toAccountIndex: hez:ETH:276
1755 toBJJ: hez:p_OohTzjzZnD3Sw93HQlK13DSxfD6lyvbfhh2kBsV6Z4
1756 toHezEthereumAddress: hez:0x0000000000000000000000000000000000000114
1757 token:
1758 USD: 234.56
1759 decimals: 18
1760 ethereumAddress: '0x0000000000000000000000000000000000000000'
1761 ethereumBlockNum: 0
1762 fiatUpdate:
1763 id: 0
1764 itemId: 1
1765 name: Ether
1766 symbol: ETH
1767 type: CreateAccountDeposit
1768 required:
1769 - L1orL2
1770 - id
1771 - itemId
1772 - type
1773 - position
1774 - fromAccountIndex
1775 - fromHezEthereumAddress
1776 - fromBJJ
1777 - toAccountIndex
1778 - toHezEthereumAddress
1779 - toBJJ
1780 - amount
1781 - batchNum
1782 - historicUSD
1783 - timestamp
1784 - token
1785 - L1Info
1786 - L2Info
1787 additionalProperties: false
1788 HistoryTransactions:
1789 type: object
1790 properties:
1791 transactions:
1792 type: array
1793 description: List of history transactions.
1794 items:
1795 $ref: '#/components/schemas/HistoryTransaction'
1796 pendingItems:
1797 $ref: '#/components/schemas/PendingItems'
1798 example:
1799 transactions:
1800 - L1Info:
1801 ethereumBlockNum: 3
1802 historicDepositAmountUSD:
1803 depositAmount: '0'
1804 toForgeL1TransactionsNum: 7
1805 userOrigin: true
1806 L1orL2: L1
1807 L2Info:
1808 amount: '88888800000000000'
1809 batchNum: 9
1810 fromAccountIndex: hez:ETH:262
1811 fromBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1812 fromHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1813 historicUSD: 44.4444
1814 id: '0x000000000000000007000300'
1815 itemId: 28
1816 position: 3
1817 timestamp: '2020-11-26T09:18:40.004749Z'
1818 toAccountIndex: hez:EXIT:1
1819 toBJJ:
1820 toHezEthereumAddress:
1821 token:
1822 USD: 500
1823 decimals: 18
1824 ethereumAddress: '0x0000000000000000000000000000000000000000'
1825 ethereumBlockNum: 0
1826 fiatUpdate: '2020-11-26T09:18:27.034866Z'
1827 id: 0
1828 itemId: 1
1829 name: Ether
1830 symbol: ETH
1831 type: ForceExit
1832 - L1Info:
1833 L1orL2: L2
1834 L2Info:
1835 fee: 123
1836 historicFeeUSD: 2.15037380962404
1837 nonce: 1
1838 amount: '55555500000000000'
1839 batchNum: 8
1840 fromAccountIndex: hez:TKN1:264
1841 fromBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1842 fromHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1843 historicUSD: 23.4999765
1844 id: '0x020000000001080000000001'
1845 itemId: 19
1846 position: 2
1847 timestamp: '2020-11-26T09:18:40.004749Z'
1848 toAccountIndex: hez:TKN1:260
1849 toBJJ: hez:81h61cx0FKR1RXcLbHW8cZMPY8SR6yKU3ei4pmcLjpaQ
1850 toHezEthereumAddress: hez:0x6813Eb9362372EEF6200f3b1dbC3f819671cBA69
1851 token:
1852 USD: 423
1853 decimals: 18
1854 ethereumAddress: '0x0000000000000000000000000000000000000064'
1855 ethereumBlockNum: 2
1856 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1857 id: 1
1858 itemId: 2
1859 name: Test Token 1
1860 symbol: TKN1
1861 type: Transfer
1862 - L1Info:
1863 L1orL2: L2
1864 L2Info:
1865 fee: 44
1866 historicFeeUSD: 0.1973587359744
1867 nonce: 2
1868 amount: '66666600000000000'
1869 batchNum: 8
1870 fromAccountIndex: hez:ETH:259
1871 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1872 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1873 historicUSD: 33.3333
1874 id: '0x020000000001030000000002'
1875 itemId: 20
1876 position: 3
1877 timestamp: '2020-11-26T09:18:40.004749Z'
1878 toAccountIndex: hez:EXIT:1
1879 toBJJ:
1880 toHezEthereumAddress:
1881 token:
1882 USD: 500
1883 decimals: 18
1884 ethereumAddress: '0x0000000000000000000000000000000000000000'
1885 ethereumBlockNum: 0
1886 fiatUpdate: '2020-11-26T09:18:27.034866Z'
1887 id: 0
1888 itemId: 1
1889 name: Ether
1890 symbol: ETH
1891 type: Exit
1892 - L1Info:
1893 ethereumBlockNum: 3
1894 historicDepositAmountUSD: 14099.9999859
1895 depositAmount: '33333333300000000000'
1896 toForgeL1TransactionsNum: 2
1897 userOrigin: true
1898 L1orL2: L1
1899 L2Info:
1900 amount: '0'
1901 batchNum: 4
1902 fromAccountIndex: hez:TKN1:0
1903 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1904 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1905 historicUSD:
1906 id: '0x000000000000000002000000'
1907 itemId: 9
1908 position: 0
1909 timestamp: '2020-11-26T09:18:40.004749Z'
1910 toAccountIndex: hez:TKN1:0
1911 toBJJ:
1912 toHezEthereumAddress:
1913 token:
1914 USD: 423
1915 decimals: 18
1916 ethereumAddress: '0x0000000000000000000000000000000000000064'
1917 ethereumBlockNum: 2
1918 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1919 id: 1
1920 itemId: 2
1921 name: Test Token 1
1922 symbol: TKN1
1923 type: CreateAccountDeposit
1924 - L1Info:
1925 L1orL2: L2
1926 L2Info:
1927 fee: 2
1928 historicFeeUSD: 3.87833366166246e-17
1929 nonce: 1
1930 amount: '11111100000000000'
1931 batchNum: 7
1932 fromAccountIndex: hez:TKN1:261
1933 fromBJJ: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
1934 fromHezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
1935 historicUSD: 4.6999953
1936 id: '0x020000000001050000000001'
1937 itemId: 15
1938 position: 2
1939 timestamp: '2020-11-26T09:18:40.004749Z'
1940 toAccountIndex: hez:TKN1:264
1941 toBJJ: hez:Mj_xDCjfN-y3h_4hbhEdtkqnz6LFF1Cf4AV_8IoQswwh
1942 toHezEthereumAddress: hez:0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF
1943 token:
1944 USD: 423
1945 decimals: 18
1946 ethereumAddress: '0x0000000000000000000000000000000000000064'
1947 ethereumBlockNum: 2
1948 fiatUpdate: '2020-11-26T09:18:27.04357Z'
1949 id: 1
1950 itemId: 2
1951 name: Test Token 1
1952 symbol: TKN1
1953 type: Transfer
1954 pendingItems: 23
1955 required:
1956 - transactions
1957 - pendingItems
1958 additionalProperties: false
1959 EthBlockNum:
1960 type: integer
1961 description: Ethereum block number
1962 minimum: 0
1963 maximum: 1.84467440737096e+19
1964 example: 762375478
1965 ToForgeL1TransactionsNum:
1966 type: integer
1967 description: Reference to know in which batch a L1 transaction was forged / will be forged.
1968 minimum: 0
1969 maximum: 4294967295
1970 example: 784
1971 nullable: true
1972 TransactionPosition:
1973 type: integer
1974 description: Position that a transaction occupies in a batch.
1975 minimum: 0
1976 example: 5
1977 URL:
1978 type: string
1979 description: HTTP URL
1980 example: "https://apimock.hermez.network"
1981 TokenSymbol:
1982 type: string
1983 description: Abreviation of the token name.
1984 example: "DAI"
1985 TokenName:
1986 type: string
1987 description: Token name.
1988 example: "Dai"
1989 CollectedFees:
1990 type: object
1991 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.
1992 additionalProperties:
1993 type: string
1994 example:
1995 1234: "425632785672345647"
1996 4321: "86538967235465432654352"
1997 Batch:
1998 type: object
1999 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
2000 properties:
2001 itemId:
2002 $ref: '#/components/schemas/ItemId'
2003 batchNum:
2004 $ref: '#/components/schemas/BatchNum'
2005 ethereumBlockNum:
2006 $ref: '#/components/schemas/EthBlockNum'
2007 ethereumBlockHash:
2008 type: string
2009 description: hash of the Ethereum block in which the batch was forged
2010 example: "0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553"
2011 timestamp:
2012 type: string
2013 format: date-time
2014 description: Time in which the batch was forged.
2015 forgerAddr:
2016 $ref: '#/components/schemas/EthereumAddress'
2017 collectedFees:
2018 $ref: '#/components/schemas/CollectedFees'
2019 historicTotalCollectedFeesUSD:
2020 type: number
2021 description: Sum of the all the fees collected, in USD, at the moment the batch was forged.
2022 example: 23.3
2023 stateRoot:
2024 allOf:
2025 - $ref: '#/components/schemas/Hash'
2026 - description: Root of the accounts Merkle Tree.
2027 - example: "2734657026572a8708d883"
2028 numAccounts:
2029 type: integer
2030 description: Number of registered accounts in this batch.
2031 exitRoot:
2032 allOf:
2033 - $ref: '#/components/schemas/Hash'
2034 - description: Root of the exit Merkle Tree associated to this batch.
2035 - example: "2734657026572a8708d883"
2036 forgeL1TransactionsNum:
2037 type: integer
2038 description: Identifier that corresponds to the group of L1 transactions forged in the current batch.
2039 example: 5
2040 nullable: true
2041 slotNum:
2042 $ref: '#/components/schemas/SlotNum'
2043 forgedTransactions:
2044 type: integer
2045 description: Amount of forged transactions in this batch.
2046 example: 318
2047 additionalProperties: false
2048 required:
2049 - itemId
2050 - batchNum
2051 - ethereumBlockNum
2052 - ethereumBlockHash
2053 - timestamp
2054 - forgerAddr
2055 - collectedFees
2056 - historicTotalCollectedFeesUSD
2057 - stateRoot
2058 - numAccounts
2059 - exitRoot
2060 - forgeL1TransactionsNum
2061 - slotNum
2062 - forgedTransactions
2063 FullBatch:
2064 type: object
2065 description: Group of transactions forged in a coordinator and sent and validated in Ethereum.
2066 properties:
2067 batch:
2068 $ref: '#/components/schemas/Batch'
2069 transactions:
2070 type: array
2071 description: List of forged transactions in the batch
2072 items:
2073 $ref: '#/components/schemas/HistoryTransaction'
2074 nullable: true
2075 additionalProperties: false
2076 required:
2077 - batch
2078 - transactions
2079 Hash:
2080 type: string
2081 description: hashed data
2082 example: "2734657026572a8708d883"
2083 SlotNum:
2084 type: integer
2085 description: Identifier of a slot.
2086 minimum: 0
2087 maximum: 4294967295
2088 example: 784
2089 Batches:
2090 type: object
2091 properties:
2092 batches:
2093 type: array
2094 description: List of batches.
2095 items:
2096 $ref: '#/components/schemas/Batch'
2097 pendingItems:
2098 $ref: '#/components/schemas/PendingItems'
2099 additionalProperties: false
2100 required:
2101 - batches
2102 - pendingItems
2103 Coordinator:
2104 type: object
2105 properties:
2106 itemId:
2107 $ref: '#/components/schemas/ItemId'
2108 forgerAddr:
2109 $ref: '#/components/schemas/EthereumAddress'
2110 bidderAddr:
2111 $ref: '#/components/schemas/EthereumAddress'
2112 URL:
2113 $ref: '#/components/schemas/URL'
2114 ethereumBlock:
2115 allOf:
2116 - $ref: '#/components/schemas/EthBlockNum'
2117 - description: Ethereum block in which the coordinator registered into the network.
2118 - example: 5735943738
2119 additionalProperties: false
2120 required:
2121 - itemId
2122 - forgerAddr
2123 - bidderAddr
2124 - URL
2125 - ethereumBlock
2126 Coordinators:
2127 type: object
2128 properties:
2129 coordinators:
2130 type: array
2131 description: List of coordinators.
2132 items:
2133 $ref: '#/components/schemas/Coordinator'
2134 pendingItems:
2135 $ref: '#/components/schemas/PendingItems'
2136 additionalProperties: false
2137 required:
2138 - coordinators
2139 - pendingItems
2140 Bid:
2141 type: object
2142 description: Tokens placed in an auction by a coordinator to gain the right to forge batches during a specific slot.
2143 properties:
2144 itemId:
2145 $ref: '#/components/schemas/ItemId'
2146 bidderAddr:
2147 $ref: '#/components/schemas/EthereumAddress'
2148 forgerAddr:
2149 $ref: '#/components/schemas/EthereumAddress'
2150 slotNum:
2151 $ref: '#/components/schemas/SlotNum'
2152 URL:
2153 $ref: '#/components/schemas/URL'
2154 bidValue:
2155 $ref: '#/components/schemas/BigInt'
2156 ethereumBlockNum:
2157 $ref: '#/components/schemas/EthBlockNum'
2158 timestamp:
2159 type: string
2160 format: date-time
2161 additionalProperties: false
2162 required:
2163 - bidderAddr
2164 - forgerAddr
2165 - slotNum
2166 - URL
2167 - bidValue
2168 - ethereumBlockNum
2169 - timestamp
2170 Bids:
2171 type: object
2172 properties:
2173 bids:
2174 type: array
2175 description: List of bids.
2176 items:
2177 $ref: '#/components/schemas/Bid'
2178 pendingItems:
2179 $ref: '#/components/schemas/PendingItems'
2180 additionalProperties: false
2181 required:
2182 - bids
2183 - pendingItems
2184 RecommendedFee:
2185 type: object
2186 description: Fee that the coordinator recommends per transaction in USD.
2187 properties:
2188 existingAccount:
2189 type: number
2190 description: Recommended fee if the destination account of the transaction already exists.
2191 minimum: 0
2192 example: 0.1
2193 createAccount:
2194 type: number
2195 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.
2196 minimum: 0
2197 example: 1.3
2198 createAccountInternal:
2199 type: number
2200 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.
2201 minimum: 0
2202 example: 0.5
2203 required:
2204 - existingAccount
2205 - createAccount
2206 - createAccountInternal
2207 additionalProperties: false
2208 Token:
2209 type: object
2210 description: Hermez Network compatible and registered token.
2211 properties:
2212 id:
2213 $ref: '#/components/schemas/TokenId'
2214 ethereumAddress:
2215 allOf:
2216 - $ref: '#/components/schemas/EthereumAddress'
2217 - description: Ethereum address in which the token is deployed.
2218 - example: "0xaa942cfcd25ad4d90a62358b0dd84f33b398262a"
2219 itemId:
2220 $ref: '#/components/schemas/ItemId'
2221 name:
2222 type: string
2223 description: full name of the token
2224 example: Maker Dai
2225 symbol:
2226 allOf:
2227 - $ref: '#/components/schemas/TokenSymbol'
2228 - example: DAI
2229 decimals:
2230 type: integer
2231 description: Number of decimals of the token.
2232 example: 18
2233 ethereumBlockNum:
2234 allOf:
2235 - $ref: '#/components/schemas/EthBlockNum'
2236 - description: Ethereum block number in which the token was added to the Hermez Network.
2237 - example: 539847538
2238 USD:
2239 type: number
2240 description: Value of the token in USD.
2241 example: 1.01
2242 nullable: true
2243 fiatUpdate:
2244 type: string
2245 format: date-time
2246 description: Timestamp of the moment the `USD` value was updated.
2247 nullable: true
2248 required:
2249 - id
2250 - ethereumAddress
2251 - itemId
2252 - name
2253 - symbol
2254 - decimals
2255 - ethereumBlockNum
2256 - USD
2257 - fiatUpdate
2258 additionalProperties: false
2259 Tokens:
2260 type: object
2261 properties:
2262 tokens:
2263 type: array
2264 description: List of tokens.
2265 items:
2266 $ref: '#/components/schemas/Token'
2267 pendingItems:
2268 $ref: '#/components/schemas/PendingItems'
2269 Exit:
2270 type: object
2271 description: Exit tree leaf. It Contains the necessary information to perform a withdrawal.
2272 properties:
2273 batchNum:
2274 allOf:
2275 - $ref: '#/components/schemas/BatchNum'
2276 - description: Batch in which the exit was forged.
2277 - example: 7394
2278 accountIndex:
2279 $ref: '#/components/schemas/AccountIndex'
2280 bjj:
2281 $ref: '#/components/schemas/BJJ'
2282 hezEthereumAddress:
2283 $ref: '#/components/schemas/HezEthereumAddress'
2284 itemId:
2285 $ref: '#/components/schemas/ItemId'
2286 merkleProof:
2287 type: object
2288 description: Existence proof of a leaf in a given Merkle Root. Encoded as hexadecimal string.
2289 properties:
2290 root:
2291 $ref: '#/components/schemas/BigInt'
2292 siblings:
2293 type: array
2294 items:
2295 $ref: '#/components/schemas/BigInt'
2296 oldKey:
2297 $ref: '#/components/schemas/BigInt'
2298 oldValue:
2299 $ref: '#/components/schemas/BigInt'
2300 isOld0:
2301 type: boolean
2302 key:
2303 $ref: '#/components/schemas/BigInt'
2304 value:
2305 $ref: '#/components/schemas/BigInt'
2306 fnc:
2307 type: integer
2308 maximum: 3
2309 minimum: 0
2310 required:
2311 - root
2312 - siblings
2313 - oldKey
2314 - oldValue
2315 - isOld0
2316 - key
2317 - value
2318 - fnc
2319 additionalProperties: false
2320 balance:
2321 $ref: '#/components/schemas/BigInt'
2322 instantWithdraw:
2323 type: integer
2324 description: Block in which the exit balance was instantly withdrawn. Null indicates that an instant withdrawn hasn't been performed.
2325 minimum: 0
2326 maximum: 1.84467440737096e+19
2327 example: 74747363
2328 nullable: true
2329 delayedWithdrawRequest:
2330 type: integer
2331 description: Block in which the exit balance was requested to delay withdraw. Null indicates that a delay withdraw hasn't been performed.
2332 minimum: 0
2333 maximum: 1.84467440737096e+19
2334 example: null
2335 nullable: true
2336 delayedWithdraw:
2337 type: integer
2338 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.
2339 minimum: 0
2340 maximum: 1.84467440737096e+19
2341 example: null
2342 nullable: true
2343 token:
2344 $ref: '#/components/schemas/Token'
2345 required:
2346 - batchNum
2347 - accountIndex
2348 - bjj
2349 - hezEthereumAddress
2350 - itemId
2351 - merkleProof
2352 - balance
2353 - instantWithdraw
2354 - delayedWithdrawRequest
2355 - delayedWithdraw
2356 - token
2357 additionalProperties: false
2358 Exits:
2359 type: object
2360 properties:
2361 exits:
2362 type: array
2363 description: List of exits.
2364 items:
2365 $ref: '#/components/schemas/Exit'
2366 pendingItems:
2367 $ref: '#/components/schemas/PendingItems'
2368 required:
2369 - exits
2370 - pendingItems
2371 additionalProperties: false
2372 Account:
2373 type: object
2374 description: State tree leaf. It contains balance and nonce of an account.
2375 properties:
2376 itemId:
2377 $ref: '#/components/schemas/ItemId'
2378 accountIndex:
2379 $ref: '#/components/schemas/AccountIndex'
2380 nonce:
2381 $ref: '#/components/schemas/Nonce'
2382 balance:
2383 $ref: '#/components/schemas/BigInt'
2384 bjj:
2385 $ref: '#/components/schemas/BJJ'
2386 hezEthereumAddress:
2387 $ref: '#/components/schemas/HezEthereumAddress'
2388 token:
2389 $ref: '#/components/schemas/Token'
2390 example:
2391 accountIndex: hez:ETH:259
2392 balance: '2590000000000000000'
2393 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2394 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2395 itemId: 4
2396 nonce: 0
2397 token:
2398 USD: 500
2399 decimals: 18
2400 ethereumAddress: '0x0000000000000000000000000000000000000000'
2401 ethereumBlockNum: 0
2402 fiatUpdate: '2020-11-26T09:53:47.444444Z'
2403 id: 0
2404 itemId: 1
2405 name: Ether
2406 symbol: ETH
2407 additionalProperties: false
2408 required:
2409 - itemId
2410 - accountIndex
2411 - nonce
2412 - balance
2413 - bjj
2414 - hezEthereumAddress
2415 - token
2416 Accounts:
2417 type: object
2418 properties:
2419 accounts:
2420 type: array
2421 description: List of accounts.
2422 items:
2423 $ref: '#/components/schemas/Account'
2424 pendingItems:
2425 $ref: '#/components/schemas/PendingItems'
2426 example:
2427 accounts:
2428 - accountIndex: hez:ETH:259
2429 balance: '2590000000000000000'
2430 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2431 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2432 itemId: 4
2433 nonce: 0
2434 token:
2435 USD: 500
2436 decimals: 18
2437 ethereumAddress: '0x0000000000000000000000000000000000000000'
2438 ethereumBlockNum: 0
2439 fiatUpdate: '2020-11-26T09:53:47.444444Z'
2440 id: 0
2441 itemId: 1
2442 name: Ether
2443 symbol: ETH
2444 - accountIndex: hez:TKN1:261
2445 balance: '2610000000'
2446 bjj: hez:W6x4TZOAZ9mAqdOb3Xm_hKDLspaXfEfMMN4tXOkinS-W
2447 hezEthereumAddress: hez:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
2448 itemId: 6
2449 nonce: 0
2450 token:
2451 USD: 423
2452 decimals: 18
2453 ethereumAddress: '0x0000000000000000000000000000000000000064'
2454 ethereumBlockNum: 2
2455 fiatUpdate: '2020-11-26T09:53:47.456619Z'
2456 id: 1
2457 itemId: 2
2458 name: Test Token 1
2459 symbol: TKN1
2460 pendingItems: 0
2461 additionalProperties: false
2462 required:
2463 - accounts
2464 - pendingItems
2465 Slot:
2466 type: object
2467 description: Slot information.
2468 properties:
2469 itemId:
2470 $ref: '#/components/schemas/ItemId'
2471 slotNum:
2472 $ref: '#/components/schemas/SlotNum'
2473 firstBlock:
2474 allOf:
2475 - $ref: '#/components/schemas/EthBlockNum'
2476 - description: Block in which the slot began or will begin
2477 - example: 76238647846
2478 lastBlock:
2479 allOf:
2480 - $ref: '#/components/schemas/EthBlockNum'
2481 - description: Block in which the slot ended or will end
2482 - example: 4475934
2483 openAuction:
2484 type: boolean
2485 description: Whether the auction of the slot is open or not.
2486 bestBid:
2487 type: object
2488 description: The best bid of the auction. If the bestBid is null, it is because no coordinator has bid for that slot.
2489 nullable: true
2490 properties:
2491 itemId:
2492 $ref: '#/components/schemas/ItemId'
2493 bidderAddr:
2494 $ref: '#/components/schemas/EthereumAddress'
2495 forgerAddr:
2496 $ref: '#/components/schemas/EthereumAddress'
2497 slotNum:
2498 $ref: '#/components/schemas/SlotNum'
2499 URL:
2500 $ref: '#/components/schemas/URL'
2501 bidValue:
2502 type: string
2503 description: BigInt is an integer encoded as a string for numbers that are very large.
2504 example: "8708856933496328593"
2505 pattern: "^\\d+$"
2506 ethereumBlockNum:
2507 $ref: '#/components/schemas/EthBlockNum'
2508 timestamp:
2509 type: string
2510 format: date-time
2511 additionalProperties: false
2512 required:
2513 - bidderAddr
2514 - forgerAddr
2515 - slotNum
2516 - URL
2517 - bidValue
2518 - ethereumBlockNum
2519 - timestamp
2520 additionalProperties: false
2521 required:
2522 - slotNum
2523 - firstBlock
2524 - lastBlock
2525 - openAuction
2526 - bestBid
2527 Slots:
2528 type: object
2529 properties:
2530 slots:
2531 type: array
2532 description: List of slots.
2533 items:
2534 allOf:
2535 - $ref: '#/components/schemas/Slot'
2536 - description: Last synchronized Etherum block.
2537 pendingItems:
2538 $ref: '#/components/schemas/PendingItems'
2539 additionalProperties: false
2540 required:
2541 - slots
2542 - pendingItems
2543 NextForger:
2544 type: object
2545 description: Coordinator information along with the scheduled forging period
2546 properties:
2547 coordinator:
2548 $ref: '#/components/schemas/Coordinator'
2549 period:
2550 type: object
2551 description: Time period in which the coordinator will have the ability to forge. Specified both in Ethereum blocks and timestamp
2552 properties:
2553 slotNum:
2554 $ref: '#/components/schemas/SlotNum'
2555 fromBlock:
2556 $ref: '#/components/schemas/EthBlockNum'
2557 toBlock:
2558 $ref: '#/components/schemas/EthBlockNum'
2559 fromTimestamp:
2560 type: string
2561 format: date-time
2562 toTimestamp:
2563 type: string
2564 format: date-time
2565 required:
2566 - slotNum
2567 - fromBlock
2568 - toBlock
2569 - fromTimestamp
2570 - toTimestamp
2571 additionalProperties: false
2572 required:
2573 - coordinator
2574 - period
2575 additionalProperties: false
2576 NextForgers:
2577 type: array
2578 description: List of next coordinators to forge.
2579 items:
2580 $ref: '#/components/schemas/NextForger'
2581 State:
2582 type: object
2583 description: Gobal variables of the network
2584 properties:
2585 network:
2586 $ref: '#/components/schemas/StateNetwork'
2587 metrics:
2588 $ref: '#/components/schemas/StateMetrics'
2589 rollup:
2590 $ref: '#/components/schemas/StateRollup'
2591 auction:
2592 $ref: '#/components/schemas/StateAuction'
2593 withdrawalDelayer:
2594 $ref: '#/components/schemas/StateWithdrawDelayer'
2595 recommendedFee:
2596 $ref: '#/components/schemas/RecommendedFee'
2597 additionalProperties: false
2598 required:
2599 - network
2600 - metrics
2601 - rollup
2602 - auction
2603 - withdrawalDelayer
2604 - recommendedFee
2605 StateNetwork:
2606 type: object
2607 description: Gobal statistics of the network
2608 properties:
2609 lastEthereumBlock:
2610 allOf:
2611 - $ref: '#/components/schemas/EthBlockNum'
2612 - description: Current Etherum block. Note that this is the actual last block of Ethereum, not the last synchronized block by the node.
2613 - example: 3457437
2614 lastSynchedBlock:
2615 allOf:
2616 - $ref: '#/components/schemas/EthBlockNum'
2617 - description: Last synchronized Etherum block. Compare with lastEthereumBlock to check the synchronization status of the node.
2618 - example: 3457437
2619 lastBatch:
2620 $ref: '#/components/schemas/Batch'
2621 currentSlot:
2622 allOf:
2623 - $ref: '#/components/schemas/SlotNum'
2624 - description: Slot where batches are currently being forged.
2625 - example: 2334
2626 nextForgers:
2627 $ref: '#/components/schemas/NextForgers'
2628 additionalProperties: false
2629 required:
2630 - lastEthereumBlock
2631 - lastSynchedBlock
2632 - lastBatch
2633 - currentSlot
2634 - nextForgers
2635 StateAuction:
2636 type: object
2637 description: Auction parameters.
2638 properties:
2639 ethereumBlockNum:
2640 $ref: '#/components/schemas/EthBlockNum'
2641 bootCoordinator:
2642 allOf:
2643 - $ref: '#/components/schemas/EthereumAddress'
2644 - description: Ethereum address of the boot coordinator.
2645 - example: "0x997dc4262BCDbf85190C01c996b4C06a461d2430"
2646 bootCoordinatorUrl:
2647 type: string
2648 description: Boot Coordinator URL
2649 example: "https://boot.coordinator.io"
2650 slotDeadline:
2651 type: integer
2652 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.
2653 example: 3
2654 closedAuctionSlots:
2655 type: integer
2656 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.
2657 example: 2
2658 openAuctionSlots:
2659 type: integer
2660 description: Amount of days in advance are auctions opened.
2661 defaultSlotSetBid:
2662 type: array
2663 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]`."
2664 items:
2665 type: string
2666 example: ["32","0","68","21","55","99"]
2667 defaultSlotSetBidSlotNum:
2668 type: integer
2669 description: Slot in which the changes will be applied for the first time.
2670 outbidding:
2671 type: number
2672 description: Minimum outbid over the previous one to consider it valid.
2673 example: 3.64
2674 donationAddress:
2675 allOf:
2676 - $ref: '#/components/schemas/EthereumAddress'
2677 - description: Ethereum address where the donations will go to.
2678 - example: "0x887dc4262BCDbf85190C01c996b4C06a461d2430"
2679 allocationRatio:
2680 type: array
2681 description: Percentage in which fees will be split between donations, governance, and burning. The sum of the tree values should be 100.
2682 items:
2683 type: integer
2684 example: [80,10,10]
2685 additionalProperties: false
2686 required:
2687 - ethereumBlockNum
2688 - bootCoordinator
2689 - bootCoordinatorUrl
2690 - slotDeadline
2691 - closedAuctionSlots
2692 - openAuctionSlots
2693 - defaultSlotSetBid
2694 - outbidding
2695 - donationAddress
2696 - allocationRatio
2697 StateRollup:
2698 type: object
2699 description: Rollup parameters
2700 properties:
2701 ethereumBlockNum:
2702 $ref: '#/components/schemas/EthBlockNum'
2703 forgeL1L2BatchTimeout:
2704 type: integer
2705 description: Max Ethereum blocks after the last L1-L2-batch, when exceeds the timeout only L1-L2-batch are allowed.
2706 example: 5
2707 feeAddToken:
2708 type: string
2709 description: Fee to pay when registering tokens into the network.
2710 example: "5698"
2711 withdrawalDelay:
2712 type: integer
2713 description: Withdraw delay in seconds
2714 example: 432000
2715 buckets:
2716 type: array
2717 description: List of buckets state
2718 items:
2719 type: object
2720 properties:
2721 ceilUSD:
2722 type: string
2723 description: Max USD value
2724 example: "1000"
2725 withdrawals:
2726 type: string
2727 description: Available withdrawals of the bucket
2728 example: "4"
2729 blockWithdrawalRate:
2730 type: string
2731 description: Every `blockWithdrawalRate` blocks add 1 withdrawal
2732 example: "8"
2733 maxWithdrawals:
2734 type: string
2735 description: Max withdrawals the bucket can hold
2736 example: "4"
2737 additionalProperties: false
2738 required:
2739 - ceilUSD
2740 - withdrawals
2741 - blockWithdrawalRate
2742 - maxWithdrawals
2743 additionalProperties: false
2744 required:
2745 - ethereumBlockNum
2746 - forgeL1L2BatchTimeout
2747 - feeAddToken
2748 - withdrawalDelay
2749 - buckets
2750 StateWithdrawDelayer:
2751 type: object
2752 description: Withdrawal delayer parameters
2753 properties:
2754 ethereumBlockNum:
2755 $ref: '#/components/schemas/EthBlockNum'
2756 hermezGovernanceAddress:
2757 allOf:
2758 - $ref: '#/components/schemas/EthereumAddress'
2759 - description: Ethereum address of the governance.
2760 - example: "0x667dc4262BCDbf85190C01c996b4C06a461d2430"
2761 emergencyCouncilAddress:
2762 allOf:
2763 - $ref: '#/components/schemas/EthereumAddress'
2764 - description: Ethereum address that can claim the funds in an emergency when the maximum emergency mode time is exceeded.
2765 - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430"
2766 withdrawalDelay:
2767 allOf:
2768 - $ref: '#/components/schemas/EthBlockNum'
2769 - description: The time that everyone needs to wait until a withdrawal of the funds is allowed, in seconds.
2770 - example: 539573849
2771 emergencyModeStartingBlock:
2772 type: integer
2773 description: Block number in which the emergency mode has been activated.
2774 example: 10
2775 emergencyMode:
2776 type: boolean
2777 description: Indicates if emergency mode has been activated.
2778 example: false
2779 additionalProperties: false
2780 required:
2781 - ethereumBlockNum
2782 - hermezGovernanceAddress
2783 - emergencyCouncilAddress
2784 - withdrawalDelay
2785 - emergencyModeStartingBlock
2786 - emergencyMode
2787 StateMetrics:
2788 type: object
2789 description: Metrics of the network
2790 properties:
2791 transactionsPerBatch:
2792 type: number
2793 description: Average transactions per batch in the last 24 hours.
2794 example: 2002.7
2795 batchFrequency:
2796 type: number
2797 description: Average elapsed time between batches in the last 24 hours, in seconds.
2798 example: 8.9
2799 transactionsPerSecond:
2800 type: number
2801 description: Average transactions per second in the last 24 hours.
2802 example: 302.3
2803 totalAccounts:
2804 type: integer
2805 description: Number of created accounts.
2806 example: 90473
2807 totalBJJs:
2808 type: integer
2809 description: Number of different registered BJJs.
2810 example: 23067
2811 avgTransactionFee:
2812 type: number
2813 description: Average fee percentage paid for L2 transactions in the last 24 hours.
2814 example: 1.54
2815 additionalProperties: false
2816 required:
2817 - transactionsPerBatch
2818 - batchFrequency
2819 - transactionsPerSecond
2820 - totalAccounts
2821 - totalBJJs
2822 - avgTransactionFee
2823 PendingItems:
2824 type: integer
2825 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.
2826 example: 15
2827 Config:
2828 type: object
2829 description: Configuration parameters of the different smart contracts that power the Hermez Network.
2830 properties:
2831 hermez:
2832 type: object
2833 description: Constant configuration of the Hermez smart contract.
2834 properties:
2835 publicConstants:
2836 type: object
2837 description: Public Hermez smart contract constants
2838 properties:
2839 tokenHEZ:
2840 allOf:
2841 - $ref: '#/components/schemas/EthereumAddress'
2842 - description: Ethereum address of the HEZ token.
2843 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2844 absoluteMaxL1L2BatchTimeout:
2845 type: integer
2846 description: L1L2 Batch Timeout
2847 example: 240
2848 verifiers:
2849 type: array
2850 description: List of verifiers struct
2851 items:
2852 type: object
2853 properties:
2854 maxTx:
2855 type: integer
2856 description: Maximum rollup transactions in a batch
2857 example: 512
2858 nlevels:
2859 type: integer
2860 description: Number of levels of the circuit
2861 example: 32
2862 required:
2863 - maxTx
2864 - nlevels
2865 additionalProperties: false
2866 hermezAuctionContract:
2867 allOf:
2868 - $ref: '#/components/schemas/EthereumAddress'
2869 - description: Ethereum address of the auction smart contract.
2870 - example: "0x111dc4262BCDbf85190C01c996b4C06a461d2430"
2871 hermezGovernanceAddress:
2872 allOf:
2873 - $ref: '#/components/schemas/EthereumAddress'
2874 - description: Ethereum address of the governance.
2875 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
2876 withdrawDelayerContract:
2877 allOf:
2878 - $ref: '#/components/schemas/EthereumAddress'
2879 - description: Ethereum address of the withdraw delayer contracts.
2880 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2881 required:
2882 - tokenHEZ
2883 - absoluteMaxL1L2BatchTimeout
2884 - verifiers
2885 - hermezAuctionContract
2886 - hermezGovernanceAddress
2887 - withdrawDelayerContract
2888 additionalProperties: false
2889 maxFeeIdxCoordinator:
2890 type: integer
2891 description: is the maximum number of tokens the coordinator can use to collect fees.
2892 example: 64
2893 reservedIdx:
2894 type: integer
2895 description: First 256 indexes reserved, first user index will be the 256.
2896 example: 255
2897 exitIdx:
2898 type: integer
2899 description: Account index used to indicate that a transaction is an `exit` or `force exit`.
2900 example: 1
2901 limitDepositAmount:
2902 type: integer
2903 description: Maximum deposit amount (L1 to L2) allowed.
2904 example: 321
2905 limitL2TransferAmount:
2906 type: integer
2907 description: Maximum amount (L2 to L2) allowed.
2908 example: 837
2909 limitTokens:
2910 type: integer
2911 description: Maximum number of different tokens that can be registered in the network.
2912 example: 4294967295
2913 l1CoordinatorTotalBytes:
2914 type: integer
2915 description: Number of bytes that a L1 coordinator transaction has ([4 bytes] token + [32 bytes] babyjub + [65 bytes] compressedSignature).
2916 example: 101
2917 l1UserTotalBytes:
2918 type: integer
2919 description: Number of bytes that a L1 user transaction has ([20 bytes] fromEthAddr + [32 bytes] fromBjj-compressed + [6 bytes] fromIdx + [5 bytes] depositAmountFloat40 + [5 bytes] amountFloat40 + [4 bytes] tokenId + [6 bytes] toIdx).
2920 example: 72
2921 maxL1UserTx:
2922 type: integer
2923 description: Maximum L1-user transactions allowed to be queued in a batch.
2924 example: 128
2925 maxL1Tx:
2926 type: integer
2927 description: Maximum L1 transactions allowed to be queued in a batch.
2928 example: 256
2929 inputSHAConstantBytes:
2930 type: integer
2931 description: Input SHA constant bytes
2932 example: 18542
2933 numBuckets:
2934 type: integer
2935 description: Number of buckets
2936 example: 5
2937 maxWithdrawalDelay:
2938 type: integer
2939 description: Maximum delay to withdraw tokens. Time is measured in seconds.
2940 example: 2 * 7 * 24 * 60 * 60
2941 exchangeMultiplier:
2942 type: integer
2943 description: exchange multiplier
2944 example: 1e14
2945 required:
2946 - publicConstants
2947 - reservedIdx
2948 - exitIdx
2949 - limitDepositAmount
2950 - limitL2TransferAmount
2951 - limitTokens
2952 - l1CoordinatorTotalBytes
2953 - l1UserTotalBytes
2954 - maxL1UserTx
2955 - maxL1Tx
2956 - inputSHAConstantBytes
2957 - numBuckets
2958 - maxWithdrawalDelay
2959 - exchangeMultiplier
2960 additionalProperties: false
2961 auction:
2962 type: object
2963 description: Constant configuration of the auction smart contract.
2964 properties:
2965 blocksPerSlot:
2966 type: integer
2967 description: Blocks per slot.
2968 initialMinimalBidding:
2969 type: integer
2970 description: Minimum bid when no one has bid yet.
2971 genesisBlockNum:
2972 allOf:
2973 - $ref: '#/components/schemas/EthBlockNum'
2974 - description: Ethereum block number in which the smart contract starts operating.
2975 tokenHEZ:
2976 allOf:
2977 - $ref: '#/components/schemas/EthereumAddress'
2978 - description: Ethereum address of the HEZ token.
2979 - example: "0x333dc4262BCDbf85190C01c996b4C06a461d2430"
2980 hermezRollup:
2981 allOf:
2982 - $ref: '#/components/schemas/EthereumAddress'
2983 - description: Ethereum address of the rollup smart contract.
2984 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
2985 governanceAddress:
2986 allOf:
2987 - $ref: '#/components/schemas/EthereumAddress'
2988 - description: Ethereum address of the governance.
2989 - example: "0x444dc4262BCDbf85190C01c996b4C06a461d2430"
2990 required:
2991 - blocksPerSlot
2992 - initialMinimalBidding
2993 - genesisBlockNum
2994 - tokenHEZ
2995 - hermezRollup
2996 - governanceAddress
2997 additionalProperties: false
2998 withdrawalDelayer:
2999 type: object
3000 description: Constant configuration of the withdrawal delayer smart contract.
3001 properties:
3002 maxWithdrawalDelay:
3003 type: integer
3004 description: Maximum time delay in which the tokens can be locked in the contract. Time is measured in seconds.
3005 example: 200
3006 maxEmergencyModeTime:
3007 type: integer
3008 description: Maximum amount of time in which the contract can be in emergency mode. Time is measured in seconds.
3009 example: 2000
3010 hermezRollup:
3011 allOf:
3012 - $ref: '#/components/schemas/EthereumAddress'
3013 - description: Ethereum address of the rollup smart contract.
3014 - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430"
3015 required:
3016 - maxWithdrawalDelay
3017 - maxEmergencyModeTime
3018 - hermezRollup
3019 additionalProperties: false
3020 required:
3021 - hermez
3022 - auction
3023 - withdrawalDelayer
3024 additionalProperties: false
3025 Error:
3026 type: object
3027 description: Error response.
3028 properties:
3029 message:
3030 type: string
3031 Error400:
3032 allOf:
3033 - $ref: '#/components/schemas/Error'
3034 - example:
3035 message: Invalid signature.
3036 Error404:
3037 allOf:
3038 - $ref: '#/components/schemas/Error'
3039 - example:
3040 message: Item(s) not found.
3041 Error500:
3042 allOf:
3043 - $ref: '#/components/schemas/Error'
3044 - example:
3045 message: Database error.