diff options
author | naughtyfox <mail.for.milo@gmail.com> | 2018-04-10 19:21:25 +0300 |
---|---|---|
committer | naughtyfox <mail.for.milo@gmail.com> | 2018-04-13 13:15:20 +0300 |
commit | 8787fd899b4e1f60d1a987dcfc77cb99ca81798d (patch) | |
tree | 172ab5450a9752e49af352a054ea102ebca19e76 /src/wallet | |
parent | Merge pull request #3434 (diff) | |
download | monero-8787fd899b4e1f60d1a987dcfc77cb99ca81798d.tar.xz |
WalletApi: publicMultisigSignerKey method
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/wallet.cpp | 10 | ||||
-rw-r--r-- | src/wallet/api/wallet.h | 1 | ||||
-rw-r--r-- | src/wallet/api/wallet2_api.h | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index b02884f67..f1dd25d21 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -753,6 +753,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 4929c9673..64c992a5f 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -90,6 +90,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 d4e41c5aa..7d76c9543 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -409,6 +409,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; |