DECENT
Functions

Functions

vector< optional< account_object > > graphene::app::database_api::get_accounts (const vector< account_id_type > &account_ids) const
 Get a list of accounts by ID. More...
 
std::map< string, full_accountgraphene::app::database_api::get_full_accounts (const vector< string > &names_or_ids, bool subscribe)
 Fetch all objects relevant to the specified accounts and subscribe to updates. More...
 
optional< account_objectgraphene::app::database_api::get_account_by_name (string name) const
 Get an account by name. More...
 
vector< account_id_typegraphene::app::database_api::get_account_references (account_id_type account_id) const
 Get all accounts that refer to the account id in their owner or active authorities. More...
 
vector< optional< account_object > > graphene::app::database_api::lookup_account_names (const vector< string > &account_names) const
 Get a list of accounts by name. More...
 
map< string, account_id_typegraphene::app::database_api::lookup_accounts (const string &lower_bound_name, uint32_t limit) const
 Get names and IDs for registered accounts. More...
 
vector< account_objectgraphene::app::database_api::search_accounts (const string &search_term, const string order, const object_id_type &id, uint32_t limit) const
 Get names and IDs for registered accounts that match search term. More...
 
vector< class transaction_detail_objectgraphene::app::database_api::search_account_history (account_id_type const &account, string const &order, object_id_type const &id, int limit) const
 Returns the operations on the named account. More...
 
uint64_t graphene::app::database_api::get_account_count () const
 Get the total number of accounts registered on the blockchain. More...
 

Detailed Description

Function Documentation

◆ get_account_by_name()

optional< account_object > graphene::app::database_api::get_account_by_name ( string  name) const

Get an account by name.

Parameters
namename of the account to retrieve
Returns
the account_object corresponding to the provided name, or null if no matching content was found

Definition at line 676 of file database_api.cpp.

◆ get_account_count()

uint64_t graphene::app::database_api::get_account_count ( ) const

Get the total number of accounts registered on the blockchain.

Returns
the total number of registered accounts

Definition at line 933 of file database_api.cpp.

◆ get_account_references()

vector< account_id_type > graphene::app::database_api::get_account_references ( account_id_type  account_id) const

Get all accounts that refer to the account id in their owner or active authorities.

Parameters
account_idID of the account
Returns
a list of account IDs

Definition at line 690 of file database_api.cpp.

◆ get_accounts()

vector< optional< account_object > > graphene::app::database_api::get_accounts ( const vector< account_id_type > &  account_ids) const

Get a list of accounts by ID.

Note
This function has semantics identical to get_objects().
Parameters
account_idsIDs of the accounts to retrieve
Returns
the accounts corresponding to the provided IDs

Definition at line 575 of file database_api.cpp.

◆ get_full_accounts()

std::map< string, full_account > graphene::app::database_api::get_full_accounts ( const vector< string > &  names_or_ids,
bool  subscribe 
)

Fetch all objects relevant to the specified accounts and subscribe to updates.

Note
This function fetches all relevant objects for the given accounts, and subscribes to updates to the given accounts. If any of the strings in names_or_ids cannot be tied to an account, that input will be ignored. All other accounts will be retrieved and subscribed.
Parameters
subscribetrue to subscribe to updates
names_or_idseach item must be the name or ID of an account to retrieve
Returns
map of string from names_or_ids to the corresponding account

Definition at line 595 of file database_api.cpp.

◆ lookup_account_names()

vector< optional< account_object > > graphene::app::database_api::lookup_account_names ( const vector< string > &  account_names) const

Get a list of accounts by name.

Note
This function has semantics identical to get_objects().
Parameters
account_namesnames of the accounts to retrieve
Returns
the accounts holding the provided names

Definition at line 711 of file database_api.cpp.

◆ lookup_accounts()

map< string, account_id_type > graphene::app::database_api::lookup_accounts ( const string &  lower_bound_name,
uint32_t  limit 
) const

Get names and IDs for registered accounts.

Parameters
lower_bound_namelower bound of the first name to return
limitmaximum number of results to return ( must not exceed 1000 )
Returns
map of account names to corresponding IDs

Definition at line 743 of file database_api.cpp.

◆ search_account_history()

vector< transaction_detail_object > graphene::app::database_api::search_account_history ( account_id_type const &  account,
string const &  order,
object_id_type const &  id,
int  limit 
) const

Returns the operations on the named account.

Note
This returns a list of transaction detail objects, which describe activity on the account.
Parameters
accountthe account to search
ordersort data by field
idobject_id to start searching from
limitthe number of entries to return (starting from the most recent) (max 100)
Returns
a list of transaction detail objects

Definition at line 734 of file database_api.cpp.

◆ search_accounts()

vector< account_object > graphene::app::database_api::search_accounts ( const string &  search_term,
const string  order,
const object_id_type &  id,
uint32_t  limit 
) const

Get names and IDs for registered accounts that match search term.

Parameters
search_termwill try to partially match account name or id
ordersort data by field
idobject_id to start searching from
limitmaximum number of results to return ( must not exceed 1000 )
Returns
map of account names to corresponding IDs

Definition at line 730 of file database_api.cpp.