aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-05-02 16:48:38 +0200
committerJaquee <jaquee.monero@gmail.com>2017-05-02 16:48:38 +0200
commitbbf4c21048f47d419a2e09e9d58c95328e1ee980 (patch)
treef15b600a3819db93506fdf3671b613584c2f738f /src/wallet/api/wallet.cpp
parentMerge pull request #1930 (diff)
downloadmonero-bbf4c21048f47d419a2e09e9d58c95328e1ee980.tar.xz
Wallet API: add spend/view key getters
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index fc2d6e755..ff2ca023a 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -618,11 +618,26 @@ std::string WalletImpl::integratedAddress(const std::string &payment_id) const
return m_wallet->get_account().get_public_integrated_address_str(pid, m_wallet->testnet());
}
-std::string WalletImpl::privateViewKey() const
+std::string WalletImpl::secretViewKey() const
{
return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_view_secret_key);
}
+std::string WalletImpl::publicViewKey() const
+{
+ return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_account_address.m_view_public_key);
+}
+
+std::string WalletImpl::secretSpendKey() const
+{
+ return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_spend_secret_key);
+}
+
+std::string WalletImpl::publicSpendKey() const
+{
+ return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_account_address.m_spend_public_key);
+}
+
std::string WalletImpl::path() const
{
return m_wallet->path();