aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-04-05 15:24:44 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-04-05 15:24:44 +0300
commit079fbd3d42f74d9bdc268c83677878b9ac5c1047 (patch)
treebaaf46c9e4ccdf24880566fbe88a0b13bf891161 /src/wallet/wallet2_api.h
parentWallet::transfer() continued (diff)
downloadmonero-079fbd3d42f74d9bdc268c83677878b9ac5c1047.tar.xz
Wallet::createTransaction API introduced
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2_api.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index 662264f50..c85cda2de 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -45,10 +45,12 @@ struct Transaction
Status_Ok,
Status_Error
};
-
+ virtual ~Transaction() = 0;
virtual int status() const = 0;
virtual std::string errorString() const = 0;
virtual bool commit() = 0;
+ virtual uint64_t dust() const = 0;
+ virtual uint64_t fee() const = 0;
};
/**
@@ -85,13 +87,12 @@ struct Wallet
virtual bool connectToDaemon() = 0;
virtual uint64_t balance() const = 0;
virtual uint64_t unlockedBalance() const = 0;
- virtual std::string displayAmount(uint64_t amount) const = 0;
+ static std::string displayAmount(uint64_t amount);
// TODO?
// virtual uint64_t unlockedDustBalance() const = 0;
virtual bool refresh() = 0;
- // TODO transfer
- virtual bool transfer(const std::string &dst_addr, uint64_t amount) = 0;
-
+ virtual Transaction * createTransaction(const std::string &dst_addr, uint64_t amount) = 0;
+ virtual void disposeTransaction(Transaction * t) = 0;
};
/**