hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ametsuchi::WsvQuery Class Referenceabstract

#include "wsv_query.hpp"

Inheritance diagram for iroha::ametsuchi::WsvQuery:
Inheritance graph
Collaboration diagram for iroha::ametsuchi::WsvQuery:
Collaboration graph

Public Member Functions

virtual ~WsvQuery ()=default
 
virtual boost::optional< std::vector< std::string > > getSignatories (const shared_model::interface::types::AccountIdType &account_id)=0
 
virtual boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > getPeers ()=0
 
virtual boost::optional< std::shared_ptr< shared_model::interface::Peer > > getPeerByPublicKey (shared_model::interface::types::PublicKeyHexStringView public_key)=0
 
virtual iroha::expected::Result< iroha::TopBlockInfo, std::string > getTopBlockInfo () const =0
 Get top block info from ledger state. More...
 

Detailed Description

Public interface for world state view queries

Constructor & Destructor Documentation

◆ ~WsvQuery()

virtual iroha::ametsuchi::WsvQuery::~WsvQuery ( )
virtualdefault

Member Function Documentation

◆ getPeerByPublicKey()

virtual boost::optional<std::shared_ptr<shared_model::interface::Peer> > iroha::ametsuchi::WsvQuery::getPeerByPublicKey ( shared_model::interface::types::PublicKeyHexStringView  public_key)
pure virtual

Fetch peer with given public key from ledger

Returns
the peer if found, none otherwise

Implemented in iroha::ametsuchi::PostgresWsvQuery.

◆ getPeers()

virtual boost::optional< std::vector<std::shared_ptr<shared_model::interface::Peer> > > iroha::ametsuchi::WsvQuery::getPeers ( )
pure virtual

Fetch peers stored in ledger

Returns
list of peers in insertion to ledger order

Implemented in iroha::ametsuchi::PostgresWsvQuery.

◆ getSignatories()

virtual boost::optional<std::vector<std::string> > iroha::ametsuchi::WsvQuery::getSignatories ( const shared_model::interface::types::AccountIdType account_id)
pure virtual

Get signatories of account by user account_id

Parameters
account_id
Returns

Implemented in iroha::ametsuchi::PostgresWsvQuery.

◆ getTopBlockInfo()

virtual iroha::expected::Result<iroha::TopBlockInfo, std::string> iroha::ametsuchi::WsvQuery::getTopBlockInfo ( ) const
pure virtual

Get top block info from ledger state.

Implemented in iroha::ametsuchi::PostgresWsvQuery.


The documentation for this class was generated from the following file: