35 #include <boost/program_options/options_description.hpp>
36 #include <boost/program_options/variables_map.hpp>
39 #include "net/http_server_impl_base.h"
40 #include "net/http_client.h"
47 #undef MONERO_DEFAULT_LOG_CATEGORY
48 #define MONERO_DEFAULT_LOG_CATEGORY "daemon.rpc"
88 static void init_options(boost::program_options::options_description& desc);
90 const boost::program_options::variables_map& vm,
91 const bool restricted,
92 const std::string& port,
93 bool allow_rpc_payment
142 BEGIN_JSON_RPC_MAP("/json_rpc")
263 bool check_core_busy();
264 bool check_core_ready();
270 std::map<
std::
string,
bool> get_public_nodes(uint32_t credits_per_hash_threshold = 0);
271 bool set_bootstrap_daemon(
const std::
string &address,
const std::
string &username_password);
272 bool set_bootstrap_daemon(
const std::
string &address,
const boost::optional<
epee::net_utils::http::login> &credentials);
274 template <
typename COMMAND_TYPE>
275 bool use_bootstrap_daemon_if_necessary(
const invoke_http_mode &mode,
const std::string &command_name,
const typename COMMAND_TYPE::request& req,
typename COMMAND_TYPE::response& res,
bool &r);
276 bool get_block_template(
const account_public_address &address,
const crypto::hash *prev_block,
const cryptonote::blobdata &extra_nonce,
size_t &reserved_offset,
cryptonote::difficulty_type &difficulty, uint64_t &height, uint64_t &expected_reward,
block &
b, uint64_t &seed_height,
crypto::hash &seed_hash,
crypto::hash &next_seed_hash,
epee::json_rpc::error &error_resp);
277 bool check_payment(
const std::string &client, uint64_t payment,
const std::string &rpc,
bool same_ts, std::string &message, uint64_t &credits, std::string &top_hash);