20#include <xrpld/app/paths/TrustLine.h>
22#include <xrpl/protocol/STAmount.h>
32 , mLowLimit(sle->getFieldAmount(sfLowLimit))
33 , mHighLimit(sle->getFieldAmount(sfHighLimit))
34 , mBalance(sle->getFieldAmount(sfBalance))
35 , mFlags(sle->getFieldU32(sfFlags))
36 , mViewLowest(mLowLimit.getIssuer() == viewAccount)
56 if (!sle || sle->getType() != ltRIPPLE_STATE)
73 [&items, &accountID, &direction](
75 auto ret = T::makeItem(accountID, sleCur);
94 return detail::getTrustLineItems<PathFindTrustLine>(
95 accountID, view, direction);
102 , lowQualityIn_(sle->getFieldU32(sfLowQualityIn))
103 , lowQualityOut_(sle->getFieldU32(sfLowQualityOut))
104 , highQualityIn_(sle->getFieldU32(sfHighQualityIn))
105 , highQualityOut_(sle->getFieldU32(sfHighQualityOut))
114 if (!sle || sle->getType() != ltRIPPLE_STATE)
122 return detail::getTrustLineItems<RPCTrustLine>(accountID, view);
static std::vector< PathFindTrustLine > getItems(AccountID const &accountID, ReadView const &view, LineDirection direction)
static std::optional< PathFindTrustLine > makeItem(AccountID const &accountID, std::shared_ptr< SLE const > const &sle)
static std::optional< RPCTrustLine > makeItem(AccountID const &accountID, std::shared_ptr< SLE const > const &sle)
static std::vector< RPCTrustLine > getItems(AccountID const &accountID, ReadView const &view)
AccountID const & getIssuer() const
Wraps a trust line SLE for convenience.
TrustLineBase(std::shared_ptr< SLE const > const &sle, AccountID const &viewAccount)
STAmount const mHighLimit
@ objectValue
object value (collection of name/value pairs).
std::vector< T > getTrustLineItems(AccountID const &accountID, ReadView const &view, LineDirection direction=LineDirection::outgoing)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void forEachItem(ReadView const &view, Keylet const &root, std::function< void(std::shared_ptr< SLE const > const &)> const &f)
Iterate all items in the given directory.
std::string to_string(base_uint< Bits, Tag > const &a)
LineDirection
Describes how an account was found in a path, and how to find the next set of paths.
T shrink_to_fit(T... args)