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_PROTO_TRANSACTION_HPP
7 #define IROHA_SHARED_MODEL_PROTO_TRANSACTION_HPP
8 
10 #include "transaction.pb.h"
11 
12 namespace shared_model {
13  namespace proto {
14 
15  class Transaction FINAL : public interface::Transaction {
16  public:
18 
19  explicit Transaction(const TransportType &transaction);
20 
21  explicit Transaction(TransportType &&transaction);
22 
23  Transaction(const Transaction &transaction);
24 
25  Transaction(Transaction &&o) noexcept;
26 
27  ~Transaction() override;
28 
29  const interface::types::AccountIdType &creatorAccountId() const override;
30 
31  Transaction::CommandsType commands() const override;
32 
33  const interface::types::BlobType &blob() const override;
34 
35  const interface::types::BlobType &payload() const override;
36 
37  const interface::types::BlobType &reducedPayload() const override;
38 
39  interface::types::SignatureRangeType signatures() const override;
40 
41  const interface::types::HashType &reducedHash() const override;
42 
43  bool addSignature(const crypto::Signed &signed_blob,
44  const crypto::PublicKey &public_key) override;
45 
46  const TransportType &getTransport() const;
47 
48  interface::types::TimestampType createdTime() const override;
49 
50  interface::types::QuorumType quorum() const override;
51 
52  boost::optional<std::shared_ptr<interface::BatchMeta>> batchMeta()
53  const override;
54 
55  protected:
56  Transaction::ModelType *clone() const override;
57 
58  private:
59  struct Impl;
60  std::unique_ptr<Impl> impl_;
61  };
62  } // namespace proto
63 } // namespace shared_model
64 
65 #endif // IROHA_SHARED_MODEL_PROTO_TRANSACTION_HPP
Definition: hash.hpp:18
Definition: default_constructible_unary_fn.hpp:23
Definition: blob.hpp:24
std::unique_ptr< T > clone(const T &object)
Definition: cloneable.hpp:39
boost::any_range< Command, boost::random_access_traversal_tag, const Command & > CommandsType
Type of ordered collection of commands.
Definition: transaction.hpp:37
Definition: peer.hpp:48
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
#define FINAL
Definition: swig_keyword_hider.hpp:17
Definition: query_payload_meta.hpp:19
std::string AccountIdType
Type of account id.
Definition: types.hpp:37
Definition: range_types.hpp:19
Definition: command_executor.hpp:12
iroha::protocol::Query TransportType
Definition: proto_query.hpp:18
uint16_t QuorumType
Type of Quorum used in transaction and set quorum.
Definition: types.hpp:59
Definition: batch_meta.hpp:18
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:61