1
mirror of https://github.com/monero-project/monero-gui synced 2025-01-12 16:26:23 +01:00
monero-gui/src/libwalletqt/Wallet.h

53 lines
1.1 KiB
C
Raw Normal View History

2016-02-23 16:59:26 +01:00
#ifndef WALLET_H
#define WALLET_H
#include <QObject>
namespace Bitmonero {
class Wallet; // forward declaration
}
2016-02-23 16:59:26 +01:00
class Wallet : public QObject
{
Q_OBJECT
Q_PROPERTY(QString seed READ getSeed)
2016-02-23 16:59:26 +01:00
public:
enum Status {
Status_Ok = 0,
Status_Error = 1
};
2016-02-29 15:39:39 +01:00
//! returns mnemonic seed
Q_INVOKABLE QString getSeed() const;
2016-02-29 15:39:39 +01:00
//! returns seed language
Q_INVOKABLE QString getSeedLanguage() const;
//! returns last operation's status
Q_INVOKABLE int status() const;
//! returns last operation's error message
Q_INVOKABLE QString errorString() const;
2016-02-29 15:39:39 +01:00
//! changes the password using existing parameters (path, seed, seed lang)
Q_INVOKABLE bool setPassword(const QString &password);
//! returns wallet's public address
Q_INVOKABLE QString address() const;
//! saves wallet to the file by given path
Q_INVOKABLE bool store(const QString &path);
2016-02-29 15:39:39 +01:00
2016-02-29 15:39:39 +01:00
private:
Wallet(Bitmonero::Wallet *w, QObject * parent = 0);
~Wallet();
2016-02-29 15:39:39 +01:00
private:
friend class WalletManager;
//! libwallet's
Bitmonero::Wallet * m_walletImpl;
2016-02-23 16:59:26 +01:00
};
#endif // WALLET_H