Hush lite wallet https://faq.hush.is/sdl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
960 B

#ifndef TURNSTILE_H
#define TURNSTILE_H
#include "precompiled.h"
class RPC;
struct Tx;
struct TurnstileMigrationItem {
QString fromAddr;
QString intTAddr;
QString destAddr;
int blockNumber;
double amount;
bool chaff;
int status;
};
enum TurnstileMigrationItemStatus {
NotStarted = 0,
SentToT,
SentToZS,
NotEnoughBalance,
UnknownError
};
class Turnstile
{
public:
Turnstile(RPC* _rpc);
~Turnstile();
void planMigration(QString zaddr, QString destAddr);
QList<double> splitAmount(double amount, int parts);
void fillAmounts(QList<double>& amounts, double amount, int count);
QList<TurnstileMigrationItem> readMigrationPlan();
void writeMigrationPlan(QList<TurnstileMigrationItem> plan);
void executeMigrationStep();
private:
QList<int> getBlockNumbers(int start, int end, int count);
QString writeableFile();
void doSendTx(Tx tx, std::function<void(void)> cb);
RPC* rpc;
};
#endif