{
  "type": "object",
  "title": "RosettaOperation",
  "description": "Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction.",
  "required": ["operation_identifier", "type"],
  "properties": {
    "operation_identifier": {
      "description": "The operation_identifier uniquely identifies an operation within a transaction.",
      "$ref": "./rosetta-operation-identifier.schema.json"
    },
    "related_operations": {
      "type": "array",
      "description": "Restrict referenced related_operations to identifier indexes < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree.",
      "items": {
        "$ref": "./rosetta-related-operation.schema.json"
      }
    },
    "type": {
      "type": "string",
      "description": "The network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkStatus. This can be very useful to downstream consumers that parse all block data."
    },
    "status": {
      "type": "string",
      "description": "The network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply. Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation."
    },
    "account": {
      "$ref": "./../../entities/rosetta/rosetta-account.schema.json"
    },
    "amount": {
      "$ref": "./../../entities/rosetta/rosetta-amount.schema.json"
    },
    "coin_change": {
      "$ref": "./rosetta-coin-change.schema.json"
    },
    "metadata": {
      "type": "object",
      "description": "Operations Meta Data"
    }
  }
}
