Electroneum
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
simplewallet.cpp File Reference

Source file that defines simple_wallet class. More...

#include <boost/bind.hpp>
#include <thread>
#include <iostream>
#include <sstream>
#include <fstream>
#include <ctype.h>
#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>
#include <boost/regex.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include "include_base_utils.h"
#include "common/i18n.h"
#include "common/command_line.h"
#include "common/util.h"
#include "common/dns_utils.h"
#include "common/base58.h"
#include "common/scoped_message_writer.h"
#include "cryptonote_protocol/cryptonote_protocol_handler.h"
#include "simplewallet.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "storages/http_abstract_invoke.h"
#include "rpc/core_rpc_server_commands_defs.h"
#include "crypto/crypto.h"
#include "mnemonics/electrum-words.h"
#include "rapidjson/document.h"
#include "common/json_util.h"
#include "ringct/rctSigs.h"
#include "multisig/multisig.h"
#include "wallet/wallet_args.h"
#include "version.h"
#include <stdexcept>
#include "wallet/message_store.h"
Include dependency graph for simplewallet.cpp:

Namespaces

 anonymous_namespace{simplewallet.cpp}
 

Macros

#define BOOST_BIND_GLOBAL_PLACEHOLDERS   1
 
#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "wallet.simplewallet"
 
#define EXTENDED_LOGS_FILE   "wallet_details.log"
 
#define DEFAULT_MIX   0
 
#define MIN_RING_SIZE   1
 
#define OUTPUT_EXPORT_FILE_MAGIC   "Electroneum output export\003"
 
#define LOCK_IDLE_SCOPE()
 
#define SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD(code)
 
#define SCOPED_WALLET_UNLOCK()   SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD(return true;)
 
#define PRINT_USAGE(usage_help)   fail_msg_writer() << boost::format(tr("usage: %s")) % usage_help;
 
#define LONG_PAYMENT_ID_SUPPORT_CHECK()
 
#define CHECK_SIMPLE_VARIABLE(name, f, help)
 

Typedefs

typedef cryptonote::simple_wallet sw
 

Enumerations

enum  TransferType { Transfer , TransferLocked }
 

Functions

const char * anonymous_namespace{simplewallet.cpp}::USAGE_START_MINING ("start_mining [<number_of_threads>] [bg_mining] [ignore_battery]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_DAEMON ("set_daemon <host>[:<port>] [trusted|untrusted]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SHOW_BALANCE ("balance [detail]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_INCOMING_TRANSFERS ("incoming_transfers [available|unavailable] [verbose] [uses] [index=<N1>[,<N2>[,...]]]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_PAYMENTS ("payments <PID_1> [<PID_2> ... <PID_N>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_PAYMENT_ID ("payment_id")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_TRANSFER ("transfer [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] (<URI> | <address> <amount>) [<payment_id>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_LOCKED_TRANSFER ("locked_transfer [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] (<URI> | <addr> <amount>) <lockblocks> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_LOCKED_SWEEP_ALL ("locked_sweep_all [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <address> <lockblocks> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SWEEP_ALL ("sweep_all [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] [outputs=<N>] <address> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SWEEP_BELOW ("sweep_below <amount_threshold> [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <address> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SWEEP_SINGLE ("sweep_single [<priority>] [<ring_size>] [outputs=<N>] <key_image> <address> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_DONATE ("donate [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <amount> [<payment_id (obsolete)>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SIGN_TRANSFER ("sign_transfer [export_raw]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_LOG ("set_log <level>|{+,-,}<categories>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_ACCOUNT ("account\n" " account new <label text with white spaces allowed>\n" " account switch <index> \n" " account label <index> <label text with white spaces allowed>\n" " account tag <tag_name> <account_index_1> [<account_index_2> ...]\n" " account untag <account_index_1> [<account_index_2> ...]\n" " account tag_description <tag_name> <description>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_ADDRESS ("address [ new <label text with white spaces allowed> | all | <index_min> [<index_max>] | label <index> <label text with white spaces allowed>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_INTEGRATED_ADDRESS ("integrated_address [<payment_id> | <address>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_ADDRESS_BOOK ("address_book [(add ((<address> [pid <id>])|<integrated address>) [<description possibly with whitespaces>])|(delete <index>)]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_VARIABLE ("set <option> [<value>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_TX_KEY ("get_tx_key <txid>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_TX_KEY ("set_tx_key <txid> <tx_key>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_CHECK_TX_KEY ("check_tx_key <txid> <txkey> <address>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_TX_PROOF ("get_tx_proof <txid> <address> [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_CHECK_TX_PROOF ("check_tx_proof <txid> <address> <signature_file> [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_SPEND_PROOF ("get_spend_proof <txid> [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_CHECK_SPEND_PROOF ("check_spend_proof <txid> <signature_file> [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_RESERVE_PROOF ("get_reserve_proof (all|<amount>) [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_CHECK_RESERVE_PROOF ("check_reserve_proof <address> <signature_file> [<message>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SHOW_TRANSFERS ("show_transfers [in|out|pending|failed|pool|coinbase] [index=<N1>[,<N2>,...]] [<min_height> [<max_height>]]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_UNSPENT_OUTPUTS ("unspent_outputs [index=<N1>[,<N2>,...]] [<min_amount> [<max_amount>]]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_RESCAN_BC ("rescan_bc [hard|soft|keep_ki] [start_height=0]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_TX_NOTE ("set_tx_note <txid> [free text note]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_TX_NOTE ("get_tx_note <txid>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_GET_DESCRIPTION ("get_description")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_DESCRIPTION ("set_description [free text note]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SIGN ("sign <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_VERIFY ("verify <filename> <address> <signature>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_EXPORT_KEY_IMAGES ("export_key_images <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_IMPORT_KEY_IMAGES ("import_key_images <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_HW_KEY_IMAGES_SYNC ("hw_key_images_sync")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_HW_RECONNECT ("hw_reconnect")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_EXPORT_OUTPUTS ("export_outputs <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_IMPORT_OUTPUTS ("import_outputs <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SHOW_TRANSFER ("show_transfer <txid>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MAKE_MULTISIG ("make_multisig <threshold> <string1> [<string>...]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_FINALIZE_MULTISIG ("finalize_multisig <string> [<string>...]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_EXCHANGE_MULTISIG_KEYS ("exchange_multisig_keys <string> [<string>...]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_EXPORT_MULTISIG_INFO ("export_multisig_info <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_IMPORT_MULTISIG_INFO ("import_multisig_info <filename> [<filename>...]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SIGN_MULTISIG ("sign_multisig <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SUBMIT_MULTISIG ("submit_multisig <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_EXPORT_RAW_MULTISIG_TX ("export_raw_multisig_tx <filename>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS ("mms [<subcommand> [<subcommand_parameters>]]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_INIT ("mms init <required_signers>/<authorized_signers> <own_label> <own_transport_address>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_INFO ("mms info")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SIGNER ("mms signer [<number> <label> [<transport_address> [<etn_address>]]]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_LIST ("mms list")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_NEXT ("mms next [sync]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SYNC ("mms sync")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_TRANSFER ("mms transfer <transfer_command_arguments>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_DELETE ("mms delete (<message_id> | all)")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SEND ("mms send [<message_id>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_RECEIVE ("mms receive")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_EXPORT ("mms export <message_id>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_NOTE ("mms note [<label> <text>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SHOW ("mms show <message_id>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SET ("mms set <option_name> [<option_value>]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_SEND_SIGNER_CONFIG ("mms send_signer_config")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_START_AUTO_CONFIG ("mms start_auto_config [<label> <label> ...]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_STOP_AUTO_CONFIG ("mms stop_auto_config")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MMS_AUTO_CONFIG ("mms auto_config <auto_config_token>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_PRINT_RING ("print_ring <key_image> | <txid>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SET_RING ("set_ring <filename> | ( <key_image> absolute|relative <index> [<index>...] )")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_UNSET_RING ("unset_ring <txid> | ( <key_image> [<key_image>...] )")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_SAVE_KNOWN_RINGS ("save_known_rings")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MARK_OUTPUT_SPENT ("mark_output_spent <amount>/<offset> | <filename> [add]")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_MARK_OUTPUT_UNSPENT ("mark_output_unspent <amount>/<offset>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_IS_OUTPUT_SPENT ("is_output_spent <amount>/<offset>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_FREEZE ("freeze <key_image>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_THAW ("thaw <key_image>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_FROZEN ("frozen <key_image>")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_NET_STATS ("net_stats")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_WELCOME ("welcome")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_VERSION ("version")
 
const char * anonymous_namespace{simplewallet.cpp}::USAGE_HELP ("help [<command>]")
 
std::string anonymous_namespace{simplewallet.cpp}::input_line (const std::string &prompt, bool yesno=false)
 
epee::wipeable_string anonymous_namespace{simplewallet.cpp}::input_secure_line (const char *prompt)
 
boost::optional< tools::password_containeranonymous_namespace{simplewallet.cpp}::password_prompter (const char *prompt, bool verify)
 
boost::optional< tools::password_containeranonymous_namespace{simplewallet.cpp}::default_password_prompter (bool verify)
 
std::string anonymous_namespace{simplewallet.cpp}::interpret_rpc_response (bool ok, const std::string &status)
 
tools::scoped_message_writer anonymous_namespace{simplewallet.cpp}::success_msg_writer (bool color=false)
 
tools::scoped_message_writer anonymous_namespace{simplewallet.cpp}::message_writer (epee::console_colors color=epee::console_color_default, bool bright=false)
 
tools::scoped_message_writer anonymous_namespace{simplewallet.cpp}::fail_msg_writer ()
 
bool anonymous_namespace{simplewallet.cpp}::parse_bool (const std::string &s, bool &result)
 
template<typename F >
bool anonymous_namespace{simplewallet.cpp}::parse_bool_and_use (const std::string &s, F func)
 
bool anonymous_namespace{simplewallet.cpp}::parse_refresh_type (const std::string &s, tools::wallet2::RefreshType &refresh_type)
 
std::string anonymous_namespace{simplewallet.cpp}::get_refresh_type_name (tools::wallet2::RefreshType type)
 
std::string anonymous_namespace{simplewallet.cpp}::get_version_string (uint32_t version)
 
std::string anonymous_namespace{simplewallet.cpp}::oa_prompter (const std::string &url, const std::vector< std::string > &addresses, bool dnssec_valid)
 
bool anonymous_namespace{simplewallet.cpp}::parse_subaddress_indices (const std::string &arg, std::set< uint32_t > &subaddr_indices)
 
boost::optional< std::pair< uint32_t, uint32_t > > anonymous_namespace{simplewallet.cpp}::parse_subaddress_lookahead (const std::string &str)
 
void anonymous_namespace{simplewallet.cpp}::handle_transfer_exception (const std::exception_ptr &e, bool trusted_daemon)
 
bool anonymous_namespace{simplewallet.cpp}::check_file_overwrite (const std::string &filename)
 
void anonymous_namespace{simplewallet.cpp}::print_secret_key (const crypto::secret_key &k)
 
bool parse_priority (const std::string &arg, uint32_t &priority)
 
std::string join_priority_strings (const char *delimiter)
 
static bool might_be_partial_seed (const epee::wipeable_string &words)
 
static bool datestr_to_int (const std::string &heightstr, uint16_t &year, uint8_t &month, uint8_t &day)
 
static std::string get_human_readable_timespan (std::chrono::seconds seconds)
 
int main (int argc, char *argv[])
 

Variables

const std::array< const char *const, 5 > anonymous_namespace{simplewallet.cpp}::allowed_priority_strings = {{"default", "unimportant", "normal", "elevated", "priority"}}
 
const auto anonymous_namespace{simplewallet.cpp}::arg_wallet_file = wallet_args::arg_wallet_file()
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_new_wallet = {"generate-new-wallet", sw::tr("Generate new wallet and save it to <arg>"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_from_device = {"generate-from-device", sw::tr("Generate new wallet from device and save it to <arg>"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_from_view_key = {"generate-from-view-key", sw::tr("Generate incoming-only wallet from view key"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_from_spend_key = {"generate-from-spend-key", sw::tr("Generate deterministic wallet from spend key"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_from_keys = {"generate-from-keys", sw::tr("Generate wallet from private keys"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_generate_from_multisig_keys = {"generate-from-multisig-keys", sw::tr("Generate a master wallet from multisig wallet keys"), ""}
 
const auto anonymous_namespace{simplewallet.cpp}::arg_generate_from_json = wallet_args::arg_generate_from_json()
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_mnemonic_language = {"mnemonic-language", sw::tr("Language for mnemonic"), ""}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_electrum_seed = {"electrum-seed", sw::tr("Specify Electrum seed for wallet recovery/creation"), ""}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_restore_deterministic_wallet = {"restore-deterministic-wallet", sw::tr("Recover wallet using Electrum-style mnemonic seed"), false}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_restore_multisig_wallet = {"restore-multisig-wallet", sw::tr("Recover multisig wallet using Electrum-style mnemonic seed"), false}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_non_deterministic = {"non-deterministic", sw::tr("Generate non-deterministic view and spend keys"), false}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_allow_mismatched_daemon_version = {"allow-mismatched-daemon-version", sw::tr("Allow communicating with a daemon that uses a different RPC version"), false}
 
const command_line::arg_descriptor< uint64_t > anonymous_namespace{simplewallet.cpp}::arg_restore_height = {"restore-height", sw::tr("Restore from specific blockchain height"), 0}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_restore_date = {"restore-date", sw::tr("Restore from estimated blockchain height on specified date"), ""}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_do_not_relay = {"do-not-relay", sw::tr("The newly created transaction will not be relayed to the electroneum network"), false}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_create_address_file = {"create-address-file", sw::tr("Create an address file for new wallets"), false}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::arg_subaddress_lookahead = {"subaddress-lookahead", tools::wallet2::tr("Set subaddress lookahead sizes to <major>:<minor>"), ""}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_use_english_language_names = {"use-english-language-names", sw::tr("Display English language names"), false}
 
const command_line::arg_descriptor< boolanonymous_namespace{simplewallet.cpp}::arg_long_payment_id_support = {"long-payment-id-support-bad-for-privacy", sw::tr("Support obsolete long (unencrypted) payment ids (using them harms your privacy)"), true}
 
const command_line::arg_descriptor< uint64_t > anonymous_namespace{simplewallet.cpp}::fallback_to_pow_checkpoint_height = {"fallback-to-pow-checkpoint-height", tools::wallet2::tr("Warning: This is to set the height for a custom checkpoint in the event of PoW fallback. Do not use in normal circumstances. See docs for details "), 0, true}
 
const command_line::arg_descriptor< std::string > anonymous_namespace{simplewallet.cpp}::fallback_to_pow_checkpoint_hash = {"fallback-to-pow-checkpoint-hash", tools::wallet2::tr("Warning: This is to set the hash for a custom checkpoint in the event of PoW fallback. Do not use in normal circumstances. See docs for details "), "", true}
 
const command_line::arg_descriptor< std::vector< std::string > > anonymous_namespace{simplewallet.cpp}::arg_command = {"command", ""}
 
const command_line::arg_descriptor< uint32_t > anonymous_namespace{simplewallet.cpp}::arg_account_major_offset = {"account-major-offset", sw::tr("Account Index Offset"), 0}
 
struct {
   const char *   anonymous_namespace{simplewallet.cpp}::name
 
   tools::wallet2::RefreshType   anonymous_namespace{simplewallet.cpp}::refresh_type
 
anonymous_namespace{simplewallet.cpp}::refresh_type_names []
 

Detailed Description

Source file that defines simple_wallet class.

Macro Definition Documentation

◆ BOOST_BIND_GLOBAL_PLACEHOLDERS

#define BOOST_BIND_GLOBAL_PLACEHOLDERS   1

◆ CHECK_SIMPLE_VARIABLE

#define CHECK_SIMPLE_VARIABLE (   name,
  f,
  help 
)
Value:
do \
if (args[0] == name) { \
if (args.size() <= 1) \
{ \
fail_msg_writer() << "set " << #name << ": " << tr("needs an argument") << " (" << help << ")"; \
return true; \
} \
else \
{ \
f(args); \
return true; \
} \
} while(0)
#define tr(x)
Definition: common_defines.h:4
const char * name
Definition: simplewallet.cpp:400
help
Definition: build_protob.py:9
args
Definition: build_protob.py:10

◆ DEFAULT_MIX

#define DEFAULT_MIX   0

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "wallet.simplewallet"

◆ EXTENDED_LOGS_FILE

#define EXTENDED_LOGS_FILE   "wallet_details.log"

◆ LOCK_IDLE_SCOPE

#define LOCK_IDLE_SCOPE ( )
Value:
bool auto_refresh_enabled = m_auto_refresh_enabled.load(std::memory_order_relaxed); \
m_auto_refresh_enabled.store(false, std::memory_order_relaxed); \
/* stop any background refresh, and take over */ \
m_wallet->stop(); \
boost::unique_lock<boost::mutex> lock(m_idle_mutex); \
m_idle_cond.notify_all(); \
epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){ \
m_auto_refresh_enabled.store(auto_refresh_enabled, std::memory_order_relaxed); \
})

◆ LONG_PAYMENT_ID_SUPPORT_CHECK

#define LONG_PAYMENT_ID_SUPPORT_CHECK ( )
Value:
do { \
if (!m_long_payment_id_support) { \
fail_msg_writer() << tr("Warning: Long payment IDs are obsolete."); \
fail_msg_writer() << tr("Long payment IDs are not encrypted on the blockchain, and will harm your privacy."); \
fail_msg_writer() << tr("Use --long-payment-id-support-bad-for-privacy if you really must use one, and warn the recipient they are using an obsolete feature that will disappear in the future."); \
return true; \
} \
} while(0)

◆ MIN_RING_SIZE

#define MIN_RING_SIZE   1

◆ OUTPUT_EXPORT_FILE_MAGIC

#define OUTPUT_EXPORT_FILE_MAGIC   "Electroneum output export\003"

◆ PRINT_USAGE

#define PRINT_USAGE (   usage_help)    fail_msg_writer() << boost::format(tr("usage: %s")) % usage_help;

◆ SCOPED_WALLET_UNLOCK

#define SCOPED_WALLET_UNLOCK ( )    SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD(return true;)

◆ SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD

#define SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD (   code)
Value:
boost::optional<tools::password_container> pwd_container = boost::none; \
if (m_wallet->ask_password() && !(pwd_container = get_and_verify_password())) { code; } \
tools::wallet_keys_unlocker unlocker(*m_wallet, pwd_container);
#define LOCK_IDLE_SCOPE()
Definition: simplewallet.cpp:102

Typedef Documentation

◆ sw

Enumeration Type Documentation

◆ TransferType

Enumerator
Transfer 
TransferLocked 

Function Documentation

◆ datestr_to_int()

static bool datestr_to_int ( const std::string &  heightstr,
uint16_t &  year,
uint8_t &  month,
uint8_t &  day 
)
static

◆ get_human_readable_timespan()

static std::string get_human_readable_timespan ( std::chrono::seconds  seconds)
static

◆ join_priority_strings()

std::string join_priority_strings ( const char *  delimiter)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ might_be_partial_seed()

static bool might_be_partial_seed ( const epee::wipeable_string &  words)
static

◆ parse_priority()

bool parse_priority ( const std::string &  arg,
uint32_t &  priority 
)