From 9f7497fc3273bef0d3732e1bbca1e9c7a100e480 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 5 Jul 2019 14:59:24 -0400 Subject: [PATCH] implement get public/private spend key --- src/wallet/MoneroWallet.cpp | 10 ++++++++++ src/wallet/MoneroWallet.h | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index a4004a5..1c2abc6 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -613,6 +613,16 @@ namespace monero { return epee::string_tools::pod_to_hex(wallet2->get_account().get_keys().m_view_secret_key); } + string MoneroWallet::getPublicSpendKey() const { + cout << "getPrivateSpendKey()" << endl; + return epee::string_tools::pod_to_hex(wallet2->get_account().get_keys().m_account_address.m_spend_public_key); + } + + string MoneroWallet::getPrivateSpendKey() const { + cout << "getPrivateSpendKey()" << endl; + return epee::string_tools::pod_to_hex(wallet2->get_account().get_keys().m_spend_secret_key); + } + void MoneroWallet::setListener(boost::optional listener) { cout << "setListener()" << endl; wallet2Listener->setWalletListener(listener); diff --git a/src/wallet/MoneroWallet.h b/src/wallet/MoneroWallet.h index 54080df..c958aaa 100644 --- a/src/wallet/MoneroWallet.h +++ b/src/wallet/MoneroWallet.h @@ -208,6 +208,20 @@ namespace monero { */ string getPrivateViewKey() const; + /** + * Get the wallet's public spend key. + * + * @return the wallet's public spend key + */ + string getPublicSpendKey() const; + + /** + * Get the wallet's private spend key. + * + * @return the wallet's private spend key + */ + string getPrivateSpendKey() const; + /** * TODO */