{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "rosetta-account-response",
  "type": "object",
  "title": "RosettaAccountBalanceResponse",
  "description": "An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier.",
  "required": ["block_identifier", "balances"],
  "properties": {
    "block_identifier": {
      "$ref": "./../../entities/rosetta/rosetta-block-identifier.schema.json"
    },
    "balances": {
      "type": "array",
      "description": "A single account balance may have multiple currencies",
      "items": {
        "$ref": "./../../entities/rosetta/rosetta-amount.schema.json"
      }
    },
    "coins": {
      "type": "array",
      "description": "If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs.",
      "items": {
        "$ref": "./../../entities/rosetta/rosetta-coin.schema.json"
      }
    },
    "metadata": {
      "type": "object",
      "description": "Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.",
      "required": ["sequence_number"],
      "properties": {
        "sequence_number": {
          "type": "integer"
        }
      }
    }
  }
}
