From 358e068e878892eb3cc0f333215708390e51f0c3 Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Tue, 8 Nov 2016 22:55:41 -0500 Subject: Created monero-wallet-rpc, moving functionality from monero-wallet-cli --- src/wallet/wallet2.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/wallet/wallet2.h') diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 3c4b1015f..d42385caf 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -32,6 +32,9 @@ #include #include + +#include +#include #include #include #include @@ -51,6 +54,7 @@ #include "ringct/rctOps.h" #include "wallet_errors.h" +#include "password_container.h" #include #define WALLET_RCP_CONNECTION_TIMEOUT 200000 @@ -95,6 +99,21 @@ namespace tools wallet2(const wallet2&) : m_run(true), m_callback(0), m_testnet(false), m_always_confirm_transfers(true), m_store_tx_info(true), m_default_mixin(0), m_default_priority(0), m_refresh_type(RefreshOptimizeCoinbase), m_auto_refresh(true), m_refresh_from_block_height(0), m_confirm_missing_payment_id(true) {} public: + static const char* tr(const char* str);// { return i18n_translate(str, "cryptonote::simple_wallet"); } + + static bool has_testnet_option(const boost::program_options::variables_map& vm); + static void init_options(boost::program_options::options_description& desc_params); + + //! Uses stdin and stdout. Returns a wallet2 if no errors. + static std::unique_ptr make_from_json(const boost::program_options::variables_map& vm, const std::string& json_file); + + //! Uses stdin and stdout. Returns a wallet2 and password for `wallet_file` if no errors. + static std::pair, password_container> + make_from_file(const boost::program_options::variables_map& vm, const std::string& wallet_file); + + //! Uses stdin and stdout. Returns a wallet2 and password for wallet with no file if no errors. + static std::pair, password_container> make_new(const boost::program_options::variables_map& vm); + wallet2(bool testnet = false, bool restricted = false) : m_run(true), m_callback(0), m_testnet(testnet), m_always_confirm_transfers(true), m_store_tx_info(true), m_default_mixin(0), m_default_priority(0), m_refresh_type(RefreshOptimizeCoinbase), m_auto_refresh(true), m_refresh_from_block_height(0), m_confirm_missing_payment_id(true), m_restricted(restricted), is_old_file_format(false) {} struct transfer_details { -- cgit v1.2.3