1#include <xrpld/app/paths/TrustLine.h>
3#include <xrpl/protocol/STAmount.h>
13 , mLowLimit(sle->getFieldAmount(sfLowLimit))
14 , mHighLimit(sle->getFieldAmount(sfHighLimit))
15 , mBalance(sle->getFieldAmount(sfBalance))
16 , mFlags(sle->getFieldU32(sfFlags))
17 , mViewLowest(mLowLimit.getIssuer() == viewAccount)
37 if (!sle || sle->getType() != ltRIPPLE_STATE)
54 [&items, &accountID, &direction](
56 auto ret = T::makeItem(accountID, sleCur);
75 return detail::getTrustLineItems<PathFindTrustLine>(
76 accountID, view, direction);
83 , lowQualityIn_(sle->getFieldU32(sfLowQualityIn))
84 , lowQualityOut_(sle->getFieldU32(sfLowQualityOut))
85 , highQualityIn_(sle->getFieldU32(sfHighQualityIn))
86 , highQualityOut_(sle->getFieldU32(sfHighQualityOut))
95 if (!sle || sle->getType() != ltRIPPLE_STATE)
103 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)