-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wallet_api_merge' into 'development'
Merge Wallet API See merge request qt-team/graft-mobile-client!372
- Loading branch information
Showing
50 changed files
with
2,629 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef GRAFTBASEHANDLER_H | ||
#define GRAFTBASEHANDLER_H | ||
|
||
#include <QObject> | ||
|
||
class GraftBaseHandler : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit GraftBaseHandler(QObject *parent = nullptr) : QObject(parent) {} | ||
|
||
virtual void changeAddresses(const QStringList &addresses, | ||
const QStringList &internalAddresses = QStringList()) = 0; | ||
|
||
virtual void setAccountData(const QByteArray &accountData, const QString &password) = 0; | ||
virtual QByteArray accountData() const = 0; | ||
virtual QString password() const = 0; | ||
|
||
virtual void resetData() = 0; | ||
|
||
public slots: | ||
virtual void createAccount(const QString &password) = 0; | ||
virtual void restoreAccount(const QString &seed, const QString &password) = 0; | ||
virtual void updateBalance() = 0; | ||
virtual void transferFee(const QString &address, const QString &amount) = 0; | ||
virtual void transfer(const QString &address, const QString &amount) = 0; | ||
|
||
signals: | ||
void errorReceived(const QString &message); | ||
void createAccountReceived(const QByteArray &accountData, const QString &password, | ||
const QString &address, const QString &viewKey, const QString &seed); | ||
void restoreAccountReceived(const QByteArray &accountData, const QString &password, | ||
const QString &address, const QString &viewKey, | ||
const QString &seed); | ||
void balanceReceived(double balance, double unlockedBalance); | ||
void transferFeeReceived(int result, double fee); | ||
void transferReceived(int result); | ||
}; | ||
|
||
#endif // GRAFTBASEHANDLER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef GRAFTPOSHANDLER_H | ||
#define GRAFTPOSHANDLER_H | ||
|
||
#include "graftbasehandler.h" | ||
|
||
class GraftPOSHandler : public GraftBaseHandler | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit GraftPOSHandler(QObject *parent = nullptr) : GraftBaseHandler(parent) {} | ||
|
||
public slots: | ||
virtual void sale(const QString &address, const QString &viewKey, double amount, | ||
const QString &saleDetails = QString()) = 0; | ||
virtual void rejectSale(const QString &pid) = 0; | ||
virtual void saleStatus(const QString &pid, int blockNumber) = 0; | ||
|
||
signals: | ||
void saleReceived(int result, const QString &pid, int blockNumber); | ||
void rejectSaleReceived(bool result); | ||
void saleStatusReceived(bool result); | ||
}; | ||
|
||
#endif // GRAFTPOSHANDLER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef GRAFTWALLETHANDLER_H | ||
#define GRAFTWALLETHANDLER_H | ||
|
||
#include "graftbasehandler.h" | ||
|
||
class GraftWalletHandler : public GraftBaseHandler | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit GraftWalletHandler(QObject *parent = nullptr) : GraftBaseHandler(parent) {} | ||
|
||
public slots: | ||
virtual void saleDetails(const QString &pid, int blockNumber) = 0; | ||
virtual void rejectPay(const QString &pid, int blockNumber) = 0; | ||
virtual void pay(const QString &pid, const QString &address, | ||
double amount, int blockNumber) = 0; | ||
virtual void payStatus(const QString &pid, int blockNumber) = 0; | ||
|
||
signals: | ||
void saleDetailsReceived(int result, const QString &details); | ||
void rejectPayReceived(int result); | ||
void payReceived(int result); | ||
void payStatusReceived(int result, int status); | ||
}; | ||
|
||
#endif // GRAFTWALLETHANDLER_H |
Oops, something went wrong.