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