oxen-core/src/wallet3/transaction_scanner.hpp

34 lines
712 B
C++
Raw Permalink Normal View History

#pragma once
#include <cryptonote_basic/cryptonote_basic.h>
#include <vector>
2023-04-13 15:50:13 +02:00
#include "keyring.hpp"
#include "output.hpp"
namespace db {
class Database;
}
2023-04-13 15:50:13 +02:00
namespace wallet {
struct BlockTX;
2023-04-13 15:50:13 +02:00
class TransactionScanner {
public:
TransactionScanner(std::shared_ptr<Keyring> keys, std::shared_ptr<db::Database> db) :
wallet_keys(keys), db(db) {}
2023-04-13 15:50:13 +02:00
std::vector<Output> scan_received(const BlockTX& tx, int64_t height, int64_t timestamp);
2023-04-13 15:50:13 +02:00
std::vector<crypto::key_image> scan_spent(const cryptonote::transaction& tx);
2023-04-13 15:50:13 +02:00
void set_keys(std::shared_ptr<Keyring> keys);
2023-04-13 15:50:13 +02:00
private:
std::shared_ptr<Keyring> wallet_keys;
std::shared_ptr<db::Database> db;
2023-04-13 15:50:13 +02:00
};
} // namespace wallet