hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_blocks_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
7 #define IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
8 
10 
12 #include "queries.pb.h"
13 
14 namespace shared_model {
15  namespace proto {
16  class BlocksQuery final : public interface::BlocksQuery {
17  public:
18  using TransportType = iroha::protocol::BlocksQuery;
19 
20  explicit BlocksQuery(const TransportType &query);
21  explicit BlocksQuery(TransportType &&query);
22 
23  const interface::types::AccountIdType &creatorAccountId() const override;
24 
26 
27  const interface::types::BlobType &blob() const override;
28 
29  const interface::types::BlobType &payload() const override;
30 
31  // ------------------------| Signable override |-------------------------
33 
34  bool addSignature(
35  interface::types::SignedHexStringView signed_blob,
36  interface::types::PublicKeyHexStringView public_key) override;
37 
38  const interface::types::HashType &hash() const override;
39 
41 
42  const TransportType &getTransport() const;
43 
44  private:
45  // ------------------------------| fields |-------------------------------
46  TransportType proto_;
47 
49 
50  const interface::types::BlobType payload_;
51 
52  SignatureSetType<proto::Signature> signatures_;
53 
55  };
56  } // namespace proto
57 } // namespace shared_model
58 
59 #endif // IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
interface::types::CounterType queryCounter() const override
Definition: proto_blocks_query.cpp:34
Definition: hash.hpp:18
Definition: blob.hpp:27
Definition: blocks_query.hpp:20
const interface::types::HashType & hash() const override
Definition: proto_blocks_query.cpp:69
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
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
const interface::types::BlobType & payload() const override
Definition: proto_blocks_query.cpp:42
interface::types::TimestampType createdTime() const override
Definition: proto_blocks_query.cpp:73
interface::types::SignatureRangeType signatures() const override
Definition: proto_blocks_query.cpp:46
const interface::types::AccountIdType & creatorAccountId() const override
Definition: proto_blocks_query.cpp:29
uint64_t CounterType
Type of counter.
Definition: types.hpp:69
const TransportType & getTransport() const
Definition: proto_blocks_query.cpp:77
Definition: command_executor.hpp:12
BlocksQuery(const TransportType &query)
Definition: proto_blocks_query.cpp:13
Definition: proto_blocks_query.hpp:16
const interface::types::BlobType & blob() const override
Definition: proto_blocks_query.cpp:38
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:67
iroha::protocol::BlocksQuery TransportType
Definition: proto_blocks_query.hpp:18
bool addSignature(interface::types::SignedHexStringView signed_blob, interface::types::PublicKeyHexStringView public_key) override
Definition: proto_blocks_query.cpp:50