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  class Transaction final : public interface::Transaction {
15  public:
17 
18  explicit Transaction(const TransportType &transaction);
19 
20  explicit Transaction(TransportType &&transaction);
21 
22  explicit Transaction(TransportType &transaction);
23 
24  Transaction(const Transaction &transaction);
25 
26  Transaction(Transaction &&o) noexcept;
27 
28  ~Transaction() override;
29 
30  const interface::types::AccountIdType &creatorAccountId() const override;
31 
32  Transaction::CommandsType commands() const override;
33 
34  const interface::types::BlobType &blob() const override;
35 
36  const interface::types::BlobType &payload() const override;
37 
38  const interface::types::BlobType &reducedPayload() const override;
39 
41 
42  const interface::types::HashType &reducedHash() const override;
43 
44  bool addSignature(
45  interface::types::SignedHexStringView signed_blob,
46  interface::types::PublicKeyHexStringView public_key) override;
47 
48  const interface::types::HashType &hash() const override;
49 
50  std::unique_ptr<interface::Transaction> moveTo() override;
51 
52  const TransportType &getTransport() const;
53 
55 
56  interface::types::QuorumType quorum() const override;
57 
58  std::optional<std::shared_ptr<interface::BatchMeta>> batchMeta()
59  const override;
60 
61  protected:
62  Transaction::ModelType *clone() const override;
63 
64  private:
65  struct Impl;
66  std::unique_ptr<Impl> impl_;
67  };
68  } // namespace proto
69 } // namespace shared_model
70 
71 #endif // IROHA_SHARED_MODEL_PROTO_TRANSACTION_HPP
Transaction(const TransportType &transaction)
Definition: transaction.cpp:68
std::optional< std::shared_ptr< interface::BatchMeta > > batchMeta() const override
Definition: transaction.cpp:167
Definition: hash.hpp:18
Definition: transaction.hpp:14
Definition: blob.hpp:27
const interface::types::HashType & hash() const override
Definition: transaction.cpp:150
interface::types::TimestampType createdTime() const override
Definition: transaction.cpp:158
Transaction::CommandsType commands() const override
Definition: transaction.cpp:95
boost::any_range< Command, boost::random_access_traversal_tag, const Command & > CommandsType
Type of ordered collection of commands.
Definition: transaction.hpp:39
const interface::types::AccountIdType & creatorAccountId() const override
Definition: transaction.cpp:90
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
const interface::types::BlobType & blob() const override
Definition: transaction.cpp:99
bool addSignature(interface::types::SignedHexStringView signed_blob, interface::types::PublicKeyHexStringView public_key) override
Definition: transaction.cpp:119
Transaction::ModelType * clone() const override
Definition: transaction.cpp:175
interface::types::SignatureRangeType signatures() const override
Definition: transaction.cpp:111
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
const interface::types::BlobType & payload() const override
Definition: transaction.cpp:103
std::unique_ptr< interface::Transaction > moveTo() override
Definition: transaction.cpp:171
const TransportType & getTransport() const
Definition: transaction.cpp:154
Definition: command_executor.hpp:12
const interface::types::HashType & reducedHash() const override
Definition: transaction.cpp:115
const interface::types::BlobType & reducedPayload() const override
Definition: transaction.cpp:107
uint16_t QuorumType
Type of Quorum used in transaction and set quorum.
Definition: types.hpp:65
Definition: transaction.hpp:23
iroha::protocol::Transaction TransportType
Definition: transaction.hpp:16
interface::types::QuorumType quorum() const override
Definition: transaction.cpp:162
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:67