openapi: 3.0.2
servers:
  - url: /v2
info:
  description: |-

    # Documentação de API para o SandBox DREX Real Digital.
  version: '2.0'
  title: SandBox DREX Real Digital by BBCHAIN
  contact:
    email: bueno@bbchain.com.br
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
paths:
  /participant:
    get:
      tags:
        - Participant
      summary: Consulta dados do participante
      operationId: getParticipant
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                required:
                  - balance
                  - bank
                  - wallet
                  - cnpj8
                  - enabled
                properties:
                  bank:
                    type: string
                    example: Bank A
                    description: |
                      Nome do banco.
                  cnpj8:
                    type: integer
                    example: 75859975
                    description: CNPJ8 que identifica um participante
                  wallet:
                    type: string
                    example: '0xe69d9b02e31da15cf78184078e250633b69753cc'
                    description: |
                      Carteira default do banco.
                  balance:
                    type: number
                    format: double
                    description: |
                      Quantidade de cbdc que o banco possui.
                    example: 123.45
                    multipleOf: 0.01
                  enabled:
                    type: boolean
                    example: false
                    description: >
                      Flag que define se a carteira padrão atual foi ativada ou
                      não.
                  transactions:
                    readOnly: true
                    description: |
                      Retornado em POST.
                    type: array
                    items:
                      required:
                        - transactionHash
                        - blockNumber
                        - contractAddress
                        - method
                      properties:
                        transactionHash:
                          type: string
                        blockNumber:
                          type: string
                        contractAddress:
                          type: string
                        method:
                          type: string
                type: object
