- name: request_send_tx
  type: input
  fields:
    - name: tx
      type: transaction
    - name: wallet
      type: wallet_info
    - name: token
      type: string
    - name: commit
      type: boolean


- name: response_send_tx
  type: output
  fields:
    - name: code
      type: status_code
    - name: hash
      type: string


- name: request_get_tx
  type: input
  fields:
    - name: hash
      type: string


- name: response_get_tx
  type: output
  fields:
    - name: code
      type: status_code
    - name: info
      type: transaction_info


- name: request_get_block
  type: input
  fields:
    - name: height
      type: string


- name: response_get_block
  type: output
  fields:
    - name: code
      type: status_code
    - name: block
      type: block_info


- name: request_get_blocks
  type: input
  fields:
    - name: paging
      type: page_input
    - name: height_filter
      type: range_filter
    - name: empty_excluded
      type: boolean


- name: response_get_blocks
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: blocks
      type: [block_info_simple]


- name: request_get_account_state
  type: input
  fields:
    - name: address
      type: string
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_account_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: account_state


- name: request_get_asset_state
  type: input
  fields:
    - name: address
      type: string
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_asset_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: asset_state


- name: request_get_protocol_state
  type: input
  fields:
    - name: address
      type: string
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_protocol_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: protocol_state


- name: request_get_stake_state
  type: input
  fields:
    - name: address
      type: string
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_stake_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: stake_state


- name: request_get_forge_state
  type: input
  fields:
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_forge_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: forge_state


- name: request_get_tether_state
  type: input
  fields:
    - name: address
      type: string
    - name: keys
      type: [string]
    - name: height
      type: string


- name: response_get_tether_state
  type: output
  fields:
    - name: code
      type: status_code
    - name: state
      type: tether_state


- name: request_get_chain_info
  type: input
  fields: []

- name: response_get_chain_info
  type: output
  fields:
    - name: code
      type: status_code
    - name: info
      type: chain_info


- name: request_get_node_info
  type: input
  fields: []

- name: response_get_node_info
  type: output
  fields:
    - name: code
      type: status_code
    - name: info
      type: node_info


- name: request_get_unconfirmed_txs
  type: input
  fields:
    - name: paging
      type: page_input


- name: response_get_unconfirmed_txs
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: unconfirmed_txs
      type: unconfirmed_txs


- name: request_get_net_info
  type: input
  fields: []

- name: response_get_net_info
  type: output
  fields:
    - name: code
      type: status_code
    - name: net_info
      type: net_info


- name: request_get_validators_info
  type: input
  fields: []

- name: response_get_validators_info
  type: output
  fields:
    - name: code
      type: status_code
    - name: validators_info
      type: validators_info


- name: request_subscribe
  type: input
  fields:
    - name: topic
      type: string
    - name: filter
      type: string


- name: response_subscribe
  type: output
  fields:
    - name: code
      type: status_code
    - name: topic
      type: string
    - name: transfer
      type: transaction
    - name: account_migrate
      type: transaction
    - name: confirm
      type: transaction
    - name: create_asset
      type: transaction
    - name: exchange
      type: transaction
    - name: revoke
      type: transaction
    - name: begin_block
      type: request_begin_block
    - name: end_block
      type: request_end_block
    - name: declare
      type: transaction
    - name: update_asset
      type: transaction
    - name: consensus_upgrade
      type: transaction
    - name: declare_file
      type: transaction
    - name: sys_upgrade
      type: transaction
    - name: stake
      type: transaction
    - name: account_state
      type: account_state
    - name: asset_state
      type: asset_state
    - name: forge_state
      type: forge_state
    - name: stake_state
      type: stake_state
    - name: protocol_state
      type: protocol_state


- name: request_unsubscribe
  type: input
  fields:
    - name: topic
      type: string


- name: response_unsubscribe
  type: output
  fields:
    - name: code
      type: status_code


- name: request_get_config
  type: input
  fields: []

- name: response_get_config
  type: output
  fields:
    - name: code
      type: status_code
    - name: config
      type: string


- name: by_day
  type: output
  fields:
    - name: start_date
      type: string
    - name: end_date
      type: string


- name: by_hour
  type: output
  fields:
    - name: date
      type: string


- name: request_get_forge_stats
  type: input
  fields:
    - name: day_info
      type: by_day
    - name: date
      type: by_hour


- name: response_get_forge_stats
  type: output
  fields:
    - name: code
      type: status_code
    - name: forge_stats
      type: forge_stats


- name: request_list_transactions
  type: input
  fields:
    - name: paging
      type: page_input
    - name: time_filter
      type: time_filter
    - name: address_filter
      type: address_filter
    - name: type_filter
      type: type_filter
    - name: validity_filter
      type: validity_filter


- name: response_list_transactions
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: transactions
      type: [indexed_transaction]


- name: request_list_assets
  type: input
  fields:
    - name: paging
      type: page_input
    - name: owner_address
      type: string


- name: response_list_assets
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: assets
      type: [indexed_asset_state]


- name: request_list_stakes
  type: input
  fields:
    - name: paging
      type: page_input
    - name: address_filter
      type: address_filter


- name: response_list_stakes
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: stakes
      type: [indexed_stake_state]


- name: request_list_top_accounts
  type: input
  fields:
    - name: paging
      type: page_input


- name: response_list_top_accounts
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: accounts
      type: [indexed_account_state]


- name: request_list_asset_transactions
  type: input
  fields:
    - name: paging
      type: page_input
    - name: address
      type: string


- name: response_list_asset_transactions
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: transactions
      type: [indexed_transaction]


- name: request_list_blocks
  type: input
  fields:
    - name: paging
      type: page_input
    - name: proposer
      type: string
    - name: time_filter
      type: time_filter
    - name: height_filter
      type: range_filter
    - name: num_txs_filter
      type: range_filter
    - name: num_invalid_txs_filter
      type: range_filter


- name: response_list_blocks
  type: output
  fields:
    - name: code
      type: status_code
    - name: page
      type: page_info
    - name: blocks
      type: [indexed_block]


- name: request_get_health_status
  type: input
  fields: []

- name: response_get_health_status
  type: output
  fields:
    - name: code
      type: status_code
    - name: health_status
      type: health_status

