Skip to content

Commit

Permalink
WalletApi: publicSignerKey method
Browse files Browse the repository at this point in the history
  • Loading branch information
naughtyfox committed Apr 13, 2018
1 parent 8361d60 commit 3f84665
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/wallet/api/wallet.cpp
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/wallet/api/wallet.h
Expand Up @@ -90,6 +90,7 @@ class WalletImpl : public Wallet
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;
Expand Down
6 changes: 6 additions & 0 deletions src/wallet/api/wallet2_api.h
Expand Up @@ -408,6 +408,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.
Expand Down

0 comments on commit 3f84665

Please sign in to comment.