diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-16 19:01:05 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-16 19:25:02 +0200 |
commit | a5e6d72339f28699bc356603f695bd620be37e83 (patch) | |
tree | e1e0501a5b58cbc018f5f6ad60c064f84d747a9c /src/qt/walletmodel.h | |
parent | d4211176208b5e4ae4a699c6ce3239447752cdb2 (diff) |
add sendmany support
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r-- | src/qt/walletmodel.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 1105fb03fa..af2cac4b31 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -8,6 +8,13 @@ class AddressTableModel; class TransactionTableModel; class CWallet; +struct SendCoinsRecipient +{ + QString address; + QString label; + qint64 amount; +}; + // Interface to a Bitcoin wallet class WalletModel : public QObject { @@ -22,6 +29,9 @@ public: InvalidAddress, AmountExceedsBalance, AmountWithFeeExceedsBalance, + DuplicateAddress, + TransactionCreationFailed, + TransactionCommitFailed, Aborted, MiscError }; @@ -34,8 +44,25 @@ public: qint64 getUnconfirmedBalance() const; int getNumTransactions() const; - /* Send coins */ - StatusCode sendCoins(const QString &payTo, qint64 payAmount, const QString &addToAddressBookAs=QString()); + // Check address for validity + bool validateAddress(const QString &address); + + // Return status record for SendCoins + // fee is used in case status is "AmountWithFeeExceedsBalance" + // hex is filled with the transaction hash if status is "OK" + struct SendCoinsReturn + { + SendCoinsReturn(StatusCode status, + qint64 fee=0, + QString hex=QString()): + status(status), fee(fee), hex(hex) {} + StatusCode status; + qint64 fee; + QString hex; + }; + + // Send coins to list of recipients + SendCoinsReturn sendCoins(const QList<SendCoinsRecipient> &recipients); private: CWallet *wallet; |