diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-05-20 14:34:17 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-05-20 14:34:29 +0200 |
commit | 53ac50733a647a4bbdef27d43a0fc50d7306c3f0 (patch) | |
tree | 1c299efd6c09aaf4357fafd7bb5c49f8a8c6ff0e /src | |
parent | Merge pull request #286 (diff) | |
parent | Add spendkey dump to simplewallet (diff) | |
download | monero-53ac50733a647a4bbdef27d43a0fc50d7306c3f0.tar.xz |
Merge pull request #285
087d7f3 Add spendkey dump to simplewallet (luigi1111)
Diffstat (limited to 'src')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 8 | ||||
-rw-r--r-- | src/simplewallet/simplewallet.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 9ac80fa9e..2b2488952 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -208,6 +208,13 @@ bool simple_wallet::viewkey(const std::vector<std::string> &args/* = std::vector return true; } +bool simple_wallet::spendkey(const std::vector<std::string> &args/* = std::vector<std::string>()*/) +{ + success_msg_writer() << string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_spend_secret_key) << std::endl; + + return true; +} + bool simple_wallet::seed(const std::vector<std::string> &args/* = std::vector<std::string>()*/) { bool success = false; @@ -288,6 +295,7 @@ simple_wallet::simple_wallet() m_cmd_binder.set_handler("address", boost::bind(&simple_wallet::print_address, this, _1), "Show current wallet public address"); m_cmd_binder.set_handler("save", boost::bind(&simple_wallet::save, this, _1), "Save wallet synchronized data"); m_cmd_binder.set_handler("viewkey", boost::bind(&simple_wallet::viewkey, this, _1), "Get viewkey"); + m_cmd_binder.set_handler("spendkey", boost::bind(&simple_wallet::spendkey, this, _1), "Get spendkey"); m_cmd_binder.set_handler("seed", boost::bind(&simple_wallet::seed, this, _1), "Get deterministic seed"); m_cmd_binder.set_handler("set", boost::bind(&simple_wallet::set_variable, this, _1), "available options: seed language - Set wallet seed langage"); m_cmd_binder.set_handler("help", boost::bind(&simple_wallet::help, this, _1), "Show this help"); diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index a8fe78414..de5b3674e 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -80,6 +80,7 @@ namespace cryptonote bool close_wallet(); bool viewkey(const std::vector<std::string> &args = std::vector<std::string>()); + bool spendkey(const std::vector<std::string> &args = std::vector<std::string>()); bool seed(const std::vector<std::string> &args = std::vector<std::string>()); /*! |