diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-11-09 14:10:39 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-11-09 14:10:39 +0200 |
commit | 56c594a8feb85620492b4aafa469dd2823b9afa6 (patch) | |
tree | fec8eab59542a2b5814aac1cdb1cf804389a4af0 /src/wallet/wallet2_api.h | |
parent | Merge pull request #1307 (diff) | |
parent | wallet2_api: API to sign and verify a message (diff) | |
download | monero-56c594a8feb85620492b4aafa469dd2823b9afa6.tar.xz |
Merge pull request #1309
c441a61 wallet2_api: API to sign and verify a message (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2_api.h')
-rw-r--r-- | src/wallet/wallet2_api.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index 0aa36eafe..5af34d6a1 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -367,6 +367,21 @@ struct Wallet */ virtual std::string getUserNote(const std::string &txid) const = 0; virtual std::string getTxKey(const std::string &txid) const = 0; + + /* + * \brief signMessage - sign a message with the spend private key + * \param message - the message to sign (arbitrary byte data) + * \return the signature + */ + virtual std::string signMessage(const std::string &message) = 0; + /*! + * \brief verifySignedMessage - verify a signature matches a given message + * \param message - the message (arbitrary byte data) + * \param address - the address the signature claims to be made with + * \param signature - the signature + * \return true if the signature verified, false otherwise + */ + virtual bool verifySignedMessage(const std::string &message, const std::string &addres, const std::string &signature) const = 0; }; /** |