2021-07-19 20:42:38 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "output.hpp"
|
|
|
|
#include "keyring.hpp"
|
|
|
|
|
|
|
|
#include <cryptonote_basic/cryptonote_basic.h>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace db
|
|
|
|
{
|
|
|
|
class Database;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace wallet
|
|
|
|
{
|
|
|
|
struct BlockTX;
|
|
|
|
|
|
|
|
class TransactionScanner
|
|
|
|
{
|
|
|
|
public:
|
2021-12-06 21:57:16 +01:00
|
|
|
TransactionScanner(std::shared_ptr<Keyring> keys, std::shared_ptr<db::Database> db)
|
|
|
|
: wallet_keys(keys), db(db)
|
2021-07-19 20:42:38 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
std::vector<Output>
|
2021-12-06 21:57:16 +01:00
|
|
|
scan_received(const BlockTX& tx, int64_t height, int64_t timestamp);
|
2021-07-19 20:42:38 +02:00
|
|
|
|
|
|
|
std::vector<crypto::key_image>
|
2021-12-06 21:57:16 +01:00
|
|
|
scan_spent(const cryptonote::transaction& tx);
|
2021-07-19 20:42:38 +02:00
|
|
|
|
2023-03-14 23:11:27 +01:00
|
|
|
void
|
|
|
|
set_keys(std::shared_ptr<Keyring> keys);
|
|
|
|
|
2021-07-19 20:42:38 +02:00
|
|
|
private:
|
|
|
|
std::shared_ptr<Keyring> wallet_keys;
|
|
|
|
std::shared_ptr<db::Database> db;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace wallet
|