hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
model_crypto_provider.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MODEL_CRYPTO_PROVIDER_HPP
7 #define IROHA_MODEL_CRYPTO_PROVIDER_HPP
8 
9 #include "model/block.hpp"
10 #include "model/query.hpp"
11 #include "model/transaction.hpp"
12 
13 namespace iroha {
14  namespace model {
15 
23  public:
24  virtual ~ModelCryptoProvider() = default;
25 
33  virtual bool verify(const Transaction &tx) const = 0;
34 
42  virtual bool verify(const Query &query) const = 0;
43 
51  virtual bool verify(const Block &block) const = 0;
52 
59  virtual void sign(Block &block) const = 0;
60 
67  virtual void sign(Transaction &transaction) const = 0;
68 
75  virtual void sign(Query &query) const = 0;
76  };
77  } // namespace model
78 } // namespace iroha
79 #endif // IROHA_MODEL_CRYPTO_PROVIDER_HPP
virtual bool verify(const Transaction &tx) const =0
Definition: transaction.hpp:26
Definition: model_crypto_provider.hpp:22
virtual ~ModelCryptoProvider()=default
Definition: block_query.hpp:16
virtual void sign(Block &block) const =0
Definition: query.hpp:20
Definition: block.hpp:24