Scorum
Public Member Functions | Public Attributes | List of all members
scorum::app::database_api_impl Class Reference
Inheritance diagram for scorum::app::database_api_impl:

Public Member Functions

 database_api_impl (const scorum::app::api_context &ctx)
 
 ~database_api_impl ()
 
void set_block_applied_callback (std::function< void(const variant &block_id)> cb)
 
fc::variant_object get_config () const
 
dynamic_global_property_api_obj get_dynamic_global_properties () const
 
chain_id_type get_chain_id () const
 
std::vector< std::set< std::string > > get_key_references (std::vector< public_key_type > key) const
 
std::vector< extended_accountget_accounts (const std::vector< std::string > &names) const
 
std::vector< account_id_typeget_account_references (account_id_type account_id) const
 
std::vector< optional< account_api_obj > > lookup_account_names (const std::vector< std::string > &account_names) const
 
std::set< std::string > lookup_accounts (const std::string &lower_bound_name, uint32_t limit) const
 
uint64_t get_account_count () const
 
template<typename BudgetService >
std::vector< budget_api_objget_budgets (BudgetService &budget_service, const std::set< std::string > &names) const
 
template<typename BudgetService >
std::set< std::string > lookup_budget_owners (BudgetService &budget_service, const std::string &lower_bound_name, uint32_t limit) const
 
std::vector< atomicswap_contract_api_objget_atomicswap_contracts (const std::string &owner) const
 
atomicswap_contract_info_api_obj get_atomicswap_contract (const std::string &from, const std::string &to, const std::string &secret_hash) const
 
std::vector< optional< witness_api_obj > > get_witnesses (const std::vector< witness_id_type > &witness_ids) const
 
fc::optional< witness_api_objget_witness_by_account (const std::string &account_name) const
 
std::set< account_name_typelookup_witness_accounts (const std::string &lower_bound_name, uint32_t limit) const
 
uint64_t get_witness_count () const
 
std::set< account_name_typelookup_registration_committee_members (const std::string &lower_bound_name, uint32_t limit) const
 
std::set< account_name_typelookup_development_committee_members (const std::string &lower_bound_name, uint32_t limit) const
 
std::vector< proposal_api_objlookup_proposals () const
 
std::string get_transaction_hex (const signed_transaction &trx) const
 
std::set< public_key_typeget_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
 
std::set< public_key_typeget_potential_signatures (const signed_transaction &trx) const
 
bool verify_authority (const signed_transaction &trx) const
 
bool verify_account_authority (const std::string &name_or_id, const flat_set< public_key_type > &signers) const
 
void on_applied_block (const chain::signed_block &b)
 
registration_committee_api_obj get_registration_committee () const
 
development_committee_api_obj get_development_committee () const
 
advertising_property_api_obj get_advertising_property () const
 

Public Attributes

std::function< void(const fc::variant &)> _block_applied_callback
 
scorum::chain::database_db
 
boost::signals2::scoped_connection _block_applied_connection
 

Detailed Description

Definition at line 58 of file database_api.cpp.

Constructor & Destructor Documentation

◆ database_api_impl()

scorum::app::database_api_impl::database_api_impl ( const scorum::app::api_context ctx)

Definition at line 204 of file database_api.cpp.

◆ ~database_api_impl()

scorum::app::database_api_impl::~database_api_impl ( )

Definition at line 210 of file database_api.cpp.

Member Function Documentation

◆ get_account_count()

uint64_t scorum::app::database_api_impl::get_account_count ( ) const

Definition at line 443 of file database_api.cpp.

◆ get_account_references()

std::vector< account_id_type > scorum::app::database_api_impl::get_account_references ( account_id_type  account_id) const

Definition at line 374 of file database_api.cpp.

◆ get_accounts()

std::vector< extended_account > scorum::app::database_api_impl::get_accounts ( const std::vector< std::string > &  names) const

Definition at line 333 of file database_api.cpp.

◆ get_advertising_property()

advertising_property_api_obj scorum::app::database_api_impl::get_advertising_property ( ) const

Definition at line 676 of file database_api.cpp.

◆ get_atomicswap_contract()

atomicswap_contract_info_api_obj scorum::app::database_api_impl::get_atomicswap_contract ( const std::string &  from,
const std::string &  to,
const std::string &  secret_hash 
) const

Definition at line 997 of file database_api.cpp.

◆ get_atomicswap_contracts()

std::vector< atomicswap_contract_api_obj > scorum::app::database_api_impl::get_atomicswap_contracts ( const std::string &  owner) const

Definition at line 972 of file database_api.cpp.

◆ get_budgets()

template<typename BudgetService >
std::vector<budget_api_obj> scorum::app::database_api_impl::get_budgets ( BudgetService &  budget_service,
const std::set< std::string > &  names 
) const
inline

Definition at line 84 of file database_api.cpp.

◆ get_chain_id()

chain_id_type scorum::app::database_api_impl::get_chain_id ( ) const

Definition at line 289 of file database_api.cpp.

◆ get_config()

fc::variant_object scorum::app::database_api_impl::get_config ( ) const

Definition at line 230 of file database_api.cpp.

◆ get_development_committee()

development_committee_api_obj scorum::app::database_api_impl::get_development_committee ( ) const

Definition at line 745 of file database_api.cpp.

◆ get_dynamic_global_properties()

dynamic_global_property_api_obj scorum::app::database_api_impl::get_dynamic_global_properties ( ) const

Definition at line 240 of file database_api.cpp.

◆ get_key_references()

std::vector< std::set< std::string > > scorum::app::database_api_impl::get_key_references ( std::vector< public_key_type keys) const
Returns
all accounts that referr to the key or account id in their owner or active authorities.

Definition at line 313 of file database_api.cpp.

◆ get_potential_signatures()

std::set< public_key_type > scorum::app::database_api_impl::get_potential_signatures ( const signed_transaction trx) const

Definition at line 801 of file database_api.cpp.

◆ get_registration_committee()

registration_committee_api_obj scorum::app::database_api_impl::get_registration_committee ( ) const

Definition at line 733 of file database_api.cpp.

◆ get_required_signatures()

std::set< public_key_type > scorum::app::database_api_impl::get_required_signatures ( const signed_transaction trx,
const flat_set< public_key_type > &  available_keys 
) const

Definition at line 776 of file database_api.cpp.

◆ get_transaction_hex()

std::string scorum::app::database_api_impl::get_transaction_hex ( const signed_transaction trx) const

Definition at line 764 of file database_api.cpp.

◆ get_witness_by_account()

fc::optional< witness_api_obj > scorum::app::database_api_impl::get_witness_by_account ( const std::string &  account_name) const

Definition at line 625 of file database_api.cpp.

◆ get_witness_count()

uint64_t scorum::app::database_api_impl::get_witness_count ( ) const

Definition at line 666 of file database_api.cpp.

◆ get_witnesses()

std::vector< optional< witness_api_obj > > scorum::app::database_api_impl::get_witnesses ( const std::vector< witness_id_type > &  witness_ids) const

Definition at line 578 of file database_api.cpp.

◆ lookup_account_names()

std::vector< optional< account_api_obj > > scorum::app::database_api_impl::lookup_account_names ( const std::vector< std::string > &  account_names) const

Definition at line 398 of file database_api.cpp.

◆ lookup_accounts()

std::set< std::string > scorum::app::database_api_impl::lookup_accounts ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 424 of file database_api.cpp.

◆ lookup_budget_owners()

template<typename BudgetService >
std::set<std::string> scorum::app::database_api_impl::lookup_budget_owners ( BudgetService &  budget_service,
const std::string &  lower_bound_name,
uint32_t  limit 
) const
inline

Definition at line 110 of file database_api.cpp.

◆ lookup_development_committee_members()

std::set< account_name_type > scorum::app::database_api_impl::lookup_development_committee_members ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 702 of file database_api.cpp.

◆ lookup_proposals()

std::vector< proposal_api_obj > scorum::app::database_api_impl::lookup_proposals ( ) const

Definition at line 715 of file database_api.cpp.

◆ lookup_registration_committee_members()

std::set< account_name_type > scorum::app::database_api_impl::lookup_registration_committee_members ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 695 of file database_api.cpp.

◆ lookup_witness_accounts()

std::set< account_name_type > scorum::app::database_api_impl::lookup_witness_accounts ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 640 of file database_api.cpp.

◆ on_applied_block()

void scorum::app::database_api_impl::on_applied_block ( const chain::signed_block b)

Definition at line 171 of file database_api.cpp.

◆ set_block_applied_callback()

void scorum::app::database_api_impl::set_block_applied_callback ( std::function< void(const variant &block_id)>  cb)

Definition at line 183 of file database_api.cpp.

◆ verify_account_authority()

bool scorum::app::database_api_impl::verify_account_authority ( const std::string &  name_or_id,
const flat_set< public_key_type > &  signers 
) const

reuse trx.verify_authority by creating a dummy transfer

Definition at line 859 of file database_api.cpp.

◆ verify_authority()

bool scorum::app::database_api_impl::verify_authority ( const signed_transaction trx) const

Definition at line 836 of file database_api.cpp.

Member Data Documentation

◆ _block_applied_callback

std::function<void(const fc::variant&)> scorum::app::database_api_impl::_block_applied_callback

Definition at line 149 of file database_api.cpp.

◆ _block_applied_connection

boost::signals2::scoped_connection scorum::app::database_api_impl::_block_applied_connection

Definition at line 153 of file database_api.cpp.

◆ _db

scorum::chain::database& scorum::app::database_api_impl::_db

Definition at line 151 of file database_api.cpp.


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