hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::CommonObjectsFactory Class Referenceabstract

#include "common_objects_factory.hpp"

Inheritance diagram for shared_model::interface::CommonObjectsFactory:
Inheritance graph
Collaboration diagram for shared_model::interface::CommonObjectsFactory:
Collaboration graph

Public Types

template<typename T >
using FactoryResult = iroha::expected::Result< T, std::string >
 

Public Member Functions

virtual FactoryResult< std::unique_ptr< Peer > > createPeer (const types::AddressType &address, const types::PubkeyType &public_key)=0
 
virtual FactoryResult< std::unique_ptr< Account > > createAccount (const types::AccountIdType &account_id, const types::DomainIdType &domain_id, types::QuorumType quorum, const types::JsonType &jsonData)=0
 
virtual FactoryResult< std::unique_ptr< AccountAsset > > createAccountAsset (const types::AccountIdType &account_id, const types::AssetIdType &asset_id, const Amount &balance)=0
 
virtual FactoryResult< std::unique_ptr< Asset > > createAsset (const types::AssetIdType &asset_id, const types::DomainIdType &domain_id, types::PrecisionType precision)=0
 
virtual FactoryResult< std::unique_ptr< Domain > > createDomain (const types::DomainIdType &domain_id, const types::RoleIdType &default_role)=0
 
virtual FactoryResult< std::unique_ptr< Signature > > createSignature (const interface::types::PubkeyType &key, const interface::Signature::SignedType &signed_data)=0
 
virtual ~CommonObjectsFactory ()=default
 

Detailed Description

CommonObjectsFactory provides methods to construct common objects such as peer, account etc.

Member Typedef Documentation

template<typename T >
using shared_model::interface::CommonObjectsFactory::FactoryResult = iroha::expected::Result<T, std::string>

Constructor & Destructor Documentation

virtual shared_model::interface::CommonObjectsFactory::~CommonObjectsFactory ( )
virtualdefault

Member Function Documentation

virtual FactoryResult<std::unique_ptr<Account> > shared_model::interface::CommonObjectsFactory::createAccount ( const types::AccountIdType account_id,
const types::DomainIdType domain_id,
types::QuorumType  quorum,
const types::JsonType jsonData 
)
pure virtual

Create account instance

Implemented in shared_model::proto::ProtoCommonObjectsFactory< Validator >.

virtual FactoryResult<std::unique_ptr<AccountAsset> > shared_model::interface::CommonObjectsFactory::createAccountAsset ( const types::AccountIdType account_id,
const types::AssetIdType asset_id,
const Amount balance 
)
pure virtual

Create account asset instance

Implemented in shared_model::proto::ProtoCommonObjectsFactory< Validator >.

virtual FactoryResult<std::unique_ptr<Asset> > shared_model::interface::CommonObjectsFactory::createAsset ( const types::AssetIdType asset_id,
const types::DomainIdType domain_id,
types::PrecisionType  precision 
)
pure virtual

Create asset instance

Implemented in shared_model::proto::ProtoCommonObjectsFactory< Validator >.

virtual FactoryResult<std::unique_ptr<Domain> > shared_model::interface::CommonObjectsFactory::createDomain ( const types::DomainIdType domain_id,
const types::RoleIdType default_role 
)
pure virtual

Create domain instance

Implemented in shared_model::proto::ProtoCommonObjectsFactory< Validator >.

virtual FactoryResult<std::unique_ptr<Peer> > shared_model::interface::CommonObjectsFactory::createPeer ( const types::AddressType address,
const types::PubkeyType public_key 
)
pure virtual
virtual FactoryResult<std::unique_ptr<Signature> > shared_model::interface::CommonObjectsFactory::createSignature ( const interface::types::PubkeyType key,
const interface::Signature::SignedType signed_data 
)
pure virtual

Create signature instance

Implemented in shared_model::proto::ProtoCommonObjectsFactory< Validator >.


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