---
name: tac
author: fetchai
version: 0.1.0
license: Apache-2.0
description: 'A protocol for participating in a TAC.'
speech_acts:
  register:
    agent_name: pt:str
  unregister: {}
  transaction:
    tx_id: pt:str
    tx_sender_addr: pt:str
    tx_counterparty_addr: pt:str
    amount_by_currency_id: pt:dict[pt:str, pt:int]
    tx_sender_fee: pt:int
    tx_counterparty_fee: pt:int
    quantities_by_good_id: pt:dict[pt:str, pt:int]
    tx_nonce: pt:int
    tx_sender_signature: pt:bytes
    tx_counterparty_signature: pt:bytes
  get_state_update: {}
  cancelled: {}
  game_data:
    amount_by_currency_id: pt:dict[pt:str, pt:int]
    exchange_params_by_currency_id: pt:dict[pt:str, pt:float]
    quantities_by_good_id: pt:dict[pt:str, pt:int]
    utility_params_by_good_id: pt:dict[pt:str, pt:float]
    tx_fee: pt:int
    agent_addr_to_name: pt:dict[pt:str, pt:str]
    good_id_to_name: pt:dict[pt:str, pt:str]
    version_id: pt:str
  transaction_confirmation:
    tx_id: pt:str
    amount_by_currency_id: pt:dict[pt:str, pt:int]
    quantities_by_good_id: pt:dict[pt:str, pt:int]
  tac_error:
    error_code: ct:ErrorCode
    info: pt:dict[pt:str, ct:ErrorInfo]
...
---
ct:ErrorCode: |
  enum ErrorCodeEnum {
    GENERIC_ERROR = 0;
    REQUEST_NOT_VALID = 1;
    AGENT_ADDR_ALREADY_REGISTERED = 2;
    AGENT_NAME_ALREADY_REGISTERED = 3;
    AGENT_NOT_REGISTERED = 4;
    TRANSACTION_NOT_VALID = 5;
    TRANSACTION_NOT_MATCHING = 6;
    AGENT_NAME_NOT_IN_WHITELIST = 7;
    COMPETITION_NOT_RUNNING = 8;
    DIALOGUE_INCONSISTENT = 9;
  }
  ErrorCodeEnum error_code = 1;
ct:ErrorInfo: |
  map<string, string> error_info = 1;
...
