Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
NFT.hpp
1//------------------------------------------------------------------------------
2/*
3 This file is part of clio: https://github.com/XRPLF/clio
4 Copyright (c) 2025, the clio developers.
5
6 Permission to use, copy, modify, and distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#pragma once
21
22#include "data/BackendInterface.hpp"
23#include "etlng/Models.hpp"
24#include "util/log/Logger.hpp"
25
26#include <cstdint>
27#include <memory>
28
29namespace etlng::impl {
30
31class NFTExt {
32 std::shared_ptr<BackendInterface> backend_;
33 util::Logger log_{"ETL"};
34
35public:
36 NFTExt(std::shared_ptr<BackendInterface> backend);
37
38 void
39 onLedgerData(model::LedgerData const& data) const;
40
41 void
42 onInitialObject(uint32_t seq, model::Object const& obj) const;
43
44 void
45 onInitialData(model::LedgerData const& data) const;
46
47private:
48 void
49 writeNFTs(model::LedgerData const& data) const;
50};
51
52} // namespace etlng::impl
Definition NFT.hpp:31
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:111
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70
Represents an entire ledger diff worth of transactions and objects.
Definition Models.hpp:143
Represents a single object on the ledger.
Definition Models.hpp:105