3#include <xrpl/ledger/AcceptedLedgerTx.h>
4#include <xrpl/ledger/BookListeners.h>
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/protocol/Book.h>
7#include <xrpl/protocol/Issue.h>
8#include <xrpl/protocol/MultiApiJson.h>
9#include <xrpl/protocol/UintTypes.h>
A transaction that is in a closed ledger.
A currency issued by an account.
Tracks order books in the ledger.
virtual void processTxn(std::shared_ptr< ReadView const > const &ledger, AcceptedLedgerTx const &alTx, MultiApiJson const &jvObj)=0
virtual bool isBookToXRP(Issue const &issue, std::optional< Domain > domain=std::nullopt)=0
Check if an order book to XRP exists for the given issue.
virtual void addOrderBook(Book const &book)=0
Add an order book to track.
virtual std::vector< Book > getBooksByTakerPays(Issue const &issue, std::optional< Domain > const &domain=std::nullopt)=0
Get all order books that want a specific issue.
virtual BookListeners::pointer makeBookListeners(Book const &)=0
virtual void setup(std::shared_ptr< ReadView const > const &ledger)=0
Initialize or update the order book database with a new ledger.
virtual int getBookSize(Issue const &issue, std::optional< Domain > const &domain=std::nullopt)=0
Get the count of order books that want a specific issue.
virtual ~OrderBookDB()=default
virtual BookListeners::pointer getBookListeners(Book const &)=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.