aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-08 09:58:46 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-08 21:21:08 +0000
commitc441a61ef6caeedd133b3d4ca979ff0e47e671d0 (patch)
treecf284344450aa175c718b91711a3e9137f999f7f /src/wallet/wallet2_api.h
parentMerge pull request #1308 (diff)
downloadmonero-c441a61ef6caeedd133b3d4ca979ff0e47e671d0.tar.xz
wallet2_api: API to sign and verify a message
Diffstat (limited to 'src/wallet/wallet2_api.h')
-rw-r--r--src/wallet/wallet2_api.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index da1dbd6e1..bb0862387 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -362,6 +362,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;
};
/**