2022-01-06 19:29:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../app_service.h"
|
|
|
|
#include "account.h"
|
|
|
|
#include "generated_account.h"
|
|
|
|
#include <QJsonValue>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
namespace Accounts
|
|
|
|
{
|
|
|
|
|
|
|
|
class ServiceInterface : public AppService
|
|
|
|
{
|
|
|
|
public:
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual QVector<AccountDto> openedAccounts() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual QVector<GeneratedAccountDto> generatedAccounts() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual bool setupAccount(const QString& accountId, const QString& password) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual AccountDto getLoggedInAccount() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual GeneratedAccountDto getImportedAccount() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual bool isFirstTimeAccountLogin() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual QString validateMnemonic(const QString& mnemonic) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual bool importMnemonic(const QString& mnemonic) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual QString login(const AccountDto& account, const QString& password) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
virtual void clear() = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual QString generateAlias(const QString& publicKey) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual QString generateIdenticon(const QString& publicKey) = 0;
|
2022-01-20 15:50:10 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
virtual bool verifyAccountPassword(const QString& account, const QString& password) = 0;
|
2022-01-06 19:29:19 +00:00
|
|
|
};
|
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
} // namespace Accounts
|