aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-09 12:19:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-09 19:32:37 +0000
commit166962193790920d4ede16ce14407a4cbec5c332 (patch)
tree0e2d2ad1a8f93fcfd7e2e537224f1d21d2d4e3d1 /src/wallet/wallet2_api.h
parentMerge pull request #1312 (diff)
downloadmonero-166962193790920d4ede16ce14407a4cbec5c332.tar.xz
wallet2_api: support for sweeping all
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2_api.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index f0a9ea68b..6fe15d1e3 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -41,6 +41,20 @@ namespace Bitmonero {
namespace Utils {
bool isAddressLocal(const std::string &hostaddr);
}
+
+ template<typename T>
+ class optional {
+ public:
+ optional(): set(false) {}
+ optional(const T &t): t(t), set(true) {}
+ const T &operator*() const { return t; }
+ T &operator*() { return t; }
+ operator bool() const { return set; }
+ private:
+ T t;
+ bool set;
+ };
+
/**
* @brief Transaction-like interface for sending money
*/
@@ -332,7 +346,7 @@ struct Wallet
*/
virtual PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
- uint64_t amount, uint32_t mixin_count,
+ optional<uint64_t> amount, uint32_t mixin_count,
PendingTransaction::Priority = PendingTransaction::Priority_Low) = 0;
/*!