20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/paths/TrustLine.h>
22 #include <ripple/ledger/ReadView.h>
23 #include <ripple/net/RPCErr.h>
24 #include <ripple/protocol/ErrorCodes.h>
25 #include <ripple/protocol/jss.h>
26 #include <ripple/rpc/Context.h>
27 #include <ripple/rpc/impl/RPCHelpers.h>
34 auto& params = context.
params;
42 if (!(params.isMember(jss::account) || params.isMember(jss::ident)))
46 params.isMember(jss::account) ? params[jss::account].asString()
47 : params[jss::ident].asString());
50 auto id = parseBase58<AccountID>(strIdent);
56 auto const accountID{std::move(
id.value())};
64 STAmount const& saBalance = rspEntry.getBalance();
66 if (saBalance < rspEntry.getLimit())
68 if ((-saBalance) < rspEntry.getLimitPeer())
77 for (
auto const& c : send)
82 for (
auto const& c : receive)
Currency const & badCurrency()
We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...
Json::Value doAccountCurrencies(RPC::JsonContext &context)
Json::Value rpcError(int iError)
@ arrayValue
array value (ordered list)
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Json::Value missing_field_error(std::string const &name)
Value & append(const Value &value)
Append value to array at the end.
Keylet account(AccountID const &id) noexcept
AccountID root.
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
Currency const & getCurrency() const
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
static std::vector< RPCTrustLine > getItems(AccountID const &accountID, ReadView const &view)