aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-08 14:45:46 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-08 14:45:46 -0500
commit6884db7b31beb36889d240dd346eda1e006046da (patch)
treeeb8e6ee2811ed1fe1a13d3fd3524e1de5237b992
parentMerge pull request #3598 (diff)
parentWalletApi: publicMultisigSignerKey method (diff)
downloadmonero-6884db7b31beb36889d240dd346eda1e006046da.tar.xz
Merge pull request #3599
8787fd8 WalletApi: publicMultisigSignerKey method (naughtyfox)
-rw-r--r--src/wallet/api/wallet.cpp10
-rw-r--r--src/wallet/api/wallet.h1
-rw-r--r--src/wallet/api/wallet2_api.h6
3 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 19185ddb0..908e2db2e 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -778,6 +778,16 @@ 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::publicMultisigSignerKey() const
+{
+ try {
+ crypto::public_key signer = m_wallet->get_multisig_signer_public_key();
+ return epee::string_tools::pod_to_hex(signer);
+ } catch (const std::exception&) {
+ return "";
+ }
+}
+
std::string WalletImpl::path() const
{
return m_wallet->path();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index d2b4cd506..813ca4b30 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -91,6 +91,7 @@ public:
std::string publicViewKey() const;
std::string secretSpendKey() const;
std::string publicSpendKey() const;
+ std::string publicMultisigSignerKey() const;
std::string path() const;
bool store(const std::string &path);
std::string filename() const;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
index d0c4b36b9..5b99bd975 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -444,6 +444,12 @@ struct Wallet
virtual std::string publicSpendKey() const = 0;
/*!
+ * \brief publicMultisigSignerKey - returns public signer key
+ * \return - public multisignature signer key or empty string if wallet is not multisig
+ */
+ virtual std::string publicMultisigSignerKey() const = 0;
+
+ /*!
* \brief store - stores wallet to file.
* \param path - main filename to store wallet to. additionally stores address file and keys file.
* to store to the same file - just pass empty string;