hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transaction.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_TRANSACTION_HPP
7 #define IROHA_SHARED_MODEL_TRANSACTION_HPP
8 
11 
12 namespace shared_model {
13  namespace interface {
14 
15  class BatchMeta;
16  class Command;
17 
22  class Transaction : public Signable<Transaction> {
23  public:
27  virtual const types::AccountIdType &creatorAccountId() const = 0;
28 
32  virtual types::QuorumType quorum() const = 0;
33 
35  using CommandsType = boost::any_range<Command,
36  boost::random_access_traversal_tag,
37  const Command &>;
38 
42  virtual CommandsType commands() const = 0;
43 
47  virtual const types::BlobType &reducedPayload() const = 0;
48 
49  // TODO [IR-1874] Akvinikym 16.11.18: rename the field
53  virtual const types::HashType &reducedHash() const = 0;
54 
55  /*
56  * @return Batch Meta if exists
57  */
58  virtual boost::optional<std::shared_ptr<BatchMeta>> batchMeta() const = 0;
59 
60  std::string toString() const override;
61  };
62 
63  } // namespace interface
64 } // namespace shared_model
65 #endif // IROHA_SHARED_MODEL_TRANSACTION_HPP
Definition: hash.hpp:18
virtual const types::BlobType & reducedPayload() const =0
Definition: blob.hpp:24
virtual types::QuorumType quorum() const =0
Definition: signable.hpp:35
boost::any_range< Command, boost::random_access_traversal_tag, const Command & > CommandsType
Type of ordered collection of commands.
Definition: transaction.hpp:37
std::string AccountIdType
Type of account id.
Definition: types.hpp:37
virtual const types::HashType & reducedHash() const =0
virtual CommandsType commands() const =0
Definition: command.hpp:37
std::string toString() const override
Definition: transaction.cpp:15
virtual boost::optional< std::shared_ptr< BatchMeta > > batchMeta() const =0
virtual const types::AccountIdType & creatorAccountId() const =0
Definition: command_executor.hpp:12
uint16_t QuorumType
Type of Quorum used in transaction and set quorum.
Definition: types.hpp:59
Definition: transaction.hpp:22