hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
wsv_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_WSV_QUERY_HPP
7 #define IROHA_WSV_QUERY_HPP
8 
9 #include <vector>
10 
11 #include <boost/optional.hpp>
12 #include "common/result.hpp"
15 
16 namespace iroha {
17  struct TopBlockInfo;
18 
19  namespace ametsuchi {
23  class WsvQuery {
24  public:
25  virtual ~WsvQuery() = default;
26 
32  virtual boost::optional<std::vector<std::string>> getSignatories(
33  const shared_model::interface::types::AccountIdType &account_id) = 0;
34 
39  virtual boost::optional<
40  std::vector<std::shared_ptr<shared_model::interface::Peer>>>
41  getPeers() = 0;
42 
47  virtual boost::optional<std::shared_ptr<shared_model::interface::Peer>>
48  getPeerByPublicKey(shared_model::interface::types::PublicKeyHexStringView
49  public_key) = 0;
50 
53  getTopBlockInfo() const = 0;
54  };
55 
56  } // namespace ametsuchi
57 } // namespace iroha
58 
59 #endif // IROHA_WSV_QUERY_HPP
virtual boost::optional< std::shared_ptr< shared_model::interface::Peer > > getPeerByPublicKey(shared_model::interface::types::PublicKeyHexStringView public_key)=0
Definition: result_fwd.hpp:27
virtual ~WsvQuery()=default
Definition: block_query.hpp:15
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
virtual boost::optional< std::vector< std::string > > getSignatories(const shared_model::interface::types::AccountIdType &account_id)=0
Definition: wsv_query.hpp:23
virtual iroha::expected::Result< iroha::TopBlockInfo, std::string > getTopBlockInfo() const =0
Get top block info from ledger state.
virtual boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > getPeers()=0