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 
12 #include "queries.pb.h"
13 
14 namespace shared_model {
15  namespace proto {
16  class BlocksQuery FINAL : public CopyableProto<interface::BlocksQuery,
17  iroha::protocol::BlocksQuery,
18  BlocksQuery> {
19  public:
20  template <typename BlocksQueryType>
21  explicit BlocksQuery(BlocksQueryType &&query);
22 
23  BlocksQuery(const BlocksQuery &o);
24 
25  BlocksQuery(BlocksQuery &&o) noexcept;
26 
27  const interface::types::AccountIdType &creatorAccountId() const override;
28 
29  interface::types::CounterType queryCounter() const override;
30 
31  const interface::types::BlobType &blob() const override;
32 
33  const interface::types::BlobType &payload() const override;
34 
35  // ------------------------| Signable override |-------------------------
36  interface::types::SignatureRangeType signatures() const override;
37 
38  bool addSignature(const crypto::Signed &signed_blob,
39  const crypto::PublicKey &public_key) override;
40 
41  interface::types::TimestampType createdTime() const override;
42 
43  private:
44  // ------------------------------| fields |-------------------------------
45  const interface::types::BlobType blob_;
46 
47  const interface::types::BlobType payload_;
48 
49  SignatureSetType<proto::Signature> signatures_;
50  };
51  } // namespace proto
52 } // namespace shared_model
53 
54 #endif // IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
Definition: blob.hpp:24
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:37
Definition: signed.hpp:17
uint64_t CounterType
Type of counter.
Definition: types.hpp:65
Definition: public_key.hpp:16
Definition: command_executor.hpp:12
Definition: trivial_proto.hpp:45
Definition: proto_blocks_query.hpp:16
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:61