20 #include <ripple/ledger/ReadView.h>
21 #include <ripple/protocol/AmountConversions.h>
22 #include <ripple/protocol/Indexes.h>
23 #include <ripple/protocol/STAmount.h>
34 STAmount result({currency, account});
40 result = sleRippleState->getFieldAmount(
42 result.setIssuer(account);
45 assert(result.getIssuer() == account);
46 assert(result.getCurrency() == currency);
67 STAmount result({currency, account});
73 result = sleRippleState->getFieldAmount(
sfBalance);
76 result.setIssuer(account);
79 assert(result.getIssuer() == account);
80 assert(result.getCurrency() == currency);
STAmount creditBalance(ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const ¤cy)
Returns the amount of IOUs issued by issuer that are held by an account.
IOUAmount creditLimit2(ReadView const &v, AccountID const &acc, AccountID const &iss, Currency const &cur)
IOUAmount toAmount< IOUAmount >(STAmount const &amt)
Integers of any length that is a multiple of 32-bits.
const SF_AMOUNT sfLowLimit
STAmount creditLimit(ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const ¤cy)
Calculate the maximum amount of IOUs that an account can hold.
const SF_AMOUNT sfHighLimit
Keylet line(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const SF_AMOUNT sfBalance