create account

Draft list of all API calls within the Steem codebase by l0k1

View this thread on: hive.blogpeakd.comecency.com
· @l0k1 ·
$1.58
Draft list of all API calls within the Steem codebase
<div class="pull-left"><h1>Since</h1></div> <br />now there is no limit on posts per day that may be made, I can post lots more, but I don't really have tons of things to post, I am logging the process of essentially documenting the Steem blockchain application, `steemd` and how you interface with it, because, well, if you are following my posts you know that I intend to make it so that the community cannot be abandoned, if it does come to that.

Anyway, so, using the following one-liner on the shell on the repository of steem, you get the result I will post after (though there is a couple of parts I have to go back and check because there is arbitrary line breaks in between):

`find steem|grep api\.cpp$|xargs cat|grep api\:\:|grep -v ASSERT|grep -v '^ '|grep -v '^/'|sed 's/  / /g'|sed 's/  / /g'|sed 's/^ //g'`

and the output:

> void database_api::set_subscribe_callback( std::function&lt;void(const variant&)&gt; cb, bool clear_filter )
> void database_api::set_pending_transaction_callback( std::function&lt;void(const variant&)&gt; cb )
> void database_api::set_block_applied_callback( std::function&lt;void(const variant& block_id)&gt; cb )
> void database_api::cancel_all_subscriptions()
> database_api::database_api( const steemit::app::api_context& ctx )
> database_api::~database_api() {}
> void database_api::on_api_startup() {}
> optional&lt;block_header&gt; database_api::get_block_header(uint32_t block_num)const
> optional&lt;signed_block&gt; database_api::get_block(uint32_t block_num)const
> vector&lt;applied_operation&gt; database_api::get_ops_in_block(uint32_t block_num, bool only_virtual)const
> fc::variant_object database_api::get_config()const
> dynamic_global_property_api_obj database_api::get_dynamic_global_properties()const
> chain_properties database_api::get_chain_properties()const
> feed_history_api_obj database_api::get_feed_history()const
> price database_api::get_current_median_history_price()const
> witness_schedule_api_obj database_api::get_witness_schedule()const
> hardfork_version database_api::get_hardfork_version()const
> scheduled_hardfork database_api::get_next_scheduled_hardfork() const
> reward_fund_api_obj database_api::get_reward_fund( string name )const
> vector&lt;set&lt;string&gt;&gt; database_api::get_key_references( vector&lt;public_key_type&gt; key )const
> vector&lt; extended_account &gt; database_api::get_accounts( vector&lt; string &gt; names )const
> vector&lt;account_id_type&gt; database_api::get_account_references( account_id_type account_id )const
> vector&lt;optional&lt;account_api_obj&gt;&gt; database_api::lookup_account_names(const vector&lt;string&gt;& account_names)const
> set&lt;string&gt; database_api::lookup_accounts(const string& lower_bound_name, uint32_t limit)const
> uint64_t database_api::get_account_count()const
> vector&lt; owner_authority_history_api_obj &gt; database_api::get_owner_history( string account )const
> optional&lt; account_recovery_request_api_obj &gt; database_api::get_recovery_request( string account )const
> optional&lt; escrow_api_obj &gt; database_api::get_escrow( string from, uint32_t escrow_id )const
> vector&lt; withdraw_route &gt; database_api::get_withdraw_routes( string account, withdraw_route_type type )const
> optional&lt; account_bandwidth_api_obj &gt; database_api::get_account_bandwidth( string account, bandwidth_type type )const
> vector&lt;optional&lt;witness_api_obj&gt;&gt; database_api::get_witnesses(const vector&lt;witness_id_type&gt;& witness_ids)const
> fc::optional&lt;witness_api_obj&gt; database_api::get_witness_by_account( string account_name ) const
> vector&lt; witness_api_obj &gt; database_api::get_witnesses_by_vote( string from, uint32_t limit )const
> set&lt; account_name_type &gt; database_api::lookup_witness_accounts( const string& lower_bound_name, uint32_t limit ) const
> uint64_t database_api::get_witness_count()const
> order_book database_api::get_order_book( uint32_t limit )const
> vector&lt;extended_limit_order&gt; database_api::get_open_orders( string owner )const
> vector&lt; liquidity_balance &gt; database_api::get_liquidity_queue( string start_account, uint32_t limit )const
> std::string database_api::get_transaction_hex(const signed_transaction& trx)const
> set&lt;public_key_type&gt; database_api::get_required_signatures( const signed_transaction& trx, const flat_set&lt;public_key_type>& available_keys )const
> set&lt;public_key_type&gt; database_api::get_potential_signatures( const signed_transaction& trx )const
> bool database_api::verify_authority( const signed_transaction& trx ) const
> bool database_api::verify_account_authority( const string& name_or_id, const flat_set&lt;public_key_type&gt;& signers )const
> vector&lt;convert_request_api_obj&gt; database_api::get_conversion_requests( const string& account )const
> discussion database_api::get_content( string author, string permlink )const
> vector&lt;vote_state&gt; database_api::get_active_votes( string author, string permlink )const
> vector&lt;account_vote&gt; database_api::get_account_votes( string voter )const
> void database_api::set_pending_payout( discussion& d )const
> void database_api::set_url( discussion& d )const
> vector&lt;discussion&gt; database_api::get_content_replies( string author, string permlink )const
> vector&lt;discussion&gt; database_api::get_replies_by_last_update( account_name_type start_parent_author, string start_permlink, uint32_t limit )const
> map&lt; uint32_t, applied_operation &gt; database_api::get_account_history( string account, uint64_t from, uint32_t limit )const
> vector&lt;pair&lt;string,uint32_t&gt; &gt; database_api::get_tags_used_by_author( const string& author )const {
>vector&lt;tag_api_obj&gt; database_api::get_trending_tags( string after, uint32_t limit )const
> discussion database_api::get_discussion( comment_id_type id, uint32_t truncate_body )const
> vector&lt;discussion&gt; database_api::get_discussions( const discussion_query& query, const string& tag,                                                   comment_id_type parent, const Index& tidx, StartItr tidx_itr, uint32_t truncate_body, const std::function&lt; bool(const comment_api_obj& ) &gt;& filter, const std::function&lt; bool(const comment_api_obj& ) &gt;& exit, const std::function&lt; bool(const tags::tag_object& ) &gt;& tag_exit, bool ignore_parent )const
comment_id_type database_api::get_parent( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_payout( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_post_discussions_by_payout( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_comment_discussions_by_payout( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_promoted( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_trending( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_created( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_active( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_cashout( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_votes( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_children( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_hot( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_feed( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_blog( const discussion_query& query )const
> vector&lt;discussion&gt; database_api::get_discussions_by_comments( const discussion_query& query )const
> vector&lt;category_api_obj&gt; database_api::get_trending_categories( string after, uint32_t limit )const
> vector&lt;category_api_obj&gt; database_api::get_best_categories( string after, uint32_t limit )const
> vector&lt;category_api_obj&gt; database_api::get_active_categories( string after, uint32_t limit )const
> vector&lt;category_api_obj&gt; database_api::get_recent_categories( string after, uint32_t limit )const
> void database_api::recursively_fetch_content( state& _state, discussion& root, set&lt;string&gt;& referenced_accounts )const
> vector&lt;account_name_type&gt; database_api::get_miner_queue()const
> vector&lt; account_name_type &gt; database_api::get_active_witnesses()const
> vector&lt;discussion&gt; database_api::get_discussions_by_author_before_date(string author, string start_permlink, time_point_sec before_date, uint32_t limit )const
> vector&lt; savings_withdraw_api_obj &gt; database_api::get_savings_withdraw_from( string account )const
> vector&lt; savings_withdraw_api_obj &gt; database_api::get_savings_withdraw_to( string account )const
> vector&lt; vesting_delegation_api_obj &gt; database_api::get_vesting_delegations( string account, string from, uint32_t limit )const
> vector&lt; vesting_delegation_expiration_api_obj &gt; database_api::get_expiring_vesting_delegations( string account,  time_point_sec from, uint32_t limit )const
> state database_api::get_state( string path )const
> annotated_signed_transaction database_api::get_transaction( transaction_id_type id )const
> blockchain_statistics_api::blockchain_statistics_api( const steemit::app::api_context& ctx )
>void blockchain_statistics_api::on_api_startup() {}
> statistics blockchain_statistics_api::get_stats_for_time( fc::time_point_sec open, uint32_t interval )const
> statistics blockchain_statistics_api::get_stats_for_interval( fc::time_point_sec start, fc::time_point_sec end )const
> statistics blockchain_statistics_api::get_lifetime_stats()const
> account_by_key_api::account_by_key_api( const steemit::app::api_context& ctx )
> void account_by_key_api::on_api_startup() {}
> vector&lt; vector&lt; account_name_type &gt; &gt; account_by_key_api::get_key_references( vector&lt; public_key_type &gt; keys )const
> follow_api::follow_api( const steemit::app::api_context& ctx )
> void follow_api::on_api_startup() {}
> vector&lt;follow_api_obj&gt; follow_api::get_followers( string following, string start_follower, follow_type type, uint16_t limit )const
> vector&lt;follow_api_obj&gt; follow_api::get_following( string follower, string start_following, follow_type type, uint16_t limit )const
> follow_count_api_obj follow_api::get_follow_count( string account )const
> vector&lt; feed_entry &gt; follow_api::get_feed_entries( string account, uint32_t entry_id, uint16_t limit )const
> vector&lt; comment_feed_entry &gt; follow_api::get_feed( string account, uint32_t entry_id, uint16_t limit )const
> vector&lt; blog_entry &gt; follow_api::get_blog_entries( string account, uint32_t entry_id, uint16_t limit )const
> vector&lt; comment_blog_entry &gt; follow_api::get_blog( string account, uint32_t entry_id, uint16_t limit )const
> vector&lt; account_reputation &gt; follow_api::get_account_reputations( string lower_bound_name, uint32_t limit )const
> vector&lt; account_name_type &gt; follow_api::get_reblogged_by( const string& author, const string& permlink )const {
> vector&lt; pair&lt; account_name_type, uint32_t &gt; &gt; follow_api::get_blog_authors( const account_name_type& blog )const {
auth_util_api::auth_util_api( const steemit::app::api_context& ctx )
> void auth_util_api::on_api_startup() { }
> check_authority_signature_result auth_util_api::check_authority_signature( check_authority_signature_params args )
> raw_block_api::raw_block_api( const steemit::app::api_context& ctx )
> get_raw_block_result raw_block_api::get_raw_block( get_raw_block_args args )
> void raw_block_api::push_raw_block( std::string block_b64 )
> void raw_block_api::on_api_startup() { }
> market_history_api::market_history_api( const steemit::app::api_context& ctx )
> void market_history_api::on_api_startup() {}
> market_ticker market_history_api::get_ticker() const
> market_volume market_history_api::get_volume() const
> order_book market_history_api::get_order_book( uint32_t limit ) const
> std::vector&lt; market_trade &gt; market_history_api::get_trade_history( time_point_sec start, time_point_sec end, uint32_t limit ) const
> std::vector&lt; market_trade &gt; market_history_api::get_recent_trades( uint32_t limit ) const
> std::vector&lt; bucket_object &gt; market_history_api::get_market_history( uint32_t bucket_seconds, time_point_sec start, time_point_sec end ) const
> flat_set&lt; uint32_t &gt; market_history_api::get_market_history_buckets() const
> account_statistics_api::account_statistics_api( const steemit::app::api_context& ctx )
> void account_statistics_api::on_api_startup() {}
> block_info_api::block_info_api( const steemit::app::api_context& ctx )
> std::vector&lt; block_info &gt; block_info_api::get_block_info( get_block_info_args args )
> std::vector&lt; block_with_info &gt; block_info_api::get_blocks_with_info( get_block_info_args args )
> void block_info_api::on_api_startup() { }
> debug_node_api::debug_node_api( const steemit::app::api_context& ctx )
> void debug_node_api::on_api_startup() {}
> uint32_t debug_node_api::debug_push_blocks( std::string source_filename, uint32_t count, bool skip_validate_invariants )
> uint32_t debug_node_api::debug_generate_blocks( std::string debug_key, uint32_t count )
> uint32_t debug_node_api::debug_generate_blocks_until( std::string debug_key, fc::time_point_sec head_block_time, bool generate_sparsely )
> fc::optional&lt; steemit::chain::signed_block &gt; debug_node_api::debug_pop_block()
> steemit::chain::witness_schedule_object debug_node_api::debug_get_witness_schedule()
> steemit::chain::hardfork_property_object debug_node_api::debug_get_hardfork_property_object()
> void debug_node_api::debug_update_object( fc::variant_object update )
> fc::variant_object debug_node_api::debug_get_edits()
> void debug_node_api::debug_set_edits( fc::variant_object edits )
> void debug_node_api::debug_set_dev_key_prefix( std::string prefix )
> get_dev_key_result debug_node_api::debug_get_dev_key( get_dev_key_args args )
> debug_mine_result debug_node_api::debug_mine( debug_mine_args args )
> void debug_node_api::debug_stream_json_objects( std::string filename )
> void debug_node_api::debug_stream_json_objects_flush()
> void debug_node_api::debug_set_hardfork( uint32_t hardfork_id )
> bool debug_node_api::debug_has_hardfork( uint32_t hardfork_id )
> std::string debug_node_api::debug_get_json_schema()

## NOTE

This possibly could be somewhat inaccurate in places, but it should be practically complete. I will be next working on going into each of these functions to check the structures they return.

<div class="pull-right">😎</div><br /><hr />

<center><code>We can't code here! This is Whale country!</code></center>
<div class="pull-left"><a href="https://steemit.com/@l0k1"><img src="http://s20.postimg.org/igf27v79p/signature_new_small.png" /></a></div>

<h2>Vote #1 <code>l0k1</code></h2><sub>Go to <a href="https://steemit.com/~witnesses">steemit.com/~witnesses</a> to cast your vote by typing <code>l0k1</code> into the text entry at the bottom of the leaderboard.</sub>

<sub>(note, my username is spelled <code>El Zero Kay One</code> or <code>Lima Zero Kilo One</code>, all lower case)</sub>

</div>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 287 others
👎  ,
properties (23)
authorl0k1
permlinkdraft-list-of-all-api-calls-within-the-steem-codebase
categorydawn-network
json_metadata{"tags":["dawn-network","steemdev","development","shell"],"image":["http://s20.postimg.org/igf27v79p/signature_new_small.png"],"links":["https://steemit.com/@l0k1","https://steemit.com/~witnesses"],"app":"steemit/0.1","format":"markdown"}
created2017-04-01 18:07:09
last_update2017-04-01 18:07:09
depth0
children3
last_payout2017-04-08 18:07:09
cashout_time1969-12-31 23:59:59
total_payout_value1.297 HBD
curator_payout_value0.282 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length15,438
author_reputation94,800,257,230,993
root_title"Draft list of all API calls within the Steem codebase"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,918,242
net_rshares12,727,300,050,408
author_curate_reward""
vote details (353)
@personz ·
Nice, ya big nerd 😜 😎
👍  ,
properties (23)
authorpersonz
permlinkre-l0k1-draft-list-of-all-api-calls-within-the-steem-codebase-20170402t134825418z
categorydawn-network
json_metadata{"tags":["dawn-network"],"app":"steemit/0.1"}
created2017-04-02 13:48:21
last_update2017-04-02 13:48:21
depth1
children0
last_payout2017-04-09 13:48:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length21
author_reputation42,452,361,038,560
root_title"Draft list of all API calls within the Steem codebase"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,923,793
net_rshares170,265,924,325
author_curate_reward""
vote details (2)
@remlaps ·
> find steem|grep api\.cpp$|xargs cat|grep api\:\:|grep -v ASSERT|grep -v '^ '|grep -v '^/'|sed 's/ / /g'|sed 's/ / /g'|sed 's/^ //g'

Just for fun, thought I'd take a swipe at removing some of the pipelines.   I think this is more or less the same thing...

    find steem -name \*api.cpp -exec sed -n '/ASSERT/ d;/^\// d;/^ / d;s/  */ /g;/api\:\:/ p' {} \;
👍  
properties (23)
authorremlaps
permlinkre-l0k1-draft-list-of-all-api-calls-within-the-steem-codebase-20170402t014908712z
categorydawn-network
json_metadata{"tags":["dawn-network"],"app":"steemit/0.1"}
created2017-04-02 01:49:12
last_update2017-04-02 01:49:12
depth1
children1
last_payout2017-04-09 01:49:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length358
author_reputation33,149,047,814,372
root_title"Draft list of all API calls within the Steem codebase"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,920,878
net_rshares158,067,730,310
author_curate_reward""
vote details (1)
@l0k1 · (edited)
btw, two of the functions get chopped out of the code, one of them has a very long parameter list one to a line, and another one with a break. I used `grep \($` to isolate them so I could manually add their parameters.

Yeah, so many pipes is just an easy way to build up the correct substitutions and filters bit by bit until you have the right lines coming out.
👍  
properties (23)
authorl0k1
permlinkre-remlaps-re-l0k1-draft-list-of-all-api-calls-within-the-steem-codebase-20170402t085900970z
categorydawn-network
json_metadata{"tags":["dawn-network"],"app":"steemit/0.1"}
created2017-04-02 08:59:03
last_update2017-04-02 09:00:00
depth2
children0
last_payout2017-04-09 08:59:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length363
author_reputation94,800,257,230,993
root_title"Draft list of all API calls within the Steem codebase"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,922,453
net_rshares13,620,273,736
author_curate_reward""
vote details (1)