Aeternity Middleware API

ae_mdw, the æternity middleware (v1.108.2) — an indexing layer over the node exposing 76 unauthenticated REST operations for transactions, blocks, accounts, activities, AEX-9/AEX-141 tokens, DEX swaps, names and auctions, oracles, channels, transfers, wealth ranking and statistics, plus an open GraphQL endpoint (85 query fields, introspection enabled) and a WebSocket subscription stream for KeyBlocks, MicroBlocks, Transactions and per-object events.

Operations 76

GET /accounts/{accountId}/activities #
GET /accounts/{accountId}/aex141/tokens #
GET /accounts/{accountId}/aex9/balances #
GET /accounts/{accountId}/dex/swaps #
GET /accounts/{accountId}/names/claims #
GET /accounts/{accountId}/names/pointees #
GET /accounts/{accountId}/transactions/count #
GET /aex141 #
GET /aex141/{contractId}/templates #
GET /aex141/{contractId}/templates/{templateId}/tokens #
GET /aex141/{contractId}/tokens #
GET /aex141/{contractId}/tokens/{tokenId} #
GET /aex141/{contractId}/transfers #
GET /aex141/{id} #
GET /aex9 #
GET /aex9/count #
GET /aex9/{contractId}/balances #
GET /aex9/{contractId}/balances/{accountId} #
GET /aex9/{contractId}/balances/{accountId}/history #
GET /aex9/{id} #
GET /channels #
GET /channels/{id} #
GET /contracts/calls #
GET /contracts/logs #
GET /contracts/{id} #
GET /dex/swaps #
GET /dex/{contract_id}/swaps #
GET /hyperchain/epochs #
GET /hyperchain/epochs/top #
GET /hyperchain/schedule #
GET /hyperchain/schedule/height/{height} #
GET /hyperchain/validators #
GET /hyperchain/validators/{validator} #
GET /hyperchain/validators/{validator}/delegates #
GET /hyperchain/validators/{validator}/delegates/top #
GET /key-blocks #
GET /key-blocks/{hash_or_kbi} #
GET /key-blocks/{hash_or_kbi}/micro-blocks #
GET /micro-blocks/{hash} #
GET /micro-blocks/{hash}/transactions #
GET /names #
GET /names/auctions #
GET /names/auctions/{id} #
GET /names/auctions/{id}/claims #
GET /names/count #
GET /names/{id} #
GET /names/{id}/claims #
GET /names/{id}/transfers #
GET /names/{id}/updates #
GET /oracles #
GET /oracles/{id} #
GET /oracles/{id}/extends #
GET /oracles/{id}/queries #
GET /oracles/{id}/responses #
GET /stats #
GET /stats/active-accounts #
GET /stats/aex9-transfers #
GET /stats/blocks #
GET /stats/contracts #
GET /stats/delta #
GET /stats/difficulty #
GET /stats/hashrate #
GET /stats/miners #
GET /stats/miners/top #
GET /stats/names #
GET /stats/total #
GET /stats/total-accounts #
GET /stats/transactions #
GET /stats/transactions/total #
GET /status #
GET /transactions #
GET /transactions/count #
GET /transactions/pending #
GET /transactions/pending/count #
GET /transactions/{hash} #
GET /transfers #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aeternity-middleware-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aeternity-middleware-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: API for [Aeternity Middleware](https://github.com/aeternity/ae_mdw)
  title: Aeternity Middleware
  version: 1.108.2
servers:
- url: https://mainnet.aeternity.io/mdw/v3
  description: Mainnet middleware
- url: https://testnet.aeternity.io/mdw/v3
  description: Testnet middleware
components:
  parameters:
    LimitParam:
      in: query
      name: limit
      description: Limit paginated resources (max 100)
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    StatsLimitParam:
      in: query
      name: limit
      description: Limit paginated resources (max 1000)
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 10
    ScopeParam:
      in: query
      name: scope
      description: Scopes results in a generation range
      schema:
        type: string
        pattern: (gen):\d+(-\d+)?
    HyperchainScopeParam:
      in: query
      name: scope
      description: Scopes results in a hyperchain epoch range
      schema:
        type: string
        pattern: (epoch):\d+(-\d+)?
    DirectionParam:
      in: query
      name: direction
      description: Sorts results in forwards or backwards direction
      schema:
        type: string
        enum:
        - forward
        - backward
  schemas:
    AccountAddress:
      description: Account address
      type: string
      example: ak_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw
      pattern: ^ak_\w{38,50}$
    Activity:
      description: Activity related to an account
      type: object
      properties:
        block_hash:
          $ref: '#/components/schemas/MicroBlockHash'
        block_time:
          description: The time in which the block happened
          type: integer
          example: 1587577771376
        height:
          description: The block height
          type: integer
        type:
          description: The event type
          type: string
          enum:
          - SpendTxEvent
          - OracleRegisterTxEvent
          - OracleExtendTxEvent
          - OracleQueryTxEvent
          - OracleResponseTxEvent
          - NamePreclaimTxEvent
          - NameClaimTxEvent
          - NameTransferTxEvent
          - NameUpdateTxEvent
          - NameRevokeTxEvent
          - ContractCreateTxEvent
          - ContractCallTxEvent
          - GaAttachTxEvent
          - GaMetaTxEvent
          - ChannelCreateTxEvent
          - ChannelDepositTxEvent
          - ChannelWithdrawTxEvent
          - ChannelForceProgressTxEvent
          - ChannelCloseMutualTxEvent
          - ChannelCloseSoloTxEvent
          - ChannelSlashTxEvent
          - ChannelSettleTxEvent
          - ChannelSnapshotSoloTxEvent
          - ChannelSetDelegatesTxEvent
          - ChannelOffchainTxEvent
          - ChannelClientReconnectTxEvent
          - PayingForTxEvent
        payload:
          type: object
          oneOf:
          - $ref: '#/components/schemas/Transaction'
          - $ref: '#/components/schemas/Aex9TransferEvent'
          - $ref: '#/components/schemas/Aex141TransferEvent'
          - $ref: '#/components/schemas/InternalContractCallEvent'
          - $ref: '#/components/schemas/InternalTransferEvent'
      required:
      - block_hash
      - block_time
      - height
      - type
      - payload
    Aex141Response:
      description: Response Schema for AEX141 contract
      example:
        base_url: null
        contract_id: ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV
        contract_tx_hash: th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF
        extensions:
        - mintable_templates
        - mintable_templates_limit
        - mutable_attributes
        - burnable
        limits:
          limit_log_idx: 0
          limit_tx_hash: th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF
          template_limit: 100
          token_limit: null
        metadata_type: map
        name: Apes stepping into the Metaverse - (Template Version)
        nft_owners: 1
        nfts_amount: 36
        symbol: ASITM-T
        invalid: false
        creation_time: 1587577771376
        block_height: 234208
      properties:
        base_url:
          description: Metadata base url
          type: string
        contract_id:
          description: NFT contract id
          $ref: '#/components/schemas/ContractAddress'
        contract_tx_hash:
          description: Transaction hash of the contract creation
          $ref: '#/components/schemas/TransactionHash'
        extensions:
          description: Extensions implemented by the contract
          type: array
          items:
            type: string
        limits:
          description: Limit for amount of tokens or templates
          type: object
        invalid:
          description: True if the contract is invalid
          type: boolean
        creation_time:
          description: Creation time of the contract
          type: integer
        block_height:
          description: Block height of the contract creation
          type: integer
      required:
      - base_url
      - contract_id
      - contract_tx_hash
      - extensions
      - limits
      - metadata_type
      - name
      - nft_owners
      - nfts_amount
      - symbol
      - invalid
      - creation_time
      - block_height
      title: Aex141Response
      type: object
    Aex141TemplateTokensResponse:
      description: Response Schema for template tokens of a AEX-141 contract
      example:
        log_idx: 0
        owner_id: ak_8Ujt76QfpT1DyYsNZKGPGtMZ2C2MFf7CcnpQvJWNsX6szZkYN
        token_id: 29
        tx_hash: th_ZzPmumNtkYCfrGpVGtQP6em9hgkWQqstddB5ynagrJJa7ua9c
      properties:
        owner_id:
          description: Owner wallet address
          $ref: '#/components/schemas/AccountAddress'
        log_idx:
          description: Mint event index
          type: integer
        token_id:
          description: NFT id
          type: integer
        tx_hash:
          description: Mint transaction hash
          $ref: '#/components/schemas/TransactionHash'
      required:
      - log_idx
      - owner_id
      - token_id
      - tx_hash
      title: Aex141TemplatesResponse
      type: object
    Aex141TemplatesResponse:
      description: Response Schema for templates of a AEX-141 contract
      example:
        contract_id: ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV
        edition:
          limit: 2
          limit_log_idx: 0
          limit_tx_hash: th_KTTTudTgSAZrHJQVwW4AF6XD1ksQbpyHXWfgmL2kSGvNk14CU
          supply: 1
          supply_log_idx: 0
          supply_tx_hash: th_erpNZJTuvRfKPafcRvkJ7ddCu9GBSQoY12QVs5pdCTm6eCDwr
        log_idx: 0
        template_id: 1
        tx_hash: th_ojhH9bD7kGRpgZ6rXob2qi5asBKsYTdbSVaKzGdpfP6wiRxz4
      properties:
        contract_id:
          description: NFT contract id
          $ref: '#/components/schemas/ContractAddress'
        edition:
          description: Template edition details
          type: object
        log_idx:
          description: Log index of the TemplateCreation
          type: integer
        template_id:
          description: Template id of AEX-141 tokens
          type: integer
        tx_hash:
          description: Transaction hash of the TemplateCreation
          $ref: '#/components/schemas/TransactionHash'
      required:
      - contract_id
      - log_idx
      - template_id
      - tx_hash
      title: Aex141TemplatesResponse
      type: object
    Aex141TokenDetailResponse:
      description: Response schema for AEX-141 token detail
      example:
        contract_id: ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV
        owner_id: ak_vTGaRAuGXPLhvNexrbzmHJ2MDv9JS2Ky7u2v469o6weaZ2Cgw
        token_id: 1
        metadata:
          map:
            description: CC
            media_type: IMAGE
            media_url: https://www.tierfreund.de/wp-content/uploads/2016/09/1.jpg
            minted: '1670241975288'
            name: test
      properties:
        contract_id:
          description: NFT contract id
          $ref: '#/components/schemas/ContractAddress'
        owner_id:
          $ref: '#/components/schemas/AccountAddress'
        token_id:
          description: Non-fungible token id
          type: integer
        metadata:
          description: The metadata associated to this NFT
          type: object
      required:
      - contract_id
      - owner_id
      - token_id
      - metadata
      title: Aex141OwnedTokenResponse
      type: object
    Aex141TokenResponse:
      description: Response Schema for owners of AEX-141 tokens
      example:
        contract_id: ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV
        owner_id: ak_vTGaRAuGXPLhvNexrbzmHJ2MDv9JS2Ky7u2v469o6weaZ2Cgw
        token_id: 1
      properties:
        contract_id:
          description: NFT contract id
          $ref: '#/components/schemas/ContractAddress'
        owner_id:
          $ref: '#/components/schemas/AccountAddress'
        token_id:
          description: Non-fungible token id
          type: integer
      required:
      - contract_id
      - account_id
      - token_id
      title: Aex141OwnedTokenResponse
      type: object
    Aex141TransferEvent:
      description: AEx141 Transfer
      type: object
      required:
      - block_height
      - contract_id
      - log_idx
      - micro_index
      - micro_time
      - recipient
      - sender
      - token_id
      - tx_hash
      properties:
        block_height:
          type: integer
          example: 653289
        contract_id:
          $ref: '#/components/schemas/ContractAddress'
        log_idx:
          type: integer
          example: 0
        micro_index:
          type: integer
          example: 125
        micro_time:
          type: integer
          example: 1662654259282
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        sender:
          $ref: '#/components/schemas/AccountAddress'
        token_id:
          type: integer
          example: 1
        tx_hash:
          $ref: '#/components/schemas/TransactionHash'
    Aex9BalanceResponse:
      description: Response Schema for AEX9 balance responses
      example:
        amount: 4.999999999990685e+25
        decimals: 18
        block_hash: kh_2QevaXY7ULF5kTLsddwMzzZmBYWPgfaQbg2Y8maZDLKJaPhwDJ
        contract_id: ct_RDRJC5EySx4TcLtGRWYrXfNgyWzEDzssThJYPd9kdLeS5ECaA
        height: 351666
        token_name: BBA
        token_symbol: BBA
        tx_hash: th_27V4UmRhyeSuPEDieXVuAdE3v42dDnLzPY6uism1bFhHCPfWKv
        tx_index: 10848881
        tx_type: contract_create_tx
      properties:
        amount:
          description: Amount of AEX9 token
          type: integer
        block_hash:
          description: Block hash, indicating a state of a balance for that block
          type: integer
        contract_id:
          description: Contract id of AEX9 token
          $ref: '#/components/schemas/ContractAddress'
        decimals:
          description: Number of decimals of AEX9 token
          type: integer
        height:
          description: Block height, indicating a state of a balance for that block height
          type: integer
        token_name:
          description: Name of AEX9 token
          type: string
        token_symbol:
          description: Symbol of AEX9 token
          type: string
        tx_hash:
          description: Transaction hash, indicating a state of a balance for that block height
          $ref: '#/components/schemas/TransactionHash'
        tx_index:
          description: Transaction index, indicating a state of a balance for that block height
          type: integer
        tx_type:
          description: Transaction type, indicating a state of a balance for that block height
          type: string
          enum:
          - ContractCreateTx
          - ContractCallTx
      required:
      - amount
      - block_hash
      - contract_id
      - decimals
      - height
      - token_name
      - token_symbol
      - tx_hash
      - tx_index
      - tx_type
      title: Response for AEX-9 account balance
      type: object
    Aex9ContractBalanceResponse:
      description: Response Schema for AEX9 contract balances responses
      example:
        account_id: ak_2MHJv6JcdcfpNvu4wRDZXWzq8QSxGbhUfhMLR7vUPzRFYsDFw6
        amount: 4050000000000
        contract_id: ct_RDRJC5EySx4TcLtGRWYrXfNgyWzEDzssThJYPd9kdLeS5ECaA
        block_hash: kh_bkyFuxj3W9yY8Tmuiq3KSCVHaTP3vMzHt4pZ6y1QcQEzyAf5i
        height: 618127
        last_tx_hash: th_KTTTudTgSAZrHJQVwW4AF6XD1ksQbpyHXWfgmL2kSGvNk14CU,
        last_log_idx: 1
      properties:
        account_id:
          description: The wallet pubkey
          $ref: '#/components/schemas/AccountAddress'
        amount:
          description: The balance amount
          type: integer
        block_hash:
          description: The block hash, indicating a state of a balance for that block
          type: integer
        contract_id:
          description: The contract id of given token
          type: integer
        height:
          description: The block height, indicating a state of a balance for that block height
          type: integer
        last_tx_hash:
          description: The hash of the last transaction that changed the balance
          $ref: '#/components/schemas/TransactionHash'
        last_log_idx:
          description: The index of the event log that changed the balance
          type: integer
      required:
      - account_id
      - amount
      - block_hash
      - contract_id
      - height
      - last_tx_hash
      - last_log_idx
      title: Response for AEX-9 contract balances
      type: object
    Aex9Response:
      description: Response Schema for AEX9 contract
      example:
        contract_id: ct_2TZsPKT5wyahqFrzp8YX7DfXQapQ4Qk65yn3sHbifU9Db9hoav
        contract_tx_hash: th_rbFNrRDpn6finytCEmHAExtBnRxt14yckvuCWRmXxsRpypHxt
        initial_supply: 1e+28
        event_supply: 0
        decimals: 18
        extensions:
        - mintable
        - burnable
        holders: 12
        name: testnetAE
        symbol: TTAE
        invalid: false
      properties:
        contract_id:
          description: Id of the contract of the AEX9 tokens
          $ref: '#/components/schemas/ContractAddress'
        contract_tx_hash:
          description: Transaction hash of the contract creation
          $ref: '#/components/schemas/TransactionHash'
        initial_supply:
          description: Token supply right after contract's creation
          type: integer
        event_supply:
          description: Token supply updated on event basis (Mint, Burn, Swap)
          type: integer
        decimals:
          description: The number of decimals for AEX9 token
          type: integer
        extensions:
          description: Extensions implemented by the contract
          type: array
          items:
            type: string
        holders:
          description: Count of accounts having balance (nil when contract is not complaint)
          type: integer
        name:
          description: Name of AEX9 token
          type: string
        symbol:
          description: Symbol of AEX9 token
          type: string
        invalid:
          description: True if the contract is invalid
          type: boolean
      required:
      - contract_id
      - contract_tx_hash
      - decimals
      - symbol
      - name
      - holders
      - initial_supply
      - event_supply
      - invalid
      title: Aex9Response
      type: object
    Aex9TransferEvent:
      description: AEx9 Transfer
      type: object
      required:
      - amount
      - block_height
      - contract_id
      - log_idx
      - micro_index
      - micro_time
      - recipient_id
      - sender_id
      - tx_hash
      properties:
        amount:
          type: integer
          example: 9975080
        block_height:
          type: integer
          example: 534443
        contract_id:
          $ref: '#/components/schemas/ContractAddress'
        log_idx:
          type: integer
          example: 0
        micro_index:
          type: integer
          example: 4
        micro_time:
          type: integer
          example: 1640350612991
        recipient_id:
          $ref: '#/components/schemas/AccountAddress'
        sender_id:
          $ref: '#/components/schemas/AccountAddress'
        tx_hash:
          $ref: '#/components/schemas/TransactionHash'
    Aex9TransferResponse:
      description: Response Schema for AEX9 transfer responses
      example:
        amount: 2
        block_height: 234208
        call_txi: 9564978
        contract_id: ct_pqfbS94uUpE8reSwgtaAy5odGi7cPRMAxbjMyEzpTGqwTWyn5
        log_idx: 0
        micro_time: 1585667337719
        recipient: ak_29GUBTrWTMb3tRUUgbVX1Bgwi2hyVhB8Q1befNsjLnP46Ub1V8
        sender: ak_2CMNYSgoEjb1GSVJfWXjZ9NFWwnJ9jySBd6YY7uyr5DxvwctZU
      properties:
        amount:
          description: Transfer amount of AEX9 token
          type: integer
        block_height:
          description: The block height
          type: integer
        call_txi:
          description: AEX9 token transfer index
          type: integer
        contract_id:
          $ref: '#/components/schemas/ContractAddress'
        log_idx:
          description: Log index
          type: integer
        micro_time:
          description: The unix timestamp
          type: integer
        recipient:
          description: Recipient of AEX9 transfer
          $ref: '#/components/schemas/AccountAddress'
        sender:
          description: Sender of AEX9 transfer
          $ref: '#/components/schemas/AccountAddress'
      required:
      - contract_id
      - micro_time
      - block_height
      - sender
      - recipient
      - log_idx
      - call_txi
      - amount
      title: Response for AEX9 transfers
      type: object
    Auction:
      description: Auction
      type: object
      required:
      - auction_end
      - activation_time
      - approximate_expire_time
      - last_bid
      - name
      - name_fee
      - claims_count
      properties:
        auction_end:
          type: integer
          example: 638002
        activation_time:
          type: integer
          example: 1687575562705
        approximate_expire_time:
          type: integer
          example: 1692935617598
        last_bid:
          type: object
          required:
          - block_hash
          - block_height
          - encoded_tx
          - hash
          - micro_index
          - micro_time
          - signatures
          - tx
          properties:
            block_hash:
              $ref: '#/components/schemas/MicroBlockHash'
            block_height:
              type: integer
              example: 608242
            encoded_tx:
              $ref: '#/components/schemas/TransactionEncoded'
            hash:
              $ref: '#/components/schemas/TransactionHash'
            micro_index:
              type: integer
              example: 2
            micro_time:
              type: integer
              example: 1687575562705
            signatures:
              type: array
              items:
                $ref: '#/components/schemas/Signature'
            tx:
              oneOf:
              - $ref: '#/components/schemas/NameClaimTx'
              - $ref: '#/components/schemas/ContractCallTx'
        name:
          $ref: '#/components/schemas/NameString'
        name_fee:
          type: integer
          example: 134626900000000000000
        claims_count:
          type: integer
          example: 3
    ByteArray:
      type: string
      example: ba_wAAAAKv2ZV4=
      pattern: ^ba_\w+$
    Channel:
      type: object
      required:
      - active
      - amount
      - channel
      - channel_reserve
      - delegate_ids
      - initiator
      - initiator_amount
      - last_updated_height
      - last_updated_tx_type
      - last_updated_time
      - last_updated_tx_hash
      - lock_period
      - locked_until
      - responder
      - responder_amount
      - round
      - solo_round
      - state_hash
      - updates_count
      properties:
        active:
          type: boolean
          description: Channel is active
          example: true
        amount:
          type: integer
          description: Balance currently left in the channel
          example: 20000000000001
        channel:
          $ref: '#/components/schemas/ChannelId'
        channel_reserve:
          type: integer
          description: Minimum amount for sufficient funds
          example: 500000000000000000
        delegate_ids:
          type: object
          description: Pubkeys of delegated accounts
          example:
            initiator: []
            responder: []
        initiator:
          description: Channel initiator pubkey
          $ref: '#/components/schemas/AccountAddress'
        initiator_amount:
          type: integer
          description: Amount owned by initiator
          example: 4500000000000000000
        last_updated_height:
          type: integer
          description: The last height in which the channel was updated on chain
          example: 141956
        last_updated_tx_type:
          type: string
          enum:
          - ChannelCloseSoloTx
          - ChannelCloseMutualTx
          - ChannelCreateTx
          - ChannelDepositTx
          - ChannelForceProgressTx
          - ChannelSetDelegatesTx
          - ChannelSettleTx
          - ChannelSlashTx
          - ChannelSnapshotSoloTx
          - ChannelWithdrawTx
          - ChannelOffChainTx
          description: The transaction type of the last transaction that updated the channel
          example: ChannelDepositTx
        last_updated_time:
          type: integer
          description: The block time in which the channel was last updated
          example: 1587577771376
        last_updated_tx_hash:
          description: The hash of the last transaction that updated the channel
          $ref: '#/components/schemas/TransactionHash'
        lock_period:
          description: Amount of heights locked after a solo closing
          example: 10
          type: integer
        locked_until:
          description: Non-inclusive height until which the channel is locked
          example: 712001
          type: integer
        responder:
          description: The channel responder pubkey
          $ref: '#/components/schemas/AccountAddress'
        responder_amount:
          type: integer
          description: Amount owned by responder
          example: 4500000000000000000
        round:
          type: integer
          description: Round after last transaction
          example: 1
        solo_round:
          type: integer
          description: Round of last solo transaction
          example: 0
        state_hash:
          type: string
          description: The hash of the current channel state
          example: st_Wwxms0IVM7PPCHpeOXWeeZZm8h5p/SuqZL7IHIbr3CqtlCL+
          pattern: ^st_\w+$
        updates_count:
          type: integer
          description: The amount of times the channel's been updated by any of the channel transactions
          example: 2
    ChannelId:
      type: string
      pattern: ^ch_\w{38,50}$
      example: ch_2VfzXmCRZepB3ichPf3WTt2uf8zMqsyY3cZWg8k1vt3xcu8L8V
    ChannelResponderInitiator:
      type: object
      required:
      - responder_id
      - initiator_id
      properties:
        initiator_id:
          $ref: '#/components/schemas/AccountAddress'
        responder_id:
          $ref: '#/components/schemas/AccountAddress'
    ChannelResponderInitiatorRound:
      type: object
      allOf:
      - $ref: '#/components/schemas/ChannelResponderInitiator'
      - type: object
        required:
        - round
        properties:
          round:
            type: integer
    Config:
      description: The hyperchains config file (aeternity.yaml)
      type: object
      properties:
        consensus:
          type: array
          items:
            type: object
            description: This is the consensus part of the configuration
        fork_management:
          type: object
          properties:
            network_id:
              type: string
        hard_forks:
          type: object
          properties:
            protocol_number:
              type: object
              properties:
                height:
                  type: integer
                accounts_file:
                  type: string
                  nullable: true
                contracts_file:
                  type: string
                  nullable: true
      example:
        consensus:
          child_block_time: 3000
          child_epoch_length: 600
          consensus_key: '0'
          contract_owner: ak_11111111111111111111111111111115rHyByZ
          default_pinning_behavior: true
          election_contract: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
          fixed_coinbase: 100
          parent_chain:
            consensus:
              network_id: devnet
              type: AE2AE
            parent_epoch_length: 10,
            polling:
              fetch_interval: 500
              nodes:
              - http://localhost:13013
            start_height: 10
          pinning_reward_value: 1000
          rewards_contract: ct_KJgjAXMtRF68AbT5A2aC9fTk8PA4WFv26cFSY27fXs6FtYQHK
          staking_contract: ct_KJgjAXMtRF68AbT5A2aC9fTk8PA4WFv26cFSY27fXs6FtYQHK
        fork_management:
          network_id: hc_devnet
        hard_forks:
          '6': 0
    Contract:
      description: Contract creation info
      type: object
      required:
      - aexn_type
      - block_hash
      - contract
      - source_tx_hash
      - source_tx_type
      - create_tx
      properties:
        aexn_type:
          type: string
          nullable: true
          example: aex9
        block_hash:
          $ref: '#/components/schemas/MicroBlockHash'
        contract:
          $ref: '#/components/schemas/ContractAddress'
        source_tx_hash:
          $ref: '#/components/schemas/TransactionHash'
        source_tx_type:
          description: Contract source transaction type
          example: ContractCreateTx
          type: string
          enum:
          - ContractCreateTx
          - GaAttachTx
          - PayingForTx
        create_tx:
          type: object
          oneOf:
          - $ref: '#/components/schemas/ContractCreateTx'
          - $ref: '#/components/schemas/GAAttachTx'
          example:
            abi_version: 3
            call_data: cb_+Q==
            code: cb_+QrfRgOgbAwsRHU
            deposit: 0
            fee: 13276000000000
            gas: 200000
            gas_price: 1000000000
            nonce: 66
            owner_id: ak_7wqP18AHzyoqymwGaqQp8G2UpzBCggYiq7CZdJiB71VUsLpR4
            ttl: 0
            vm_version: 5
    ContractAddress:
      description: Contract address
      type: string
      example: ct_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch
      pattern: ^ct_\w{38,50}$
    ContractBytearray:
      description: Contract bytearray
      type: string
      example: cb_AAAAAfy4hFE=
      pattern: ^cb_\w+$
    ContractCall:
      description: ContractCall
      type: object
      required:
      - block_hash
      - call_tx_hash
      - contract_id
      - contract_tx_hash
      - function
      - height
      - internal_tx
      - local_idx
      - micro_index
      properties:
        block_hash:
          $ref: '#/components/schemas/MicroBlockHash'
        call_tx_hash:
          $ref: '#/components/schemas/TransactionHash'
        contract_id:
          $ref: '#/components/schemas/ContractAddress'
        contract_tx_hash:
          $ref: '#/components/schemas/TransactionHash'
        function:
          type: string
          example: Oracle.query
        height:
          type: integer
          example: 608269
        internal_tx:
          type: object
          $ref: '#/components/schemas/ContractInternalTx'
          example:
            fee: 0
            nonce: 0
            oracle_id: ok_4HGhEdjeRtpsWzfSEJZnBKNmjgHALAifcBUey8EvRAdDfRsqc
            query: YWtfdVRXZWdwZk42VWpBNHl6OFg0WlZSaTl4S0VZZVhISkRSWmNScnlUc1JIQUZvQnBMYTtodHRwczovL21haWwuZ29vZ2xlLmNvbS9tYWlsL3UvMC8jaW5ib3g=
            query_fee: 20000000000000
            query_id: oq_2T4mYmjcyinbfYyHyDq6FfPXHChf5mYPEXgza9vHAukuq2EEHj
            query_ttl:
              type: delta
              value: 20
            response_ttl:
              type: delta
              value: 20
            sender_id: ak_7wqP18AHzyoqymwGaqQp8G2UpzBCggYiq7CZdJiB71VUsLpR4
            type: OracleQueryTx
            version: 1
        local_idx:
          type: integer
          example: 0
        micro_index:
          type: integer
          example: 2
    ContractInternalTx:
      description: Contract internal transaction
      type: object
      oneOf:
      - $ref: '#/components/schemas/ContractCreateTx'
      - $ref: '#/components/schemas/NameClaimTx'
      - $ref: '#/components/schemas/NamePreclaimTx'
      - $ref: '#/components/schemas/NameUpdateTx'
      - $ref: '#/components/schemas/NameTransferTx'
      - $ref: '#/components/schemas/OracleExtendTx'
      - $ref: '#/components/schemas/OracleQueryTx'
      - $ref: '#/components/schemas/OracleRegisterTx'
      - $ref: '#/components/schemas/OracleRespondTx'
      - $ref: '#/components/schemas/SpendTx'
    ContractLog:
      description: ContractLog
      type: object
      required:
      - args
      - block_hash
      - block_time
      - call_tx_hash
      - contract_id
      - contract_tx_hash
      - data
      - event_hash
      - event_name
      - ext_caller_contract_id
      - ext_caller_contract_tx_hash
      - height
      - log_idx
      - micro_index
      - parent_contract_id
      properties:
        args:
          type: array
          items:
            type: string
          example:
          - 57632170077998225994387431184384351560267542170559996321319244663568556637966
          - 70455690283454580784062717387189552611484838031419336802117080415662207780030
          - 1050376320000000000
        block_hash:
          $ref: '#/components/schemas/MicroBlockHash'
        block_time:
          type: integer
          example: 1615820000000
        call_tx_hash:
          $ref: '#/components/schemas/TransactionHash'
        contract_id:
          $ref: '#/components/schemas/ContractAddress'
        contract_tx_hash:
          $ref: '#/components/schemas/TransactionHash'
        data:
          type: string
          example: ''
        event_hash:
          type: string
          example: 48U3JOKTVTI6FVMTK2BLHM8NG72JEBG93VS6MENPSC8E71IM5FNG====
        event_name:
          type: string
          example: Transfer
          nullable: true
        ext_caller_contract_id:
          nullable: true
          $ref: '#/components/schemas/ContractAddress'
        ext_caller_contract_tx_hash:
          nullable: true
          $ref: '#/components/schemas/TransactionHash'
        height:
          type: integer
          example: 609854
        log_idx:
          type: integer
          example: 0
        micro_index:
          type: integer
          example: 15
        parent_contract_id:
          type: integer
          nullable: true
          example: null
    Delegate:
      description: Delegate information
      type: object
      properties:
        epoch:
          type: integer
          example: 1
        delegate:
          type: string
          example: ak_1111111111111111111111111111111111111111111111111
        stake:
          type: integer
          example: 1000000000000000000
        validator:
          type: string
          example: ak_1111111111111111111111111111111111111111111111111
      required:
      - epoch
      - delegate
      - stake
      - validator
    DeltaStat:
      description: DeltaStat
      type: object
      required:
      - height
      - auctions_started
      - block_reward
      - burned_in_auctions
      - channels_closed
      - channels_opened
      - contracts_created
      - dev_reward
      - names_activated
      - names_expired
      - names_revoked
      - oracles_expired
      - oracles_registered
      - last_tx_hash
      - locked_in_auctions
      - locked_in_channels
      properties:
        height:
          description: The generation
          type: integer
        auctions_started:
          description: The number of auctions started
          type: integer
        block_reward:
          description: The block reward
          type: integer
        burned_in_a

# --- truncated at 32 KB (219 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aeternity/refs/heads/main/openapi/aeternity-middleware-openapi.yml