Scorum
|
#include <database_api.hpp>
Public Member Functions | |
database_api (const scorum::app::api_context &ctx) | |
~database_api () | |
void | on_api_startup () |
void | set_block_applied_callback (std::function< void(const variant &block_header)> cb) |
fc::variant_object | get_config () const |
Retrieve compile-time constants. More... | |
chain_id_type | get_chain_id () const |
Get the chain ID. More... | |
dynamic_global_property_api_obj | get_dynamic_global_properties () const |
Retrieve the current chain properties. More... | |
witness_schedule_api_obj | get_witness_schedule () const |
Get witness schedule. More... | |
std::vector< std::set< std::string > > | get_key_references (std::vector< public_key_type > key) const |
std::vector< extended_account > | get_accounts (const std::vector< std::string > &names) const |
std::vector< account_id_type > | get_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 |
Get a list of accounts by name. More... | |
std::set< std::string > | lookup_accounts (const std::string &lower_bound_name, uint32_t limit) const |
Get names and IDs for registered accounts. More... | |
uint64_t | get_account_count () const |
Get the total number of accounts registered with the blockchain. More... | |
std::vector< owner_authority_history_api_obj > | get_owner_history (const std::string &account) const |
optional< account_recovery_request_api_obj > | get_recovery_request (const std::string &account) const |
optional< escrow_api_obj > | get_escrow (const std::string &from, uint32_t escrow_id) const |
std::vector< withdraw_route > | get_withdraw_routes (const std::string &account, withdraw_route_type type=outgoing) const |
optional< account_bandwidth_api_obj > | get_account_bandwidth (const std::string &account, witness::bandwidth_type type) const |
std::vector< scorumpower_delegation_api_obj > | get_scorumpower_delegations (const std::string &account, const std::string &from, uint32_t limit=100) const |
std::vector< scorumpower_delegation_expiration_api_obj > | get_expiring_scorumpower_delegations (const std::string &account, time_point_sec from, uint32_t limit=100) const |
std::vector< budget_api_obj > | get_budgets (const budget_type, const std::set< std::string > &account_names) const |
std::set< std::string > | lookup_budget_owners (const budget_type, const std::string &lower_bound_name, uint32_t limit) const |
std::vector< atomicswap_contract_api_obj > | get_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 |
Get a list of witnesses by ID. More... | |
fc::optional< witness_api_obj > | get_witness_by_account (const std::string &account_name) const |
Get the witness owned by a given account. More... | |
std::vector< witness_api_obj > | get_witnesses_by_vote (const std::string &from, uint32_t limit) const |
std::set< account_name_type > | lookup_witness_accounts (const std::string &lower_bound_name, uint32_t limit) const |
Get names and IDs for registered witnesses. More... | |
std::vector< account_name_type > | get_active_witnesses () const |
uint64_t | get_witness_count () const |
Get the total number of witnesses registered with the blockchain. More... | |
std::set< account_name_type > | lookup_registration_committee_members (const std::string &lower_bound_name, uint32_t limit) const |
Get account names in registration committee. More... | |
std::set< account_name_type > | lookup_development_committee_members (const std::string &lower_bound_name, uint32_t limit) const |
Get account names in development committee. More... | |
std::vector< proposal_api_obj > | lookup_proposals () const |
Get proposals. More... | |
development_committee_api_obj | get_development_committee () const |
Get development committee. More... | |
registration_committee_api_obj | get_registration_committee () const |
Get registration committee. More... | |
advertising_property_api_obj | get_advertising_property () const |
Get advertising property. More... | |
std::string | get_transaction_hex (const signed_transaction &trx) const |
Get a hexdump of the serialized binary form of a transaction. More... | |
std::set< public_key_type > | get_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const |
std::set< public_key_type > | get_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 |
std::vector< vote_state > | get_active_votes (const std::string &author, const std::string &permlink) const |
std::vector< account_vote > | get_account_votes (const std::string &voter) const |
nft_api_obj | get_nft_by_id (int64_t id) const |
Get NFT object by id. More... | |
nft_api_obj | get_nft_by_name (const account_name_type &name) const |
Get NFT object by name. More... | |
nft_api_obj | get_nft_by_uuid (const uuid_type &uuid) const |
Get NFT object by uuid. More... | |
std::vector< nft_api_obj > | lookup_nft (int64_t from, uint32_t limit) const |
Retrieve list of NFT objects in range [from, from+limit-1]. More... | |
game_round_api_obj | get_game_round_by_uuid (const uuid_type &uuid) const |
Get game round by uuid object. More... | |
std::vector< game_round_api_obj > | lookup_game_round (int64_t id, uint32_t limit) const |
Retrieve list of game rounds in range [from, from+limit-1]. More... | |
Definition at line 65 of file database_api.hpp.
scorum::app::database_api::database_api | ( | const scorum::app::api_context & | ctx | ) |
Definition at line 195 of file database_api.cpp.
scorum::app::database_api::~database_api | ( | ) |
Definition at line 200 of file database_api.cpp.
void scorum::app::database_api::on_api_startup | ( | ) |
Definition at line 215 of file database_api.cpp.