5 #ifndef FABCOIN_QT_WALLETMODEL_H 6 #define FABCOIN_QT_WALLETMODEL_H 72 template <
typename Stream,
typename Operation>
74 std::string sAddress = address.toStdString();
75 std::string sLabel = label.toStdString();
76 std::string sMessage = message.toStdString();
77 std::string sPaymentRequest;
80 std::string sAuthenticatedMerchant = authenticatedMerchant.toStdString();
90 if (ser_action.ForRead())
92 address = QString::fromStdString(sAddress);
93 label = QString::fromStdString(sLabel);
94 message = QString::fromStdString(sMessage);
95 if (!sPaymentRequest.empty())
96 paymentRequest.
parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
97 authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
122 PaymentRequestExpired
141 CAmount getUnconfirmedBalance()
const;
142 CAmount getImmatureBalance()
const;
144 bool haveWatchOnly()
const;
145 CAmount getWatchBalance()
const;
146 CAmount getWatchUnconfirmedBalance()
const;
147 CAmount getWatchImmatureBalance()
const;
152 bool validateAddress(
const QString &
address);
159 reasonCommitFailed(_reasonCommitFailed)
173 bool setWalletEncrypted(
bool encrypted,
const SecureString &passphrase);
178 bool backupWallet(
const QString &filename);
180 bool hasWalletBackup();
182 bool restoreWallet(
const QString &filename,
const QString ¶m);
210 void getOutputs(
const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs);
211 bool isSpent(
const COutPoint& outpoint)
const;
212 bool isUnspentAddress(
const std::string&
address)
const;
213 void listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
const;
215 bool isLockedCoin(
uint256 hash,
unsigned int n)
const;
218 void listLockedCoins(std::vector<COutPoint>& vOutpts);
220 void loadReceiveRequests(std::vector<std::string>& vReceiveRequests);
221 bool saveReceiveRequest(
const std::string &sAddress,
const int64_t nId,
const std::string &sRequest);
223 bool transactionCanBeAbandoned(
uint256 hash)
const;
224 bool abandonTransaction(
uint256 hash)
const;
226 bool transactionCanBeBumped(
uint256 hash)
const;
229 static bool isWalletEnabled();
231 bool hdEnabled()
const;
233 int getDefaultConfirmTarget()
const;
235 bool getDefaultWalletRbf()
const;
239 bool addTokenTxEntry(
const CTokenTx& tokenTx,
bool fFlushOnClose=
true);
241 bool existTokenEntry(
const CTokenInfo& token);
243 bool removeTokenEntry(
const std::string& sHash);
245 QString getRestorePath();
246 QString getRestoreParam();
248 std::vector<CTokenInfo> getInvalidTokens();
250 bool isMineAddress(
const std::string &strAddress);
285 void subscribeToCoreSignals();
286 void unsubscribeFromCoreSignals();
287 void checkBalanceChanged();
288 void checkTokenBalanceChanged();
293 const CAmount& watchOnlyBalance,
const CAmount& watchUnconfBalance,
const CAmount& watchImmatureBalance,
const CAmount& watchOnlyStake);
296 void encryptionStatusChanged(
int status);
301 void requireUnlock();
304 void message(
const QString &title,
const QString &
message,
unsigned int style);
310 void showProgress(
const QString &title,
int nProgress);
313 void notifyWatchonlyChanged(
bool fHaveWatchonly);
319 void updateTransaction();
321 void updateAddressBook(
const QString &
address,
const QString &
label,
bool isMine,
const QString &purpose,
int status);
323 void updateWatchOnlyFlag(
bool fHaveWatchonly);
325 void pollBalanceChanged();
327 void updateContractBook(
const QString &
address,
const QString &
label,
const QString &abi,
int status);
330 #endif // FABCOIN_QT_WALLETMODEL_H
Model for list of recently generated payment requests / fabcoin: URIs.
TransactionTableModel * transactionTableModel
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
RecentRequestsTableModel * recentRequestsTableModel
PaymentRequestPlus paymentRequest
bool IsInitialized() const
UnlockContext & operator=(const UnlockContext &rhs)
struct evm_uint256be balance(struct evm_env *env, struct evm_uint160be address)
TokenTransactionTableModel * tokenTransactionTableModel
QString reasonCommitFailed
static const int CURRENT_VERSION
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
ContractTableModel * contractTableModel
SendCoinsRecipient(const QString &addr, const QString &_label, const CAmount &_amount, const QString &_message)
int64_t CAmount
Amount in lius (Can be negative)
bool SerializeToString(std::string *output) const
CAmount cachedImmatureBalance
An encapsulated public key.
UI model for the transaction table of a wallet.
TokenItemModel * tokenItemModel
SendCoinsReturn(StatusCode _status=OK, QString _reasonCommitFailed="")
OptionsModel * optionsModel
CAmount cachedWatchOnlyBalance
EncryptionStatus cachedEncryptionStatus
An outpoint - a combination of a transaction hash and an index n into its vout.
void SerializationOp(Stream &s, Operation ser_action)
UI model for the transaction table of a wallet.
bool parse(const QByteArray &data)
Qt model of the address book in the core.
UnlockContext(const UnlockContext &obj)
Qt model of the contract book in the core.
CAmount cachedWatchOnlyStake
CAmount cachedWatchUnconfBalance
bool fForceCheckBalanceChanged
CAmount cachedWatchImmatureBalance
Interface from Qt to configuration data structure for Fabcoin client.
Interface to Fabcoin wallet from Qt view code.
A reference to a CKey: the Hash160 of its serialized public key.
CAmount cachedUnconfirmedBalance
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Data model for a walletmodel transaction.
AddressTableModel * addressTableModel
bool fSubtractFeeFromAmount
An encapsulated private key.
QString authenticatedMerchant