add carrotkeys fn to wallet api (#68)
This commit is contained in:
@@ -920,6 +920,18 @@ 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::vector<std::string> WalletImpl::carrotKeys() const
|
||||
{
|
||||
return {
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.s_master),
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.k_prove_spend),
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.s_view_balance),
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.k_view_incoming),
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.k_generate_image),
|
||||
epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_carrot_account_address.s_generate_address)
|
||||
};
|
||||
}
|
||||
|
||||
std::string WalletImpl::publicMultisigSignerKey() const
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -99,6 +99,7 @@ public:
|
||||
std::string publicViewKey() const override;
|
||||
std::string secretSpendKey() const override;
|
||||
std::string publicSpendKey() const override;
|
||||
std::vector<std::string> carrotKeys() const override;
|
||||
std::string publicMultisigSignerKey() const override;
|
||||
std::string secretViewBalance() const override;
|
||||
std::string secretProveSpend() const override;
|
||||
|
||||
@@ -559,6 +559,18 @@ struct Wallet
|
||||
*/
|
||||
virtual std::string publicSpendKey() const = 0;
|
||||
|
||||
/*!
|
||||
* \brief allCarrotKeys - returns all Carrot keys
|
||||
* [0] - s_master
|
||||
* [1] - k_prove_spend
|
||||
* [2] - s_view_balance
|
||||
* [3] - k_view_incoming
|
||||
* [4] - k_generate_image
|
||||
* [5] - s_generate_address
|
||||
* \return - vector of all Carrot keys
|
||||
*/
|
||||
virtual std::vector<std::string> carrotKeys() const = 0;
|
||||
|
||||
/*!
|
||||
* \brief publicMultisigSignerKey - returns public signer key
|
||||
* \return - public multisignature signer key or empty string if wallet is not multisig
|
||||
|
||||
Reference in New Issue
Block a user