aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2017-09-12 10:05:41 +0900
committerstoffu <stoffu@protonmail.ch>2017-11-18 20:44:27 +0900
commit998777ecd71fee25636f6ef40f05f88251d03e96 (patch)
treed3cc8cf38b70cd10678e9ef1d3a36f2ac7e8386d /src/wallet/wallet2_api.h
parentMerge pull request #2818 (diff)
downloadmonero-998777ecd71fee25636f6ef40f05f88251d03e96.tar.xz
Tx proof (revised):
- refactoring: proof generation/checking code was moved from simplewallet.cpp to wallet2.cpp - allow an arbitrary message to be signed together with txid - introduce two types (outbound & inbound) of tx proofs; with the same syntax, inbound is selected when <address> belongs to this wallet, outbound otherwise. see GitHub thread for more discussion - wallet RPC: added get_tx_key, check_tx_key, get_tx_proof, check_tx_proof - wallet API: moved WalletManagerImpl::checkPayment to Wallet::checkTxKey, added Wallet::getTxProof/checkTxProof - get_tx_key/check_tx_key: handle additional tx keys by concatenating them into a single string
Diffstat (limited to 'src/wallet/wallet2_api.h')
-rw-r--r--src/wallet/wallet2_api.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index 432c820cb..8d6b2ffa9 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -700,6 +700,9 @@ struct Wallet
*/
virtual std::string getUserNote(const std::string &txid) const = 0;
virtual std::string getTxKey(const std::string &txid) const = 0;
+ virtual bool checkTxKey(const std::string &txid, std::string tx_key, const std::string &address, uint64_t &received, bool &in_pool, uint64_t &confirmations) = 0;
+ virtual std::string getTxProof(const std::string &txid, const std::string &address, const std::string &message, std::string &error_str) const = 0;
+ virtual bool checkTxProof(const std::string &txid, const std::string &address, const std::string &message, const std::string &signature, bool &good, uint64_t &received, bool &in_pool, uint64_t &confirmations) = 0;
/*
* \brief signMessage - sign a message with the spend private key
@@ -819,19 +822,6 @@ struct WalletManager
*/
virtual std::vector<std::string> findWallets(const std::string &path) = 0;
- /*!
- * \brief checkPayment - checks a payment was made using a txkey
- * \param address - the address the payment was sent to
- * \param txid - the transaction id for that payment
- * \param txkey - the transaction's secret key
- * \param daemon_address - the address (host and port) to the daemon to request transaction data
- * \param received - if succesful, will hold the amount of monero received
- * \param height - if succesful, will hold the height of the transaction (0 if only in the pool)
- * \param error - if unsuccesful, will hold an error string with more information about the error
- * \return - true is succesful, false otherwise
- */
- virtual bool checkPayment(const std::string &address, const std::string &txid, const std::string &txkey, const std::string &daemon_address, uint64_t &received, uint64_t &height, std::string &error) const = 0;
-
//! returns verbose error string regarding last error;
virtual std::string errorString() const = 0;