46 #include <boost/container/flat_set.hpp>
61 class database_api_impl;
92 fc::variants get_objects(
const vector<object_id_type>& ids,
93 optional<bool> subscribe = optional<bool>() )
const;
110 void set_subscribe_callback( std::function<
void(
const variant&)> cb,
bool notify_remove_create );
129 void set_auto_subscription(
bool enable );
138 void set_pending_transaction_callback( std::function<
void(
const variant& signed_transaction_object)> cb );
143 void set_block_applied_callback( std::function<
void(
const variant& block_id)> cb );
149 void cancel_all_subscriptions();
162 optional<maybe_signed_block_header> get_block_header(
164 const optional<bool>& with_witness_signature = optional<bool>() )
const;
173 map<uint32_t, optional<maybe_signed_block_header>> get_block_header_batch(
174 const vector<uint32_t>& block_nums,
175 const optional<bool>& with_witness_signatures = optional<bool>() )
const;
182 optional<signed_block> get_block(uint32_t block_num)
const;
200 optional<signed_transaction> get_recent_transaction_by_id(
const transaction_id_type& txid )
const;
240 object_id_type get_next_object_id( uint8_t space_id, uint8_t type_id,
bool with_pending_transactions )
const;
254 vector<flat_set<account_id_type>> get_key_references( vector<public_key_type> keys )
const;
263 bool is_public_key_registered(
string public_key)
const;
275 account_id_type get_account_id_from_string(
const std::string& name_or_id)
const;
287 vector<optional<account_object>> get_accounts(
const vector<std::string>& account_names_or_ids,
288 optional<bool> subscribe = optional<bool>() )
const;
309 map<string, full_account, std::less<>> get_full_accounts(
310 const vector<string>& names_or_ids,
311 const optional<bool>& subscribe = optional<bool>() )
const;
319 vector<account_statistics_object> get_top_voters(uint32_t limit)
const;
326 optional<account_object> get_account_by_name(
string name )
const;
333 vector<account_id_type> get_account_references(
const std::string account_name_or_id )
const;
342 vector<optional<account_object>> lookup_account_names(
const vector<string>& account_names)
const;
357 map<string, account_id_type, std::less<>> lookup_accounts(
const string& lower_bound_name,
359 const optional<bool>& subscribe = optional<bool>() )
const;
371 vector<asset> get_account_balances(
const std::string& account_name_or_id,
372 const flat_set<asset_id_type>& assets )
const;
375 vector<asset> get_named_account_balances(
const std::string& name,
const flat_set<asset_id_type>& assets)
const;
382 vector<balance_object> get_balance_objects(
const vector<address>& addrs )
const;
390 vector<asset> get_vested_balances(
const vector<balance_id_type>& objs )
const;
397 vector<vesting_balance_object> get_vesting_balances(
const std::string account_name_or_id )
const;
402 uint64_t get_account_count()
const;
413 asset_id_type get_asset_id_from_string(
const std::string& symbol_or_id)
const;
425 vector<optional<extended_asset_object>> get_assets(
const vector<std::string>& asset_symbols_or_ids,
426 optional<bool> subscribe = optional<bool>() )
const;
435 vector<extended_asset_object> list_assets(
const string& lower_bound_symbol, uint32_t limit)
const;
444 vector<optional<extended_asset_object>> lookup_asset_symbols(
const vector<string>& symbols_or_ids)
const;
450 uint64_t get_asset_count()
const;
460 vector<extended_asset_object> get_assets_by_issuer(
const std::string& issuer_name_or_id,
461 asset_id_type start, uint32_t limit)
const;
475 vector<limit_order_object> get_limit_orders(std::string a, std::string b, uint32_t limit)
const;
495 vector<limit_order_object> get_limit_orders_by_account(
496 const string& account_name_or_id,
497 const optional<uint32_t>& limit = optional<uint32_t>(),
498 const optional<limit_order_id_type>& start_id = optional<limit_order_id_type>() );
524 vector<limit_order_object> get_account_limit_orders(
const string& account_name_or_id,
528 optional<limit_order_id_type> ostart_id = optional<limit_order_id_type>(),
529 optional<price> ostart_price = optional<price>());
538 vector<call_order_object> get_call_orders(
const std::string& a, uint32_t limit)
const;
548 vector<call_order_object> get_call_orders_by_account(
const std::string& account_name_or_id,
549 asset_id_type start, uint32_t limit)
const;
558 vector<force_settlement_object> get_settle_orders(
const std::string& a, uint32_t limit)
const;
569 vector<force_settlement_object> get_settle_orders_by_account(
const std::string& account_name_or_id,
570 force_settlement_id_type start,
571 uint32_t limit )
const;
581 vector<collateral_bid_object> get_collateral_bids(
const std::string& a, uint32_t limit, uint32_t start)
const;
591 vector<call_order_object> get_margin_positions(
const std::string& account_name_or_id )
const;
602 void subscribe_to_market(std::function<
void(
const variant&)> callback,
603 const std::string& a,
const std::string& b);
610 void unsubscribe_from_market(
const std::string& a,
const std::string& b );
618 market_ticker get_ticker(
const string& base,
const string& quote )
const;
626 market_volume get_24_volume(
const string& base,
const string& quote )
const;
636 order_book get_order_book(
const string& base,
const string& quote,
646 vector<market_ticker> get_top_markets(uint32_t limit)
const;
662 vector<market_trade> get_trade_history(
const string& base,
const string& quote,
677 vector<market_trade> get_trade_history_by_sequence(
const string& base,
const string& quote,
701 vector<extended_liquidity_pool_object> list_liquidity_pools(
702 const optional<uint32_t>& limit = optional<uint32_t>(),
703 const optional<liquidity_pool_id_type>& start_id = optional<liquidity_pool_id_type>(),
704 const optional<bool>& with_statistics =
false )
const;
723 vector<extended_liquidity_pool_object> get_liquidity_pools_by_asset_a(
724 const std::string& asset_symbol_or_id,
725 const optional<uint32_t>& limit = optional<uint32_t>(),
726 const optional<liquidity_pool_id_type>& start_id = optional<liquidity_pool_id_type>(),
727 const optional<bool>& with_statistics =
false )
const;
746 vector<extended_liquidity_pool_object> get_liquidity_pools_by_asset_b(
747 const std::string& asset_symbol_or_id,
748 const optional<uint32_t>& limit = optional<uint32_t>(),
749 const optional<liquidity_pool_id_type>& start_id = optional<liquidity_pool_id_type>(),
750 const optional<bool>& with_statistics =
false )
const;
769 vector<extended_liquidity_pool_object> get_liquidity_pools_by_one_asset(
770 const std::string& asset_symbol_or_id,
771 const optional<uint32_t>& limit = optional<uint32_t>(),
772 const optional<liquidity_pool_id_type>& start_id = optional<liquidity_pool_id_type>(),
773 const optional<bool>& with_statistics =
false )
const;
794 vector<extended_liquidity_pool_object> get_liquidity_pools_by_both_assets(
795 const std::string& asset_symbol_or_id_a,
796 const std::string& asset_symbol_or_id_b,
797 const optional<uint32_t>& limit = optional<uint32_t>(),
798 const optional<liquidity_pool_id_type>& start_id = optional<liquidity_pool_id_type>(),
799 const optional<bool>& with_statistics =
false )
const;
815 vector<optional<extended_liquidity_pool_object>> get_liquidity_pools(
816 const vector<liquidity_pool_id_type>& ids,
817 const optional<bool>& subscribe = optional<bool>(),
818 const optional<bool>& with_statistics =
false )
const;
834 vector<optional<extended_liquidity_pool_object>> get_liquidity_pools_by_share_asset(
835 const vector<std::string>& asset_symbols_or_ids,
836 const optional<bool>& subscribe = optional<bool>(),
837 const optional<bool>& with_statistics =
false )
const;
856 vector<extended_liquidity_pool_object> get_liquidity_pools_by_owner(
857 const std::string& account_name_or_id,
858 const optional<uint32_t>& limit = optional<uint32_t>(),
859 const optional<asset_id_type>& start_id = optional<asset_id_type>(),
860 const optional<bool>& with_statistics =
false )
const;
881 vector<samet_fund_object> list_samet_funds(
882 const optional<uint32_t>& limit = optional<uint32_t>(),
883 const optional<samet_fund_id_type>& start_id = optional<samet_fund_id_type>() )
const;
901 vector<samet_fund_object> get_samet_funds_by_owner(
902 const std::string& account_name_or_id,
903 const optional<uint32_t>& limit = optional<uint32_t>(),
904 const optional<samet_fund_id_type>& start_id = optional<samet_fund_id_type>() )
const;
922 vector<samet_fund_object> get_samet_funds_by_asset(
923 const std::string& asset_symbol_or_id,
924 const optional<uint32_t>& limit = optional<uint32_t>(),
925 const optional<samet_fund_id_type>& start_id = optional<samet_fund_id_type>() )
const;
947 vector<credit_offer_object> list_credit_offers(
948 const optional<uint32_t>& limit = optional<uint32_t>(),
949 const optional<credit_offer_id_type>& start_id = optional<credit_offer_id_type>() )
const;
967 vector<credit_offer_object> get_credit_offers_by_owner(
968 const std::string& account_name_or_id,
969 const optional<uint32_t>& limit = optional<uint32_t>(),
970 const optional<credit_offer_id_type>& start_id = optional<credit_offer_id_type>() )
const;
988 vector<credit_offer_object> get_credit_offers_by_asset(
989 const std::string& asset_symbol_or_id,
990 const optional<uint32_t>& limit = optional<uint32_t>(),
991 const optional<credit_offer_id_type>& start_id = optional<credit_offer_id_type>() )
const;
1007 vector<credit_deal_object> list_credit_deals(
1008 const optional<uint32_t>& limit = optional<uint32_t>(),
1009 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1027 vector<credit_deal_object> get_credit_deals_by_offer_id(
1028 const credit_offer_id_type& offer_id,
1029 const optional<uint32_t>& limit = optional<uint32_t>(),
1030 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1048 vector<credit_deal_object> get_credit_deals_by_offer_owner(
1049 const std::string& account_name_or_id,
1050 const optional<uint32_t>& limit = optional<uint32_t>(),
1051 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1069 vector<credit_deal_object> get_credit_deals_by_borrower(
1070 const std::string& account_name_or_id,
1071 const optional<uint32_t>& limit = optional<uint32_t>(),
1072 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1090 vector<credit_deal_object> get_credit_deals_by_debt_asset(
1091 const std::string& asset_symbol_or_id,
1092 const optional<uint32_t>& limit = optional<uint32_t>(),
1093 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1111 vector<credit_deal_object> get_credit_deals_by_collateral_asset(
1112 const std::string& asset_symbol_or_id,
1113 const optional<uint32_t>& limit = optional<uint32_t>(),
1114 const optional<credit_deal_id_type>& start_id = optional<credit_deal_id_type>() )
const;
1129 vector<optional<witness_object>> get_witnesses(
const vector<witness_id_type>& witness_ids)
const;
1145 map<string, witness_id_type, std::less<>> lookup_witness_accounts(
const string& lower_bound_name,
1146 uint32_t limit )
const;
1151 uint64_t get_witness_count()
const;
1164 vector<optional<committee_member_object>> get_committee_members(
1165 const vector<committee_member_id_type>& committee_member_ids)
const;
1181 map<string, committee_member_id_type, std::less<>> lookup_committee_member_accounts(
1182 const string& lower_bound_name,
1183 uint32_t limit )
const;
1188 uint64_t get_committee_count()
const;
1201 vector<worker_object> get_all_workers(
const optional<bool>& is_expired = optional<bool>() )
const;
1208 vector<worker_object> get_workers_by_account(
const std::string& account_name_or_id)
const;
1213 uint64_t get_worker_count()
const;
1233 vector<variant> lookup_vote_ids(
const vector<vote_id_type>& votes )
const;
1244 std::string get_transaction_hex(
const signed_transaction& trx)
const;
1251 std::string get_transaction_hex_without_sig(
const transaction &trx )
const;
1262 set<public_key_type> get_required_signatures(
const signed_transaction& trx,
1263 const flat_set<public_key_type>& available_keys )
const;
1273 set<public_key_type> get_potential_signatures(
const signed_transaction& trx )
const;
1281 set<address> get_potential_address_signatures(
const signed_transaction& trx )
const;
1296 bool verify_account_authority(
const string& account_name_or_id,
1297 const flat_set<public_key_type>& signers )
const;
1313 vector< fc::variant > get_required_fees(
const vector<operation>& ops,
1314 const std::string& asset_symbol_or_id )
const;
1326 vector<proposal_object> get_proposed_transactions(
const std::string account_name_or_id )
const;
1337 vector<blinded_balance_object> get_blinded_balances(
const flat_set<commitment_type>& commitments )
const;
1352 vector<withdraw_permission_object> get_withdraw_permissions_by_giver(
const std::string account_name_or_id,
1353 withdraw_permission_id_type start,
1354 uint32_t limit )
const;
1365 vector<withdraw_permission_object> get_withdraw_permissions_by_recipient(
const std::string account_name_or_id,
1366 withdraw_permission_id_type start,
1367 uint32_t limit )
const;
1381 optional<htlc_object> get_htlc( htlc_id_type
id, optional<bool> subscribe = optional<bool>() )
const;
1391 vector<htlc_object> get_htlc_by_from(
const std::string account_name_or_id,
1393 uint32_t limit )
const;
1403 vector<htlc_object> get_htlc_by_to(
const std::string account_name_or_id,
1405 uint32_t limit )
const;
1414 vector<htlc_object> list_htlcs(
const htlc_id_type start, uint32_t limit)
const;
1435 vector<ticket_object> list_tickets(
1436 const optional<uint32_t>& limit = optional<uint32_t>(),
1437 const optional<ticket_id_type>& start_id = optional<ticket_id_type>() )
const;
1455 vector<ticket_object> get_tickets_by_account(
1456 const std::string& account_name_or_id,
1457 const optional<uint32_t>& limit = optional<uint32_t>(),
1458 const optional<ticket_id_type>& start_id = optional<ticket_id_type>() )
const;
1461 std::shared_ptr< database_api_impl > my;
1473 (set_subscribe_callback)
1474 (set_auto_subscription)
1475 (set_pending_transaction_callback)
1476 (set_block_applied_callback)
1477 (cancel_all_subscriptions)
1481 (get_block_header_batch)
1484 (get_recent_transaction_by_id)
1487 (get_chain_properties)
1488 (get_global_properties)
1491 (get_dynamic_global_properties)
1492 (get_next_object_id)
1495 (get_key_references)
1496 (is_public_key_registered)
1499 (get_account_id_from_string)
1503 (get_account_by_name)
1504 (get_account_references)
1505 (lookup_account_names)
1510 (get_account_balances)
1511 (get_named_account_balances)
1512 (get_balance_objects)
1513 (get_vested_balances)
1514 (get_vesting_balances)
1519 (lookup_asset_symbols)
1521 (get_assets_by_issuer)
1522 (get_asset_id_from_string)
1527 (get_limit_orders_by_account)
1528 (get_account_limit_orders)
1530 (get_call_orders_by_account)
1532 (get_settle_orders_by_account)
1533 (get_margin_positions)
1534 (get_collateral_bids)
1535 (subscribe_to_market)
1536 (unsubscribe_from_market)
1541 (get_trade_history_by_sequence)
1544 (list_liquidity_pools)
1545 (get_liquidity_pools_by_asset_a)
1546 (get_liquidity_pools_by_asset_b)
1547 (get_liquidity_pools_by_one_asset)
1548 (get_liquidity_pools_by_both_assets)
1549 (get_liquidity_pools)
1550 (get_liquidity_pools_by_share_asset)
1551 (get_liquidity_pools_by_owner)
1555 (get_samet_funds_by_owner)
1556 (get_samet_funds_by_asset)
1559 (list_credit_offers)
1560 (get_credit_offers_by_owner)
1561 (get_credit_offers_by_asset)
1563 (get_credit_deals_by_offer_id)
1564 (get_credit_deals_by_offer_owner)
1565 (get_credit_deals_by_borrower)
1566 (get_credit_deals_by_debt_asset)
1567 (get_credit_deals_by_collateral_asset)
1571 (get_witness_by_account)
1572 (lookup_witness_accounts)
1576 (get_committee_members)
1577 (get_committee_member_by_account)
1578 (lookup_committee_member_accounts)
1579 (get_committee_count)
1583 (get_workers_by_account)
1590 (get_transaction_hex)
1591 (get_transaction_hex_without_sig)
1592 (get_required_signatures)
1593 (get_potential_signatures)
1594 (get_potential_address_signatures)
1596 (verify_account_authority)
1597 (validate_transaction)
1601 (get_proposed_transactions)
1604 (get_blinded_balances)
1607 (get_withdraw_permissions_by_giver)
1608 (get_withdraw_permissions_by_recipient)
1618 (get_tickets_by_account)