Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain_api_plugin Class Reference

#include <chain_api_plugin.hpp>

Inheritance diagram for sysio::chain_api_plugin:
Collaboration diagram for sysio::chain_api_plugin:

Public Member Functions

 APPBASE_PLUGIN_REQUIRES ((chain_plugin)(http_plugin)) chain_api_plugin()
 
virtual ~chain_api_plugin ()
 
virtual void set_program_options (options_description &, options_description &) override
 
void plugin_initialize (const variables_map &)
 
void plugin_startup ()
 
void plugin_shutdown ()
 
- Public Member Functions inherited from appbase::plugin< chain_api_plugin >
 plugin ()
 
virtual ~plugin ()
 
virtual state get_state () const override
 
virtual const std::string & name () const override
 
virtual void register_dependencies ()
 
virtual void initialize (const variables_map &options) override
 
virtual void handle_sighup () override
 
virtual void startup () override
 
virtual void shutdown () override
 
- Public Member Functions inherited from appbase::abstract_plugin
virtual ~abstract_plugin ()
 

Additional Inherited Members

- Public Types inherited from appbase::abstract_plugin
enum  state { registered , initialized , started , stopped }
 
- Protected Member Functions inherited from appbase::plugin< chain_api_plugin >
 plugin (const string &name)
 

Detailed Description

Definition at line 13 of file chain_api_plugin.hpp.

Constructor & Destructor Documentation

◆ ~chain_api_plugin()

sysio::chain_api_plugin::~chain_api_plugin ( )
virtual

Definition at line 22 of file chain_api_plugin.cpp.

22{}

Member Function Documentation

◆ APPBASE_PLUGIN_REQUIRES()

sysio::chain_api_plugin::APPBASE_PLUGIN_REQUIRES ( (chain_plugin)(http_plugin) )

◆ plugin_initialize()

void sysio::chain_api_plugin::plugin_initialize ( const variables_map & )

Definition at line 25 of file chain_api_plugin.cpp.

25{}

◆ plugin_shutdown()

void sysio::chain_api_plugin::plugin_shutdown ( )

Definition at line 150 of file chain_api_plugin.cpp.

150{}

◆ plugin_startup()

void sysio::chain_api_plugin::plugin_startup ( )

Definition at line 95 of file chain_api_plugin.cpp.

95 {
96 ilog( "starting chain_api_plugin" );
97 my.reset(new chain_api_plugin_impl(app().get_plugin<chain_plugin>().chain()));
98 auto& chain = app().get_plugin<chain_plugin>();
99 auto ro_api = chain.get_read_only_api();
100 auto rw_api = chain.get_read_write_api();
101
102 auto& _http_plugin = app().get_plugin<http_plugin>();
103 ro_api.set_shorten_abi_errors( !_http_plugin.verbose_errors() );
104
105 _http_plugin.add_api( {
107 _http_plugin.add_api({
108 CHAIN_RO_CALL(get_activated_protocol_features, 200, http_params_types::possible_no_params),
111 CHAIN_RO_CALL(get_block_header_state, 200, http_params_types::params_required),
116 CHAIN_RO_CALL(get_raw_code_and_abi, 200, http_params_types::params_required),
119 CHAIN_RO_CALL(get_table_by_scope, 200, http_params_types::params_required),
120 CHAIN_RO_CALL(get_currency_balance, 200, http_params_types::params_required),
121 CHAIN_RO_CALL(get_currency_stats, 200, http_params_types::params_required),
123 CHAIN_RO_CALL(get_producer_schedule, 200, http_params_types::no_params),
124 CHAIN_RO_CALL(get_scheduled_transactions, 200, http_params_types::params_required),
127 CHAIN_RO_CALL(get_required_keys, 200, http_params_types::params_required),
128 CHAIN_RO_CALL(get_transaction_id, 200, http_params_types::params_required),
129 CHAIN_RO_CALL_ASYNC(compute_transaction, chain_apis::read_only::compute_transaction_results, 200, http_params_types::params_required),
131 CHAIN_RW_CALL_ASYNC(push_transaction, chain_apis::read_write::push_transaction_results, 202, http_params_types::params_required),
135 });
136
137 if (chain.account_queries_enabled()) {
138 _http_plugin.add_async_api({
139 CHAIN_RO_CALL_WITH_400(get_accounts_by_authorizers, 200, http_params_types::params_required),
140 });
141 }
142
143 if (chain.transaction_finality_status_enabled()) {
144 _http_plugin.add_async_api({
146 });
147 }
148}
#define CHAIN_RO_CALL_ASYNC(call_name, call_result, http_response_code, params_type)
#define CHAIN_RW_CALL_ASYNC(call_name, call_result, http_response_code, params_type)
#define CHAIN_RO_CALL_WITH_400(call_name, http_response_code, params_type)
#define CHAIN_RO_CALL(call_name, http_response_code, params_type)
abstract_plugin & get_plugin(const string &name) const
push_transaction_results send_transaction_results
vector< push_transaction_results > push_transactions_results
#define ilog(FORMAT,...)
Definition logger.hpp:118
application & app()
void get_account(const string &accountName, const string &coresym, bool json_format)
Definition main.cpp:2211
sysio::chain_apis::read_only::get_info_results get_info()
Definition main.cpp:287
void send_transaction(signed_transaction &trx, packed_transaction::compression_type compression=packed_transaction::compression_type::none)
Definition main.cpp:641
fc::variant push_transaction(signed_transaction &trx, packed_transaction::compression_type compression=packed_transaction::compression_type::none)
Definition main.cpp:325
static constexpr int medium_high
Here is the call graph for this function:

◆ set_program_options()

void sysio::chain_api_plugin::set_program_options ( options_description & ,
options_description &  )
overridevirtual

Implements appbase::abstract_plugin.

Definition at line 24 of file chain_api_plugin.cpp.

24{}

The documentation for this class was generated from the following files: