3#include <xrpld/rpc/Context.h>
4#include <xrpld/rpc/Status.h>
5#include <xrpld/rpc/detail/Tuning.h>
7#include <xrpl/basics/UnorderedContainers.h>
8#include <xrpl/beast/utility/Journal.h>
9#include <xrpl/core/ServiceRegistry.h>
10#include <xrpl/json/json_value.h>
11#include <xrpl/protocol/AccountID.h>
12#include <xrpl/protocol/ApiVersion.h>
13#include <xrpl/protocol/Asset.h>
14#include <xrpl/protocol/ErrorCodes.h>
15#include <xrpl/protocol/LedgerFormats.h>
16#include <xrpl/protocol/PublicKey.h>
17#include <xrpl/protocol/STLedgerEntry.h>
18#include <xrpl/protocol/SecretKey.h>
19#include <xrpl/protocol/Seed.h>
20#include <xrpl/server/NetworkOPs.h>
87std::optional<json::Value>
126std::pair<rpc::Status, LedgerEntryType>
159std::optional<std::pair<PublicKey, SecretKey>>
161 json::Value
const& params,
171 json::Value
const& jv,
172 json::StaticString
const& name,
std::shared_ptr< STLedgerEntry const > const & const_ref
API version numbers used in later API versions.
std::pair< rpc::Status, LedgerEntryType > chooseLedgerEntryType(json::Value const ¶ms)
Chooses the ledger entry type based on RPC parameters.
std::uint64_t getStartHint(SLE::const_ref sle, AccountID const &accountID)
Gets the start hint for traversing account objects.
bool isRelatedToAccount(ReadView const &ledger, SLE::const_ref sle, AccountID const &accountID)
Tests if a ledger entry (SLE) is owned by the specified account.
static constexpr auto kApiVersionIfUnspecified
ErrorCodeI parseSubUnsubJson(Asset &asset, json::Value const ¶ms, json::StaticString const &name, beast::Journal j)
Parse subscribe/unsubscribe parameters.
std::optional< json::Value > readLimitField(unsigned int &limit, tuning::LimitRange const &range, JsonContext const &context)
Retrieves the limit value from a JsonContext or sets a default.
hash_set< AccountID > parseAccountIds(json::Value const &jvArray)
Parses an array of account IDs from a JSON value.
std::optional< Seed > getSeedFromRPC(json::Value const ¶ms, json::Value &error)
Extracts a Seed from RPC parameters.
std::optional< Seed > parseXrplLibSeed(json::Value const &value)
Parses a XrplLib seed from RPC parameters.
std::optional< std::pair< PublicKey, SecretKey > > keypairForSignature(json::Value const ¶ms, json::Value &error, unsigned int apiVersion)
Generates a keypair for signature from RPC parameters.
bool isAccountObjectsValidType(LedgerEntryType const &type)
Checks if the type is a valid filtering type for the account_objects method.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
std::unordered_set< Value, Hash, Pred, Allocator > hash_set
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
LedgerEntryType
Identifiers for on-ledger objects.
Represents RPC limit parameter values that have a min, default and max.