BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
database_api_impl.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 
26 
27 #include <fc/bloom_filter.hpp>
28 
29 #define GET_REQUIRED_FEES_MAX_RECURSION 4
30 
31 namespace graphene { namespace app {
32 
33 typedef std::map< std::pair<graphene::chain::asset_id_type, graphene::chain::asset_id_type>,
34  std::vector<fc::variant> > market_queue_type;
35 
36 class database_api_impl : public std::enable_shared_from_this<database_api_impl>
37 {
38  public:
39  explicit database_api_impl( graphene::chain::database& db, const application_options* app_options );
40  virtual ~database_api_impl();
41 
42  // Objects
43  fc::variants get_objects( const vector<object_id_type>& ids, optional<bool> subscribe )const;
44 
45  // Subscriptions
46  void set_subscribe_callback( std::function<void(const variant&)> cb, bool notify_remove_create );
47  void set_auto_subscription( bool enable );
48  void set_pending_transaction_callback( std::function<void(const variant&)> cb );
49  void set_block_applied_callback( std::function<void(const variant& block_id)> cb );
50  void cancel_all_subscriptions(bool reset_callback, bool reset_market_subscriptions);
51 
52  // Blocks and transactions
53  optional<block_header> get_block_header(uint32_t block_num)const;
54  map<uint32_t, optional<block_header>> get_block_header_batch(const vector<uint32_t> block_nums)const;
55  optional<signed_block> get_block(uint32_t block_num)const;
56  processed_transaction get_transaction( uint32_t block_num, uint32_t trx_in_block )const;
57 
58  // Globals
64 
65  // Keys
66  vector<flat_set<account_id_type>> get_key_references( vector<public_key_type> key )const;
67  bool is_public_key_registered(string public_key) const;
68 
69  // Accounts
70  account_id_type get_account_id_from_string(const std::string& name_or_id)const;
71  vector<optional<account_object>> get_accounts( const vector<std::string>& account_names_or_ids,
72  optional<bool> subscribe )const;
73  std::map<string,full_account> get_full_accounts( const vector<string>& names_or_ids,
74  optional<bool> subscribe );
75  optional<account_object> get_account_by_name( string name )const;
76  vector<account_id_type> get_account_references( const std::string account_id_or_name )const;
77  vector<optional<account_object>> lookup_account_names(const vector<string>& account_names)const;
78  map<string,account_id_type> lookup_accounts( const string& lower_bound_name,
79  uint32_t limit,
80  optional<bool> subscribe )const;
81  uint64_t get_account_count()const;
82 
83  // Balances
84  vector<asset> get_account_balances( const std::string& account_name_or_id,
85  const flat_set<asset_id_type>& assets )const;
86  vector<asset> get_named_account_balances(const std::string& name, const flat_set<asset_id_type>& assets)const;
87  vector<balance_object> get_balance_objects( const vector<address>& addrs )const;
88  vector<asset> get_vested_balances( const vector<balance_id_type>& objs )const;
89  vector<vesting_balance_object> get_vesting_balances( const std::string account_id_or_name )const;
90 
91  // Assets
92  uint64_t get_asset_count()const;
93  asset_id_type get_asset_id_from_string(const std::string& symbol_or_id)const;
94  vector<optional<extended_asset_object>> get_assets( const vector<std::string>& asset_symbols_or_ids,
95  optional<bool> subscribe )const;
96  vector<extended_asset_object> list_assets(const string& lower_bound_symbol, uint32_t limit)const;
97  vector<optional<extended_asset_object>> lookup_asset_symbols(const vector<string>& symbols_or_ids)const;
98  vector<extended_asset_object> get_assets_by_issuer(const std::string& issuer_name_or_id,
99  asset_id_type start, uint32_t limit)const;
100 
101  // Markets / feeds
102  vector<limit_order_object> get_limit_orders( const std::string& a, const std::string& b,
103  uint32_t limit)const;
104  vector<limit_order_object> get_limit_orders_by_account( const string& account_name_or_id,
105  optional<uint32_t> limit,
106  optional<limit_order_id_type> start_id );
107  vector<limit_order_object> get_account_limit_orders( const string& account_name_or_id,
108  const string &base,
109  const string &quote, uint32_t limit,
110  optional<limit_order_id_type> ostart_id,
111  optional<price> ostart_price );
112  vector<call_order_object> get_call_orders(const std::string& a, uint32_t limit)const;
113  vector<call_order_object> get_call_orders_by_account(const std::string& account_name_or_id,
114  asset_id_type start, uint32_t limit)const;
115  vector<force_settlement_object> get_settle_orders(const std::string& a, uint32_t limit)const;
116  vector<force_settlement_object> get_settle_orders_by_account(const std::string& account_name_or_id,
117  force_settlement_id_type start,
118  uint32_t limit)const;
119  vector<call_order_object> get_margin_positions( const std::string account_id_or_name )const;
120  vector<collateral_bid_object> get_collateral_bids( const std::string& asset,
121  uint32_t limit, uint32_t start)const;
122 
123  void subscribe_to_market( std::function<void(const variant&)> callback,
124  const std::string& a, const std::string& b );
125  void unsubscribe_from_market(const std::string& a, const std::string& b);
126 
127  market_ticker get_ticker( const string& base, const string& quote,
128  bool skip_order_book = false )const;
129  market_volume get_24_volume( const string& base, const string& quote )const;
130  order_book get_order_book( const string& base, const string& quote,
131  unsigned limit = 50 )const;
132  vector<market_ticker> get_top_markets( uint32_t limit )const;
133  vector<market_trade> get_trade_history( const string& base, const string& quote,
135  unsigned limit = 100 )const;
136  vector<market_trade> get_trade_history_by_sequence( const string& base, const string& quote,
137  int64_t start, fc::time_point_sec stop,
138  unsigned limit = 100 )const;
139 
140  // Witnesses
141  vector<optional<witness_object>> get_witnesses(const vector<witness_id_type>& witness_ids)const;
142  fc::optional<witness_object> get_witness_by_account(const std::string account_id_or_name)const;
143  map<string, witness_id_type> lookup_witness_accounts(const string& lower_bound_name, uint32_t limit)const;
144  uint64_t get_witness_count()const;
145 
146  // Committee members
147  vector<optional<committee_member_object>> get_committee_members(
148  const vector<committee_member_id_type>& committee_member_ids )const;
150  const std::string account_id_or_name )const;
151  map<string, committee_member_id_type> lookup_committee_member_accounts(
152  const string& lower_bound_name, uint32_t limit )const;
153  uint64_t get_committee_count()const;
154 
155  // Workers
156  vector<worker_object> get_all_workers( const optional<bool> is_expired = optional<bool>() )const;
157  vector<worker_object> get_workers_by_account(const std::string account_id_or_name)const;
158  uint64_t get_worker_count()const;
159 
160  // Votes
161  vector<variant> lookup_vote_ids( const vector<vote_id_type>& votes )const;
162 
163  // Authority / validation
164  std::string get_transaction_hex(const signed_transaction& trx)const;
165  std::string get_transaction_hex_without_sig(const signed_transaction& trx)const;
166 
167  set<public_key_type> get_required_signatures( const signed_transaction& trx,
168  const flat_set<public_key_type>& available_keys )const;
169  set<public_key_type> get_potential_signatures( const signed_transaction& trx )const;
170  set<address> get_potential_address_signatures( const signed_transaction& trx )const;
171  bool verify_authority( const signed_transaction& trx )const;
172  bool verify_account_authority( const string& account_name_or_id,
173  const flat_set<public_key_type>& signers )const;
174  processed_transaction validate_transaction( const signed_transaction& trx )const;
175  vector< fc::variant > get_required_fees( const vector<operation>& ops,
176  const std::string& asset_id_or_symbol )const;
177 
178  // Proposed transactions
179  vector<proposal_object> get_proposed_transactions( const std::string account_id_or_name )const;
180 
181  // Blinded balances
182  vector<blinded_balance_object> get_blinded_balances( const flat_set<commitment_type>& commitments )const;
183 
184  // Withdrawals
185  vector<withdraw_permission_object> get_withdraw_permissions_by_giver( const std::string account_id_or_name,
186  withdraw_permission_id_type start,
187  uint32_t limit )const;
188  vector<withdraw_permission_object> get_withdraw_permissions_by_recipient( const std::string account_id_or_name,
189  withdraw_permission_id_type start,
190  uint32_t limit )const;
191 
192  // HTLC
193  optional<htlc_object> get_htlc( htlc_id_type id, optional<bool> subscribe ) const;
194  vector<htlc_object> get_htlc_by_from( const std::string account_id_or_name,
195  htlc_id_type start, uint32_t limit ) const;
196  vector<htlc_object> get_htlc_by_to( const std::string account_id_or_name,
197  htlc_id_type start, uint32_t limit) const;
198  vector<htlc_object> list_htlcs(const htlc_id_type lower_bound_id, uint32_t limit) const;
199 
200  //private:
201 
203  // Accounts
205 
206  const account_object* get_account_from_string( const std::string& name_or_id,
207  bool throw_if_not_found = true ) const;
208 
210  // Assets
212 
213  template<class ASSET>
215  {
216  asset_id_type id = a.id;
217  extended_asset_object result = extended_asset_object( std::forward<ASSET>( a ) );
219  {
221  if( result.bitasset_data_id.valid() )
223  }
224  return result;
225  }
226 
227  const asset_object* get_asset_from_string( const std::string& symbol_or_id,
228  bool throw_if_not_found = true ) const;
229  // helper function
230  vector<optional<extended_asset_object>> get_assets( const vector<asset_id_type>& asset_ids,
231  optional<bool> subscribe = optional<bool>() )const;
232 
234  // Markets
236 
237  // helper function
238  vector<limit_order_object> get_limit_orders( const asset_id_type a, const asset_id_type b,
239  const uint32_t limit )const;
240 
242  // Subscription
244 
245  // Decides whether to subscribe using member variables and given parameter
246  bool get_whether_to_subscribe( optional<bool> subscribe )const
247  {
248  if( !_subscribe_callback )
249  return false;
250  if( subscribe.valid() )
251  return *subscribe;
253  }
254 
255  // Note:
256  // Different type of object_id<T> objects could become identical after packed.
257  // For example, both `account_id_type a=1.2.0` and `asset_id_type b=1.3.0` will become `0` after packed.
258  // In order to avoid collision, we don't use a template function here, instead, we implicitly convert all
259  // object IDs to `object_id_type` when subscribing.
260  //
261  // If need to subscribe to other data types, override this function with the types as parameter.
262  // For example, we had a `get_subscription_key( const public_key_type& item )` function here, which was
263  // removed lately since we no longer subscribe to public keys.
264  vector<char> get_subscription_key( const object_id_type& item )const
265  {
266  return fc::raw::pack(item);
267  }
268 
269  template<typename T>
270  void subscribe_to_item( const T& item )const
271  {
272  if( !_subscribe_callback )
273  return;
274 
275  vector<char> key = get_subscription_key( item );
276  if( !_subscribe_filter.contains( key.data(), key.size() ) )
277  {
278  _subscribe_filter.insert( key.data(), key.size() );
279  }
280  }
281 
282  template<typename T>
283  bool is_subscribed_to_item( const T& item )const
284  {
285  if( !_subscribe_callback )
286  return false;
287 
288  vector<char> key = get_subscription_key( item );
289  return _subscribe_filter.contains( key.data(), key.size() );
290  }
291 
292  // for full-account subscription
293  bool is_impacted_account( const flat_set<account_id_type>& accounts );
294 
295  // for market subscription
296  template<typename T>
297  const std::pair<asset_id_type,asset_id_type> get_order_market( const T& order )
298  {
299  return order.get_market();
300  }
301 
302  // for market subscription
303  const std::pair<asset_id_type,asset_id_type> get_order_market( const force_settlement_object& order )
304  {
305  // TODO cache the result to avoid repeatly fetching from db
306  asset_id_type backing_id = order.balance.asset_id( _db ).bitasset_data( _db ).options.short_backing_asset;
307  auto tmp = std::make_pair( order.balance.asset_id, backing_id );
308  if( tmp.first > tmp.second ) std::swap( tmp.first, tmp.second );
309  return tmp;
310  }
311 
312  template<typename T>
313  void enqueue_if_subscribed_to_market(const object* obj, market_queue_type& queue, bool full_object=true)
314  {
315  const T* order = dynamic_cast<const T*>(obj);
316  FC_ASSERT( order != nullptr);
317 
318  const auto& market = get_order_market( *order );
319 
320  auto sub = _market_subscriptions.find( market );
321  if( sub != _market_subscriptions.end() ) {
322  queue[market].emplace_back( full_object ? obj->to_variant() : fc::variant(obj->id, 1) );
323  }
324  }
325 
326  void broadcast_updates( const vector<variant>& updates );
327  void broadcast_market_updates( const market_queue_type& queue);
328  void handle_object_changed( bool force_notify,
329  bool full_object,
330  const vector<object_id_type>& ids,
331  const flat_set<account_id_type>& impacted_accounts,
332  std::function<const object*(object_id_type id)> find_object );
333 
335  void on_objects_new(const vector<object_id_type>& ids, const flat_set<account_id_type>& impacted_accounts);
336  void on_objects_changed(const vector<object_id_type>& ids, const flat_set<account_id_type>& impacted_accounts);
337  void on_objects_removed(const vector<object_id_type>& ids, const vector<const object*>& objs,
338  const flat_set<account_id_type>& impacted_accounts);
339  void on_applied_block();
340 
342  // Member variables
344 
345  bool _notify_remove_create = false;
347 
349  std::set<account_id_type> _subscribed_accounts;
350 
351  std::function<void(const fc::variant&)> _subscribe_callback;
352  std::function<void(const fc::variant&)> _pending_trx_callback;
353  std::function<void(const fc::variant&)> _block_applied_callback;
354 
360 
361  map< pair<asset_id_type,asset_id_type>, std::function<void(const variant&)> > _market_subscriptions;
362 
365 
367 };
368 
369 } } // graphene::app
void insert(const unsigned char *key_begin, const std::size_t &length)
std::string get_transaction_hex_without_sig(const signed_transaction &trx) const
set< address > get_potential_address_signatures(const signed_transaction &trx) const
map< pair< asset_id_type, asset_id_type >, std::function< void(const variant &)> > _market_subscriptions
optional< signed_block > get_block(uint32_t block_num) const
void on_objects_changed(const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts)
void set_subscribe_callback(std::function< void(const variant &)> cb, bool notify_remove_create)
vector< optional< committee_member_object > > get_committee_members(const vector< committee_member_id_type > &committee_member_ids) const
market_ticker get_ticker(const string &base, const string &quote, bool skip_order_book=false) const
processed_transaction get_transaction(uint32_t block_num, uint32_t trx_in_block) const
vector< worker_object > get_workers_by_account(const std::string account_id_or_name) const
void set_block_applied_callback(std::function< void(const variant &block_id)> cb)
set< public_key_type > get_potential_signatures(const signed_transaction &trx) const
optional< block_header > get_block_header(uint32_t block_num) const
const asset_object * get_asset_from_string(const std::string &symbol_or_id, bool throw_if_not_found=true) const
void pack(Stream &s, const flat_set< T, A... > &value, uint32_t _max_depth)
Definition: flat.hpp:11
bool verify_account_authority(const string &account_name_or_id, const flat_set< public_key_type > &signers) const
std::function< void(const fc::variant &)> _pending_trx_callback
bool is_public_key_registered(string public_key) const
boost::signals2::scoped_connection _change_connection
void set_auto_subscription(bool enable)
void subscribe_to_market(std::function< void(const variant &)> callback, const std::string &a, const std::string &b)
dynamic_global_property_object get_dynamic_global_properties() const
vector< withdraw_permission_object > get_withdraw_permissions_by_giver(const std::string account_id_or_name, withdraw_permission_id_type start, uint32_t limit) const
void unsubscribe_from_market(const std::string &a, const std::string &b)
This class represents an account on the object graphAccounts are the primary unit of authority on the...
bool is_impacted_account(const flat_set< account_id_type > &accounts)
Maintains global state information (committee_member list, current fees)This is an implementation det...
tracks the blockchain state in an extensible manner
Definition: database.hpp:70
An order-perserving dictionary of variant&#39;s.
Definition: api.cpp:56
void on_objects_removed(const vector< object_id_type > &ids, const vector< const object * > &objs, const flat_set< account_id_type > &impacted_accounts)
vector< balance_object > get_balance_objects(const vector< address > &addrs) const
const std::pair< asset_id_type, asset_id_type > get_order_market(const force_settlement_object &order)
vector< char > get_subscription_key(const object_id_type &item) const
database_api_impl(graphene::chain::database &db, const application_options *app_options)
std::vector< variant > variants
Definition: variant.hpp:170
void set_pending_transaction_callback(std::function< void(const variant &)> cb)
void broadcast_updates(const vector< variant > &updates)
bool valid() const
Definition: optional.hpp:186
std::function< void(const fc::variant &)> _block_applied_callback
vector< htlc_object > list_htlcs(const htlc_id_type lower_bound_id, uint32_t limit) const
asset_id_type get_asset_id_from_string(const std::string &symbol_or_id) const
boost::signals2::scoped_connection _pending_trx_connection
optional< share_type > total_backing_collateral
bool get_whether_to_subscribe(optional< bool > subscribe) const
vector< extended_asset_object > get_assets_by_issuer(const std::string &issuer_name_or_id, asset_id_type start, uint32_t limit) const
vector< limit_order_object > get_limit_orders(const std::string &a, const std::string &b, uint32_t limit) const
market_volume get_24_volume(const string &base, const string &quote) const
vector< optional< witness_object > > get_witnesses(const vector< witness_id_type > &witness_ids) const
provides stack-based nullable value similar to boost::optional
Definition: optional.hpp:20
void enqueue_if_subscribed_to_market(const object *obj, market_queue_type &queue, bool full_object=true)
vector< call_order_object > get_call_orders(const std::string &a, uint32_t limit) const
account_id_type get_account_id_from_string(const std::string &name_or_id) const
fc::optional< committee_member_object > get_committee_member_by_account(const std::string account_id_or_name) const
vector< htlc_object > get_htlc_by_to(const std::string account_id_or_name, htlc_id_type start, uint32_t limit) const
std::set< account_id_type > _subscribed_accounts
vector< worker_object > get_all_workers(const optional< bool > is_expired=optional< bool >()) const
chain_property_object get_chain_properties() const
vector< fc::variant > get_required_fees(const vector< operation > &ops, const std::string &asset_id_or_symbol) const
vector< market_trade > get_trade_history(const string &base, const string &quote, fc::time_point_sec start, fc::time_point_sec stop, unsigned limit=100) const
object_id_type id
Definition: object.hpp:73
vector< limit_order_object > get_account_limit_orders(const string &account_name_or_id, const string &base, const string &quote, uint32_t limit, optional< limit_order_id_type > ostart_id, optional< price > ostart_price)
void handle_object_changed(bool force_notify, bool full_object, const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts, std::function< const object *(object_id_type id)> find_object)
contains only the public point of an elliptic curve key.
Definition: elliptic.hpp:35
fc::variants get_objects(const vector< object_id_type > &ids, optional< bool > subscribe) const
This secondary index tracks how much of each asset is locked up as collateral for MPAs...
std::map< string, full_account > get_full_accounts(const vector< string > &names_or_ids, optional< bool > subscribe)
optional< account_object > get_account_by_name(string name) const
std::function< void(const fc::variant &)> _subscribe_callback
tracks bitassets scheduled for force settlement at some point in the future.
virtual bool contains(const unsigned char *key_begin, const std::size_t length) const
vector< asset > get_account_balances(const std::string &account_name_or_id, const flat_set< asset_id_type > &assets) const
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
Definition: exception.hpp:345
graphene::chain::database & _db
vector< optional< extended_asset_object > > lookup_asset_symbols(const vector< string > &symbols_or_ids) const
order_book get_order_book(const string &base, const string &quote, unsigned limit=50) const
chain_id_type get_chain_id() const
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object&#39;s.
Definition: variant.hpp:198
processed_transaction validate_transaction(const signed_transaction &trx) const
extended_asset_object extend_asset(ASSET &&a) const
optional< htlc_object > get_htlc(htlc_id_type id, optional< bool > subscribe) const
vector< call_order_object > get_margin_positions(const std::string account_id_or_name) const
vector< account_id_type > get_account_references(const std::string account_id_or_name) const
vector< flat_set< account_id_type > > get_key_references(vector< public_key_type > key) const
void subscribe_to_item(const T &item) const
vector< force_settlement_object > get_settle_orders_by_account(const std::string &account_name_or_id, force_settlement_id_type start, uint32_t limit) const
vector< asset > get_vested_balances(const vector< balance_id_type > &objs) const
std::string get_transaction_hex(const signed_transaction &trx) const
boost::signals2::scoped_connection _new_connection
vector< limit_order_object > get_limit_orders_by_account(const string &account_name_or_id, optional< uint32_t > limit, optional< limit_order_id_type > start_id)
boost::signals2::scoped_connection _applied_block_connection
std::map< std::pair< graphene::chain::asset_id_type, graphene::chain::asset_id_type >, std::vector< fc::variant > > market_queue_type
share_type get_amount_in_collateral(const asset_id_type &asset) const
vector< htlc_object > get_htlc_by_from(const std::string account_id_or_name, htlc_id_type start, uint32_t limit) const
fc::variant_object get_config() const
map< uint32_t, optional< block_header > > get_block_header_batch(const vector< uint32_t > block_nums) const
vector< proposal_object > get_proposed_transactions(const std::string account_id_or_name) const
void on_objects_new(const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts)
tracks the parameters of an assetAll assets have a globally unique symbol name that controls how they...
const account_object * get_account_from_string(const std::string &name_or_id, bool throw_if_not_found=true) const
share_type get_backing_collateral(const asset_id_type &asset) const
void broadcast_market_updates(const market_queue_type &queue)
vector< force_settlement_object > get_settle_orders(const std::string &a, uint32_t limit) const
map< string, committee_member_id_type > lookup_committee_member_accounts(const string &lower_bound_name, uint32_t limit) const
asset_id_type asset_id
Definition: asset.hpp:39
bool verify_authority(const signed_transaction &trx) const
map< string, account_id_type > lookup_accounts(const string &lower_bound_name, uint32_t limit, optional< bool > subscribe) const
set< public_key_type > get_required_signatures(const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
vector< optional< account_object > > get_accounts(const vector< std::string > &account_names_or_ids, optional< bool > subscribe) const
bool is_subscribed_to_item(const T &item) const
map< string, witness_id_type > lookup_witness_accounts(const string &lower_bound_name, uint32_t limit) const
Maintains global state information (committee_member list, current fees)This is an implementation det...
const std::pair< asset_id_type, asset_id_type > get_order_market(const T &order)
optional< share_type > total_in_collateral
optional< asset_bitasset_data_id_type > bitasset_data_id
Extra data associated with BitAssets. This field is non-null if and only if is_market_issued() return...
boost::signals2::scoped_connection scoped_connection
Definition: signals.hpp:22
void cancel_all_subscriptions(bool reset_callback, bool reset_market_subscriptions)
vector< market_ticker > get_top_markets(uint32_t limit) const
vector< optional< account_object > > lookup_account_names(const vector< string > &account_names) const
vector< collateral_bid_object > get_collateral_bids(const std::string &asset, uint32_t limit, uint32_t start) const
vector< call_order_object > get_call_orders_by_account(const std::string &account_name_or_id, asset_id_type start, uint32_t limit) const
global_property_object get_global_properties() const
vector< vesting_balance_object > get_vesting_balances(const std::string account_id_or_name) const
vector< market_trade > get_trade_history_by_sequence(const string &base, const string &quote, int64_t start, fc::time_point_sec stop, unsigned limit=100) const
fc::optional< witness_object > get_witness_by_account(const std::string account_id_or_name) const
vector< blinded_balance_object > get_blinded_balances(const flat_set< commitment_type > &commitments) const
const application_options * _app_options
captures the result of evaluating the operations contained in the transaction
vector< asset > get_named_account_balances(const std::string &name, const flat_set< asset_id_type > &assets) const
vector< optional< extended_asset_object > > get_assets(const vector< std::string > &asset_symbols_or_ids, optional< bool > subscribe) const
const graphene::api_helper_indexes::amount_in_collateral_index * amount_in_collateral_index
vector< variant > lookup_vote_ids(const vector< vote_id_type > &votes) const
boost::signals2::scoped_connection _removed_connection
vector< withdraw_permission_object > get_withdraw_permissions_by_recipient(const std::string account_id_or_name, withdraw_permission_id_type start, uint32_t limit) const
vector< extended_asset_object > list_assets(const string &lower_bound_symbol, uint32_t limit) const