mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
8968a8cbce
``` ./wowlet --daemon 127.0.0.1:1234 --daemon-password "sekrit" ``` The wallet will start in the background and expose a websocket port that you can connect to using a websocket client. This way, you will be able to control the wallet via websockets. The commands are defined in wsserver.cpp, in the `processBinaryMessage()` function. - `openWallet` - opens a wallet by path/password. - `closeWallet` - close current wallet. - `addressList` - Returns a list of receive addresses. - `sendTransaction` - Creates and sends a transaction. - `createWallet` - Create a wallet by path/password. - `transactionHistory` - Returns the complete list of transactions - `addressBook` - Returns the complete list of address book entries. Messages sent back and forth between the server and client are JSON. There is a Python example client available over at https://git.wownero.com/wownero/wowlet-ws-client
53 lines
1.4 KiB
C++
53 lines
1.4 KiB
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// Copyright (c) 2014-2021, The Monero Project.
|
|
|
|
#ifndef ADDRESSBOOKMODEL_H
|
|
#define ADDRESSBOOKMODEL_H
|
|
|
|
#include <QAbstractTableModel>
|
|
#include <QIcon>
|
|
|
|
class AddressBook;
|
|
|
|
class AddressBookModel : public QAbstractTableModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum ModelColumn
|
|
{
|
|
Address = 0,
|
|
Description,
|
|
COUNT
|
|
};
|
|
|
|
AddressBookModel(QObject *parent, AddressBook * addressBook);
|
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
|
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
|
|
|
QJsonArray toJsonArray();
|
|
|
|
Q_INVOKABLE bool deleteRow(int row);
|
|
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const;
|
|
|
|
bool isShowFullAddresses() const;
|
|
void setShowFullAddresses(bool show);
|
|
bool writeCSV(const QString &path);
|
|
QMap<QString, QString> readCSV(const QString &path);
|
|
|
|
public slots:
|
|
void startReset();
|
|
void endReset();
|
|
|
|
private:
|
|
AddressBook * m_addressBook;
|
|
QIcon m_contactIcon;
|
|
bool m_showFullAddresses;
|
|
};
|
|
|
|
#endif // ADDRESSBOOKMODEL_H
|