3 #define API_DATABASE "database_api"
18 #include <fc/optional.hpp>
19 #include <fc/variant_object.hpp>
21 #include <fc/network/ip.hpp>
23 #include <boost/container/flat_set.hpp>
53 class database_api_impl;
74 void on_api_startup();
81 void set_block_applied_callback(std::function<
void(
const variant&
block_header)> cb);
119 std::vector<std::set<std::string>> get_key_references(std::vector<public_key_type> key)
const;
121 std::vector<extended_account> get_accounts(
const std::vector<std::string>& names)
const;
126 std::vector<account_id_type> get_account_references(
account_id_type account_id)
const;
135 std::vector<optional<account_api_obj>> lookup_account_names(
const std::vector<std::string>& account_names)
const;
143 std::set<std::string> lookup_accounts(
const std::string& lower_bound_name, uint32_t limit)
const;
148 uint64_t get_account_count()
const;
150 std::vector<owner_authority_history_api_obj> get_owner_history(
const std::string& account)
const;
152 optional<account_recovery_request_api_obj> get_recovery_request(
const std::string& account)
const;
154 optional<escrow_api_obj> get_escrow(
const std::string& from, uint32_t escrow_id)
const;
156 std::vector<withdraw_route> get_withdraw_routes(
const std::string& account,
159 optional<account_bandwidth_api_obj> get_account_bandwidth(
const std::string& account,
162 std::vector<scorumpower_delegation_api_obj> get_scorumpower_delegations(
const std::string& account,
163 const std::string& from,
164 uint32_t limit = 100)
const;
166 std::vector<scorumpower_delegation_expiration_api_obj> get_expiring_scorumpower_delegations(
167 const std::string& account, time_point_sec from, uint32_t limit = 100)
const;
177 std::vector<budget_api_obj> get_budgets(
const budget_type,
const std::set<std::string>& account_names)
const;
179 std::set<std::string>
180 lookup_budget_owners(
const budget_type,
const std::string& lower_bound_name, uint32_t limit)
const;
189 std::vector<atomicswap_contract_api_obj> get_atomicswap_contracts(
const std::string&
owner)
const;
192 get_atomicswap_contract(
const std::string& from,
const std::string& to,
const std::string& secret_hash)
const;
208 std::vector<optional<witness_api_obj>> get_witnesses(
const std::vector<witness_id_type>& witness_ids)
const;
215 fc::optional<witness_api_obj> get_witness_by_account(
const std::string& account_name)
const;
222 std::vector<witness_api_obj> get_witnesses_by_vote(
const std::string& from, uint32_t limit)
const;
230 std::set<account_name_type> lookup_witness_accounts(
const std::string& lower_bound_name, uint32_t limit)
const;
232 std::vector<account_name_type> get_active_witnesses()
const;
237 uint64_t get_witness_count()
const;
250 std::set<account_name_type> lookup_registration_committee_members(
const std::string& lower_bound_name,
251 uint32_t limit)
const;
256 std::set<account_name_type> lookup_development_committee_members(
const std::string& lower_bound_name,
257 uint32_t limit)
const;
262 std::vector<proposal_api_obj> lookup_proposals()
const;
295 const flat_set<public_key_type>& available_keys)
const;
304 std::set<public_key_type> get_potential_signatures(
const signed_transaction& trx)
const;
314 bool verify_account_authority(
const std::string& name_or_id,
const flat_set<public_key_type>& signers)
const;
326 std::vector<vote_state> get_active_votes(
const std::string& author,
const std::string& permlink)
const;
327 std::vector<account_vote> get_account_votes(
const std::string& voter)
const;
363 std::vector<nft_api_obj> lookup_nft(int64_t from, uint32_t limit)
const;
378 std::vector<game_round_api_obj> lookup_game_round(int64_t
id, uint32_t limit)
const;
383 std::shared_ptr<database_api_impl> my;
396 (set_block_applied_callback)
401 (get_dynamic_global_properties)
407 (get_account_references)
408 (lookup_account_names)
412 (get_recovery_request)
414 (get_withdraw_routes)
415 (get_account_bandwidth)
416 (get_scorumpower_delegations)
417 (get_expiring_scorumpower_delegations)
420 (get_transaction_hex)
421 (get_required_signatures)
422 (get_potential_signatures)
424 (verify_account_authority)
432 (get_witness_by_account)
433 (get_witnesses_by_vote)
434 (lookup_witness_accounts)
436 (get_active_witnesses)
441 (lookup_budget_owners)
444 (lookup_registration_committee_members)
445 (lookup_development_committee_members)
447 (get_registration_committee)
448 (get_development_committee)
449 (get_advertising_property)
452 (get_atomicswap_contracts)
453 (get_atomicswap_contract)
460 (get_game_round_by_uuid)
FC_REFLECT_ENUM(scorum::protocol::game_status,(created)(started)(finished)(resolved)(expired)(cancelled)) namespace fc
FC_REFLECT(appender_args,(appender)(stream)) FC_REFLECT_DERIVED(file_appender_args
printable_schedule get_witness_schedule(const witness_schedule_object &wso, witness_service_i &witness_service)
const config & get_config()
fc::fixed_string_16 account_name_type
void verify_authority(const std::vector< operation > &ops, const flat_set< public_key_type > &sigs, const authority_getter &get_active, const authority_getter &get_owner, const authority_getter &get_posting, uint32_t max_recursion=SCORUM_MAX_SIG_CHECK_DEPTH, bool allow_committe=false, const flat_set< account_name_type > &active_aprovals=flat_set< account_name_type >(), const flat_set< account_name_type > &owner_aprovals=flat_set< account_name_type >(), const flat_set< account_name_type > &posting_approvals=flat_set< account_name_type >())
boost::uuids::uuid uuid_type