Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
AMMHelpers.hpp
1#pragma once
2
3#include "data/AmendmentCenterInterface.hpp"
4#include "data/BackendInterface.hpp"
5
6#include <boost/asio/spawn.hpp>
7#include <xrpl/protocol/AccountID.h>
8#include <xrpl/protocol/Issue.h>
9#include <xrpl/protocol/STAmount.h>
10#include <xrpl/protocol/STLedgerEntry.h>
11#include <xrpl/protocol/UintTypes.h>
12
13#include <cstdint>
14#include <utility>
15
16namespace rpc {
17
31std::pair<ripple::STAmount, ripple::STAmount>
33 BackendInterface const& backend,
34 data::AmendmentCenterInterface const& amendmentCenter,
35 std::uint32_t sequence,
36 ripple::AccountID const& ammAccountID,
37 ripple::Issue const& issue1,
38 ripple::Issue const& issue2,
39 bool freezeHandling,
40 boost::asio::yield_context yield
41);
42
55ripple::STAmount
57 BackendInterface const& backend,
58 std::uint32_t sequence,
59 ripple::Currency const& cur1,
60 ripple::Currency const& cur2,
61 ripple::AccountID const& ammAccount,
62 ripple::AccountID const& lpAccount,
63 boost::asio::yield_context yield
64);
65
76ripple::STAmount
78 BackendInterface const& backend,
79 std::uint32_t sequence,
80 ripple::SLE const& ammSle,
81 ripple::AccountID const& lpAccount,
82 boost::asio::yield_context yield
83);
84
85} // namespace rpc
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:18
std::pair< ripple::STAmount, ripple::STAmount > getAmmPoolHolds(BackendInterface const &backend, data::AmendmentCenterInterface const &amendmentCenter, std::uint32_t sequence, ripple::AccountID const &ammAccountID, ripple::Issue const &issue1, ripple::Issue const &issue2, bool freezeHandling, boost::asio::yield_context yield)
getAmmPoolHolds returns the balances of the amm asset pair
Definition AMMHelpers.cpp:21
ripple::STAmount getAmmLpHolds(BackendInterface const &backend, std::uint32_t sequence, ripple::Currency const &cur1, ripple::Currency const &cur2, ripple::AccountID const &ammAccount, ripple::AccountID const &lpAccount, boost::asio::yield_context yield)
getAmmLpHolds returns the liquidity provider token balance
Definition AMMHelpers.cpp:56