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