diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-05-20 21:43:09 +0000 |
---|---|---|
committer | Sarang Noether <32460187+SarangNoether@users.noreply.github.com> | 2020-08-28 19:25:17 -0400 |
commit | 743608ec16e27a3c1ca2febd4e80391a32c23efd (patch) | |
tree | d8b4f65cc302f765f7fd97aca7ef6189065307e3 /src/wallet/wallet2.h | |
parent | Merge pull request #6787 (diff) | |
download | monero-743608ec16e27a3c1ca2febd4e80391a32c23efd.tar.xz |
wallet: allow signing a message with spend or view key
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 117e4e2f2..7a142d016 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1341,8 +1341,10 @@ private: */ void set_account_tag_description(const std::string& tag, const std::string& description); - std::string sign(const std::string &data, cryptonote::subaddress_index index = {0, 0}) const; - bool verify(const std::string &data, const cryptonote::account_public_address &address, const std::string &signature) const; + enum message_signature_type_t { sign_with_spend_key, sign_with_view_key, sign_with_both_keys }; + std::string sign(const std::string &data, message_signature_type_t signature_type, cryptonote::subaddress_index index = {0, 0}) const; + struct message_signature_result_t { bool valid; unsigned version; bool old; message_signature_type_t type; }; + message_signature_result_t verify(const std::string &data, const cryptonote::account_public_address &address, const std::string &signature) const; /*! * \brief sign_multisig_participant signs given message with the multisig public signer key |