|
Clio
develop
The XRP Ledger API server.
|
This namespace contains all the RPC logic and handlers. More...
Classes | |
| class | AccountChannelsHandler |
| The account_channels method returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. All information retrieved is relative to a particular version of the ledger. More... | |
| class | AccountCurrenciesHandler |
| The account_currencies command retrieves a list of currencies that an account can send or receive, based on its trust lines. More... | |
| struct | AccountCursor |
| A cursor object used to traverse nodes owned by an account. More... | |
| class | AccountInfoHandler |
| The account_info command retrieves information about an account, its activity, and its XRP balance. More... | |
| class | AccountLinesHandler |
| The account_lines method returns information about an account's trust lines, which contain balances in all non-XRP currencies and assets. More... | |
| class | AccountNFTsHandler |
| The account_nfts method returns a list of NFToken objects for the specified account. More... | |
| class | AccountNotFoundError |
| Account not found error. More... | |
| class | AccountObjectsHandler |
| The account_objects command returns the raw ledger format for all objects owned by an account. The results can be filtered by the type. The valid types are: check, deposit_preauth, escrow, nft_offer, offer, payment_channel, signer_list, state (trust line), did and ticket. More... | |
| class | AccountOffersHandler |
| The account_offers method retrieves a list of offers made by a given account. More... | |
| class | AccountTxHandler |
| The account_tx method retrieves a list of transactions that involved the specified account. More... | |
| class | AMMInfoHandler |
| AMMInfoHandler returns information about AMM pools. More... | |
| class | AnyHandler |
| A type-erased Handler that can contain any (NextGen) RPC handler class. More... | |
| class | APIVersionParser |
| A baseclass for API version helper. More... | |
| class | BaseServerInfoHandler |
| Contains common functionality for handling the server_info command. More... | |
| struct | BookChange |
| Represents an entry in the book_changes' changes array. More... | |
| class | BookChanges |
| Encapsulates the book_changes computations and transformations. More... | |
| class | BookChangesHandler |
| BookChangesHandler returns the order book changes for a given ledger. More... | |
| class | BookOffersHandler |
| The book_offers method retrieves a list of Offers between two currencies, also known as an order book. More... | |
| struct | ClioErrorInfo |
| Holds info about a particular ClioError. More... | |
| struct | Context |
| Context of an RPC call. More... | |
| class | Counters |
| Holds information about successful, failed, forwarded, etc. RPC handler calls. More... | |
| class | DepositAuthorizedHandler |
| Handles the deposit_authorized command. More... | |
| class | FeatureHandler |
| Contains common functionality for handling the server_info command. More... | |
| struct | FieldSpec |
| Represents a Specification for one field of an RPC command. More... | |
| class | GatewayBalancesHandler |
| Handles the gateway_balances command. More... | |
| class | GetAggregatePriceHandler |
| The get_aggregate_price method. More... | |
| class | HandlerProvider |
| Interface for the provider of RPC handlers. More... | |
| class | InvalidParamsError |
| Invalid parameters error. More... | |
| struct | JsonBool |
| A wrapper around bool that allows to convert from any JSON value. More... | |
| class | Label |
| Class representing a Prometheus label. More... | |
| class | Labels |
| Class representing a collection of Prometheus labels. More... | |
| class | LedgerDataHandler |
| The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version. More... | |
| class | LedgerEntryHandler |
| The ledger_entry method returns a single ledger object from the XRP Ledger in its raw format. More... | |
| class | LedgerHandler |
| Retrieve information about the public ledger. More... | |
| class | LedgerIndexHandler |
| The ledger_index method fetches the latest closed ledger before the given date. More... | |
| class | LedgerRangeHandler |
| The ledger_range command returns the index number of the earliest and latest ledgers that the server has. More... | |
| class | MPTHoldersHandler |
| The mpt_holders command asks the Clio server for all holders of a particular MPTokenIssuance. More... | |
| class | NFTBuyOffersHandler |
| The nft_buy_offers method returns a list of buy offers for a given NFToken object. More... | |
| class | NFTHistoryHandler |
| The nft_history command asks the Clio server for past transaction metadata for the NFT being queried. More... | |
| class | NFTInfoHandler |
| The nft_info command asks the Clio server for information about the NFT being queried. More... | |
| class | NFTOffersHandlerBase |
| Contains common functionality for handling the nft_offers command. More... | |
| class | NFTsByIssuerHandler |
| Handler for the nfts_by_issuer command. More... | |
| class | NFTSellOffersHandler |
| The nft_sell_offers method returns a list of sell offers for a given NFToken object. More... | |
| class | NoRippleCheckHandler |
| Handles the noripple_check command. More... | |
| class | PingHandler |
| The ping command returns an acknowledgement, so that clients can test the connection status and latency. More... | |
| class | RandomHandler |
| The random command provides a random number to be used as a source of entropy for random number generation by clients. More... | |
| struct | Result |
| Result type used to return responses or error statuses to the Webserver subsystem. More... | |
| struct | ReturnType |
| The final return type out of RPC engine. More... | |
| struct | RPCCenter |
| Registry of RPC commands supported by Clio. More... | |
| class | RPCEngine |
| The RPC engine that ties all RPC-related functionality together. More... | |
| struct | RpcSpec |
| Represents a Specification of an entire RPC command. More... | |
| struct | Status |
| A status returned from any RPC handler. More... | |
| class | SubscribeHandler |
| Contains functionality for handling the subscribe command. The subscribe method requests periodic notifications from the server when certain events happen. More... | |
| class | TransactionEntryHandler |
| The transaction_entry method retrieves information on a single transaction from a specific ledger version. More... | |
| class | TxHandler |
| The tx method retrieves information on a single transaction, by its identifying hash. More... | |
| class | UnsubscribeHandler |
| Handles the unsubscribe command which is used to disconnect a subscriber from a feed. The unsubscribe command tells the server to stop sending messages for a particular subscription or set of subscriptions. More... | |
| class | VaultInfoHandler |
| The vault_info command retrieves information about a vault, currency, shares etc. More... | |
| class | VersionHandler |
| The version command returns the min,max and current api Version we are using. More... | |
| struct | VoidOutput |
| An empty type used as Output for handlers than don't actually produce output. More... | |
| struct | WarningInfo |
| Holds information about a clio warning. More... | |
| class | WorkQueue |
| An asynchronous, thread-safe queue for RPC requests. More... | |
Concepts | |
| concept | SomeRequirement |
| Specifies what a requirement used with rpc::FieldSpec must provide. | |
| concept | SomeModifier |
| Specifies what a modifier used with rpc::FieldSpec must provide. | |
| concept | SomeCheck |
| Specifies what a check used with rpc::FieldSpec must provide. | |
| concept | SomeProcessor |
| The requirements of a processor to be used with rpc::FieldSpec. | |
| concept | SomeContextProcessWithInput |
| A process function that expects both some Input and a Context. | |
| concept | SomeContextProcessWithoutInput |
| A process function that expects no Input but does take a Context. | |
| concept | SomeHandlerWithInput |
| Specifies what a Handler with Input must provide. | |
| concept | SomeHandlerWithoutInput |
| Specifies what a Handler without Input must provide. | |
| concept | SomeHandler |
| Specifies what a Handler type must provide. | |
Typedefs | |
| using | RpcSpecConstRef = RpcSpec const& |
| An alias for a const reference to RpcSpec. | |
| using | MaybeError = std::expected<void, Status> |
| Return type used for Validators that can return error but don't have specific value to return. | |
| using | Error = std::unexpected<Status> |
| The type that represents just the error part of MaybeError. | |
| template<typename OutputType> | |
| using | HandlerReturnType = std::expected<OutputType, Status> |
| Return type for each individual handler. | |
| using | RippledError = ripple::error_code_i |
| Clio uses compatible Rippled error codes for most RPC errors. | |
| using | CombinedError = std::variant<RippledError, ClioError> |
| Clio operates on a combination of Rippled and Custom Clio error codes. | |
| using | ServerInfoHandler = BaseServerInfoHandler<Counters> |
| The server_info command asks the Clio server for a human-readable version of various information about the Clio server being queried. | |
| using | RippledJson = Json::Value |
Enumerations | |
| enum class | ClioError { RpcMalformedCurrency = 5000 , RpcMalformedRequest = 5001 , RpcMalformedOwner = 5002 , RpcMalformedAddress = 5003 , RpcUnknownOption = 5005 , RpcFieldNotFoundTransaction = 5006 , RpcMalformedOracleDocumentId = 5007 , RpcMalformedAuthorizedCredentials = 5008 , RpcEntryNotFound = 5009 , RpcInvalidApiVersion = 6000 , RpcCommandIsMissing = 6001 , RpcCommandNotString = 6002 , RpcCommandIsEmpty = 6003 , RpcParamsUnparsable = 6004 , EtlConnectionError = 7000 , EtlRequestError = 7001 , EtlRequestTimeout = 7002 , EtlInvalidResponse = 7003 } |
| Custom clio RPC Errors. | |
| enum | WarningCode { WarnUnknown = -1 , WarnRpcClio = 2001 , WarnRpcOutdated = 2002 , WarnRpcRateLimit = 2003 , WarnRpcDeprecated = 2004 } |
| Warning codes that can be returned by clio. | |
| enum class | NFTokenjson { ENABLE , DISABLE } |
| Enum for NFT json manipulation. | |
Functions | |
| std::pair< ripple::STAmount, ripple::STAmount > | getAmmPoolHolds (BackendInterface const &backend, data::AmendmentCenterInterface const &amendmentCenter, std::uint32_t sequence, ripple::AccountID const &ammAccountID, ripple::Issue const &issue1, ripple::Issue const &issue2, bool freezeHandling, boost::asio::yield_context yield) |
| getAmmPoolHolds returns the balances of the amm asset pair | |
| ripple::STAmount | getAmmLpHolds (BackendInterface const &backend, std::uint32_t sequence, ripple::Currency const &cur1, ripple::Currency const &cur2, ripple::AccountID const &ammAccount, ripple::AccountID const &lpAccount, boost::asio::yield_context yield) |
| getAmmLpHolds returns the liquidity provider token balance | |
| ripple::STAmount | getAmmLpHolds (BackendInterface const &backend, std::uint32_t sequence, ripple::SLE const &ammSle, ripple::AccountID const &lpAccount, boost::asio::yield_context yield) |
| getAmmLpHolds returns the liquidity provider token balance | |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, BookChange const &change) |
| Implementation of value_from for BookChange type. | |
| boost::json::object | computeBookChanges (ripple::LedgerHeader const &lgrInfo, std::vector< data::TransactionAndMetadata > const &transactions) |
| Computes all book changes for the given ledger header and transactions. | |
| JsonBool | tag_invoke (boost::json::value_to_tag< JsonBool > const &, boost::json::value const &jsonValue) |
| Convert a JSON value to a JsonBool. | |
| bool | operator== (MaybeError const &lhs, MaybeError const &rhs) |
| Check if two MaybeError objects are equal. | |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, VoidOutput const &) |
| Convert an empty output to a JSON object. | |
| std::ostream & | operator<< (std::ostream &stream, Status const &status) |
| WarningInfo const & | getWarningInfo (WarningCode code) |
| Get the warning info object from a warning code. | |
| boost::json::object | makeWarning (WarningCode code) |
| Generate JSON from a rpc::WarningCode. | |
| ClioErrorInfo const & | getErrorInfo (ClioError code) |
| Get the error info object from an clio-specific error code. | |
| boost::json::object | makeError (RippledError err, std::optional< std::string_view > customError=std::nullopt, std::optional< std::string_view > customMessage=std::nullopt) |
| Generate JSON from a rpc::RippledError. | |
| boost::json::object | makeError (ClioError err, std::optional< std::string_view > customError=std::nullopt, std::optional< std::string_view > customMessage=std::nullopt) |
| Generate JSON from a rpc::ClioError. | |
| boost::json::object | makeError (Status const &status) |
| Generate JSON from a rpc::Status. | |
| std::expected< web::Context, Status > | makeWsContext (boost::asio::yield_context yc, boost::json::object const &request, web::SubscriptionContextPtr session, util::TagDecoratorFactory const &tagFactory, data::LedgerRange const &range, std::string const &clientIp, std::reference_wrapper< APIVersionParser const > apiVersionParser, bool isAdmin) |
| A factory function that creates a Websocket context. | |
| std::expected< web::Context, Status > | makeHttpContext (boost::asio::yield_context yc, boost::json::object const &request, util::TagDecoratorFactory const &tagFactory, data::LedgerRange const &range, std::string const &clientIp, std::reference_wrapper< APIVersionParser const > apiVersionParser, bool isAdmin) |
| A factory function that creates a HTTP context. | |
| AccountChannelsHandler::Input | tag_invoke (boost::json::value_to_tag< AccountChannelsHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountChannelsHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountChannelsHandler::ChannelResponse const &channel) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountCurrenciesHandler::Output const &output) |
| AccountCurrenciesHandler::Input | tag_invoke (boost::json::value_to_tag< AccountCurrenciesHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountInfoHandler::Output const &output) |
| AccountInfoHandler::Input | tag_invoke (boost::json::value_to_tag< AccountInfoHandler::Input >, boost::json::value const &jv) |
| AccountLinesHandler::Input | tag_invoke (boost::json::value_to_tag< AccountLinesHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountLinesHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountLinesHandler::LineResponse const &line) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountNFTsHandler::Output const &output) |
| AccountNFTsHandler::Input | tag_invoke (boost::json::value_to_tag< AccountNFTsHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountObjectsHandler::Output const &output) |
| AccountObjectsHandler::Input | tag_invoke (boost::json::value_to_tag< AccountObjectsHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountOffersHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountOffersHandler::Offer const &offer) |
| AccountOffersHandler::Input | tag_invoke (boost::json::value_to_tag< AccountOffersHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountTxHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AccountTxHandler::Marker const &marker) |
| AccountTxHandler::Input | tag_invoke (boost::json::value_to_tag< AccountTxHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, AMMInfoHandler::Output const &output) |
| AMMInfoHandler::Input | tag_invoke (boost::json::value_to_tag< AMMInfoHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, BookChangesHandler::Output const &output) |
| BookChangesHandler::Input | tag_invoke (boost::json::value_to_tag< BookChangesHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, BookOffersHandler::Output const &output) |
| BookOffersHandler::Input | tag_invoke (boost::json::value_to_tag< BookOffersHandler::Input >, boost::json::value const &jv) |
| DepositAuthorizedHandler::Input | tag_invoke (boost::json::value_to_tag< DepositAuthorizedHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, DepositAuthorizedHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, FeatureHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, FeatureHandler::Output::Feature const &feature) |
| FeatureHandler::Input | tag_invoke (boost::json::value_to_tag< FeatureHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, GatewayBalancesHandler::Output const &output) |
| GatewayBalancesHandler::Input | tag_invoke (boost::json::value_to_tag< GatewayBalancesHandler::Input >, boost::json::value const &jv) |
| GetAggregatePriceHandler::Input | tag_invoke (boost::json::value_to_tag< GetAggregatePriceHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, GetAggregatePriceHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, LedgerHandler::Output const &output) |
| LedgerHandler::Input | tag_invoke (boost::json::value_to_tag< LedgerHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, LedgerDataHandler::Output const &output) |
| LedgerDataHandler::Input | tag_invoke (boost::json::value_to_tag< LedgerDataHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, LedgerEntryHandler::Output const &output) |
| LedgerEntryHandler::Input | tag_invoke (boost::json::value_to_tag< LedgerEntryHandler::Input >, boost::json::value const &jv) |
| LedgerIndexHandler::Input | tag_invoke (boost::json::value_to_tag< LedgerIndexHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, LedgerIndexHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, LedgerRangeHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, MPTHoldersHandler::Output const &output) |
| MPTHoldersHandler::Input | tag_invoke (boost::json::value_to_tag< MPTHoldersHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NFTHistoryHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NFTHistoryHandler::Marker const &marker) |
| NFTHistoryHandler::Input | tag_invoke (boost::json::value_to_tag< NFTHistoryHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NFTInfoHandler::Output const &output) |
| NFTInfoHandler::Input | tag_invoke (boost::json::value_to_tag< NFTInfoHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NFTOffersHandlerBase::Output const &output) |
| NFTOffersHandlerBase::Input | tag_invoke (boost::json::value_to_tag< NFTOffersHandlerBase::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NFTsByIssuerHandler::Output const &output) |
| NFTsByIssuerHandler::Input | tag_invoke (boost::json::value_to_tag< NFTsByIssuerHandler::Input >, boost::json::value const &jv) |
| NoRippleCheckHandler::Input | tag_invoke (boost::json::value_to_tag< NoRippleCheckHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, NoRippleCheckHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, RandomHandler::Output const &output) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, SubscribeHandler::Output const &output) |
| SubscribeHandler::Input | tag_invoke (boost::json::value_to_tag< SubscribeHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, TransactionEntryHandler::Output const &output) |
| TransactionEntryHandler::Input | tag_invoke (boost::json::value_to_tag< TransactionEntryHandler::Input >, boost::json::value const &jv) |
| UnsubscribeHandler::Input | tag_invoke (boost::json::value_to_tag< UnsubscribeHandler::Input >, boost::json::value const &jv) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, VaultInfoHandler::Output const &output) |
| VaultInfoHandler::Input | tag_invoke (boost::json::value_to_tag< VaultInfoHandler::Input >, boost::json::value const &jv) |
| std::optional< AccountCursor > | parseAccountCursor (std::optional< std::string > jsonCursor) |
| Parse the account cursor from the JSON. | |
| std::optional< ripple::STAmount > | getDeliveredAmount (std::shared_ptr< ripple::STTx const > const &txn, std::shared_ptr< ripple::TxMeta const > const &meta, std::uint32_t ledgerSequence, uint32_t date) |
| Get the delivered amount. | |
| bool | canHaveDeliveredAmount (std::shared_ptr< ripple::STTx const > const &txn, std::shared_ptr< ripple::TxMeta const > const &meta) |
| Whether the transaction can have a delivered amount. | |
| std::optional< ripple::AccountID > | accountFromStringStrict (std::string const &account) |
| Get a ripple::AccountID from its string representation. | |
| std::pair< std::shared_ptr< ripple::STTx const >, std::shared_ptr< ripple::STObject const > > | deserializeTxPlusMeta (data::TransactionAndMetadata const &blobs) |
| Deserialize a TransactionAndMetadata into a pair of STTx and STObject. | |
| std::pair< std::shared_ptr< ripple::STTx const >, std::shared_ptr< ripple::TxMeta const > > | deserializeTxPlusMeta (data::TransactionAndMetadata const &blobs, std::uint32_t seq) |
| Deserialize a TransactionAndMetadata into a pair of STTx and TxMeta. | |
| boost::json::object | toJson (ripple::STBase const &obj) |
| Convert STBase object to JSON. | |
| std::pair< boost::json::object, boost::json::object > | toExpandedJson (data::TransactionAndMetadata const &blobs, std::uint32_t apiVersion, NFTokenjson nftEnabled=NFTokenjson::DISABLE, std::optional< uint16_t > networkId=std::nullopt) |
| Convert a TransactionAndMetadata to two JSON objects. | |
| std::optional< std::string > | encodeCTID (uint32_t ledgerSeq, uint16_t txnIndex, uint16_t networkId) noexcept |
| Encode CTID as string. | |
| bool | insertDeliveredAmount (boost::json::object &metaJson, std::shared_ptr< ripple::STTx const > const &txn, std::shared_ptr< ripple::TxMeta const > const &meta, uint32_t date) |
| Add "DeliveredAmount" to the transaction json object. | |
| static std::optional< ripple::uint192 > | getMPTIssuanceID (std::shared_ptr< ripple::TxMeta const > const &meta) |
| Get the delivered amount. | |
| static bool | canHaveMPTIssuanceID (std::shared_ptr< ripple::STTx const > const &txn, std::shared_ptr< ripple::TxMeta const > const &meta) |
| Check if transaction has a new MPToken created. | |
| bool | insertMPTIssuanceID (boost::json::object &txnJson, std::shared_ptr< ripple::STTx const > const &txn, boost::json::object &metaJson, std::shared_ptr< ripple::TxMeta const > const &meta) |
| Add "mpt_issuance_id" into various MPTToken transaction json. | |
| void | insertDeliverMaxAlias (boost::json::object &txJson, std::uint32_t apiVersion) |
| Add "DeliverMax" which is the alias of "Amount" for "Payment" transaction to transaction json. Remove the "Amount" field when version is greater than 1. | |
| boost::json::object | toJson (ripple::TxMeta const &meta) |
| Convert a TxMeta to JSON object. | |
| boost::json::value | toBoostJson (RippledJson const &value) |
| Convert a RippledJson to boost::json::value. | |
| boost::json::object | toJson (ripple::SLE const &sle) |
| Convert SLE to JSON. | |
| boost::json::object | toJson (ripple::LedgerHeader const &info, bool binary, std::uint32_t apiVersion) |
| Convert a LedgerHeader to JSON object. | |
| std::optional< std::uint32_t > | parseStringAsUInt (std::string const &value) |
| Parse the string as a uint32_t. | |
| std::expected< ripple::LedgerHeader, Status > | ledgerHeaderFromRequest (std::shared_ptr< data::BackendInterface const > const &backend, web::Context const &ctx) |
| Get ledger info from the request. | |
| std::expected< ripple::LedgerHeader, Status > | getLedgerHeaderFromHashOrSeq (BackendInterface const &backend, boost::asio::yield_context yield, std::optional< std::string > ledgerHash, std::optional< uint32_t > ledgerIndex, uint32_t maxSeq) |
| Get ledger info from hash or sequence. | |
| std::vector< unsigned char > | ledgerHeaderToBlob (ripple::LedgerHeader const &info, bool includeHash=false) |
| Convert a ledger header to a blob. | |
| std::uint64_t | getStartHint (ripple::SLE const &sle, ripple::AccountID const &accountID) |
| Get the start hint for the account. | |
| std::expected< AccountCursor, Status > | traverseNFTObjects (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &accountID, ripple::uint256 nextPage, std::uint32_t limit, boost::asio::yield_context yield, std::function< void(ripple::SLE)> atOwnedNode) |
| Traverse NFT objects and call the callback for each owned node. | |
| std::expected< AccountCursor, Status > | traverseOwnedNodes (BackendInterface const &backend, ripple::AccountID const &accountID, std::uint32_t sequence, std::uint32_t limit, std::optional< std::string > jsonCursor, boost::asio::yield_context yield, std::function< void(ripple::SLE)> atOwnedNode, bool nftIncluded=false) |
| Traverse nodes owned by an account. | |
| std::expected< AccountCursor, Status > | traverseOwnedNodes (BackendInterface const &backend, ripple::Keylet const &owner, ripple::uint256 const &hexMarker, std::uint32_t startHint, std::uint32_t sequence, std::uint32_t limit, boost::asio::yield_context yield, std::function< void(ripple::SLE)> atOwnedNode) |
| Traverse nodes owned by an account. | |
| std::shared_ptr< ripple::SLE const > | read (std::shared_ptr< data::BackendInterface const > const &backend, ripple::Keylet const &keylet, ripple::LedgerHeader const &lgrInfo, web::Context const &context) |
| Read SLE from the backend. | |
| std::optional< ripple::Seed > | parseRippleLibSeed (boost::json::value const &value) |
| Parse a ripple-lib seed. | |
| std::vector< ripple::AccountID > | getAccountsFromTransaction (boost::json::object const &transaction) |
| Get the account associated with a transaction. | |
| bool | isGlobalFrozen (BackendInterface const &backend, std::uint32_t seq, ripple::AccountID const &issuer, boost::asio::yield_context yield) |
| Whether global frozen is set. | |
| bool | fetchAndCheckAnyFlagsExists (BackendInterface const &backend, std::uint32_t sequence, ripple::Keylet const &keylet, std::vector< std::uint32_t > const &flags, boost::asio::yield_context yield) |
| Fetches a ledger object and checks if any of the specified flag is set on the account. | |
| bool | isFrozen (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &account, ripple::Currency const ¤cy, ripple::AccountID const &issuer, boost::asio::yield_context yield) |
| Whether the account is frozen. | |
| bool | isDeepFrozen (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &account, ripple::Currency const ¤cy, ripple::AccountID const &issuer, boost::asio::yield_context yield) |
| Whether the trustline is deep frozen. | |
| bool | isLPTokenFrozen (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &account, ripple::Issue const &asset, ripple::Issue const &asset2, boost::asio::yield_context yield) |
| Whether the account that owns a LPToken is frozen for the assets in the pool. | |
| ripple::XRPAmount | xrpLiquid (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &id, boost::asio::yield_context yield) |
| Get the XRP liquidity. | |
| ripple::STAmount | accountFunds (BackendInterface const &backend, data::AmendmentCenterInterface const &amendmentCenter, std::uint32_t sequence, ripple::STAmount const &amount, ripple::AccountID const &id, boost::asio::yield_context yield) |
| Get the account funds. | |
| ripple::STAmount | ammAccountHolds (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &account, ripple::Currency const ¤cy, ripple::AccountID const &issuer, bool const zeroIfFrozen, boost::asio::yield_context yield) |
| Get the amount that an LPToken owner holds. | |
| ripple::STAmount | accountHolds (BackendInterface const &backend, data::AmendmentCenterInterface const &amendmentCenter, std::uint32_t sequence, ripple::AccountID const &account, ripple::Currency const ¤cy, ripple::AccountID const &issuer, bool zeroIfFrozen, boost::asio::yield_context yield) |
| Get the amount that an account holds. | |
| ripple::Rate | transferRate (BackendInterface const &backend, std::uint32_t sequence, ripple::AccountID const &issuer, boost::asio::yield_context yield) |
| Get the transfer rate. | |
| boost::json::array | postProcessOrderBook (std::vector< data::LedgerObject > const &offers, ripple::Book const &book, ripple::AccountID const &takerID, data::BackendInterface const &backend, data::AmendmentCenterInterface const &amendmentCenter, std::uint32_t ledgerSequence, boost::asio::yield_context yield) |
| Post process an order book. | |
| std::expected< ripple::Book, Status > | parseBook (ripple::Currency pays, ripple::AccountID payIssuer, ripple::Currency gets, ripple::AccountID getIssuer, std::optional< std::string > const &domain) |
| Parse the book from the request. | |
| std::expected< ripple::Book, Status > | parseBook (boost::json::object const &request) |
| Parse the book from the request. | |
| std::expected< ripple::AccountID, Status > | parseTaker (boost::json::value const &taker) |
| Parse the taker from the request. | |
| ripple::Issue | parseIssue (boost::json::object const &issue) |
| Parse the json object into a ripple::Issue object. | |
| bool | specifiesCurrentOrClosedLedger (boost::json::object const &request) |
| Check whether the request specifies the current or closed ledger. | |
| bool | isAdminCmd (std::string const &method, boost::json::object const &request) |
| Check whether a request requires administrative privileges on rippled side. | |
| std::expected< ripple::uint256, Status > | getNFTID (boost::json::object const &request) |
| Get the NFTID from the request. | |
| boost::json::object | toJsonWithBinaryTx (data::TransactionAndMetadata const &txnPlusMeta, std::uint32_t apiVersion) |
| Convert a TransactionAndMetadata to JSON object containing tx and metadata data in hex format. According to the apiVersion, the key is "tx_blob" and "meta" or "meta_blob". | |
| bool | isOwnedByAccount (ripple::SLE const &sle, ripple::AccountID const &accountID) |
| Check whether the SLE is owned by the account. | |
| boost::json::object | generatePubLedgerMessage (ripple::LedgerHeader const &lgrInfo, ripple::Fees const &fees, std::string const &ledgerRange, std::uint32_t txnCount) |
| Generate a JSON object to publish ledger message. | |
| template<typename T> | |
| std::optional< std::tuple< uint32_t, uint16_t, uint16_t > > | decodeCTID (T const ctid) noexcept |
| Decode the CTID from a string or a uint64_t. | |
| template<typename DurationType> | |
| void | logDuration (boost::json::object const &request, util::BaseTagDecorator const &tag, DurationType const &dur) |
| Log the duration of the request processing. | |
Variables | |
| static constexpr uint32_t | kAPI_VERSION_DEFAULT = 1u |
| Default API version to use if no version is specified by clients. | |
| static constexpr uint32_t | kAPI_VERSION_MIN = 1u |
| Minimum API version supported by this build. | |
| static constexpr uint32_t | kAPI_VERSION_MAX = 3u |
| Maximum API version supported by this build. | |
| static Status | gOk |
| A globally available rpc::Status that represents a successful state. | |
This namespace contains all the RPC logic and handlers.
| using rpc::CombinedError = std::variant<RippledError, ClioError> |
Clio operates on a combination of Rippled and Custom Clio error codes.
The server_info command asks the Clio server for a human-readable version of various information about the Clio server being queried.
For more details see: https://xrpl.org/server_info-clio.html
| std::optional< ripple::AccountID > rpc::accountFromStringStrict | ( | std::string const & | account | ) |
Get a ripple::AccountID from its string representation.
| account | The string representation of the account |
| ripple::STAmount rpc::accountFunds | ( | BackendInterface const & | backend, |
| data::AmendmentCenterInterface const & | amendmentCenter, | ||
| std::uint32_t | sequence, | ||
| ripple::STAmount const & | amount, | ||
| ripple::AccountID const & | id, | ||
| boost::asio::yield_context | yield ) |
Get the account funds.
| backend | The backend to use |
| amendmentCenter | The amendmentCenter to use |
| sequence | The sequence |
| amount | The amount |
| id | The account ID |
| yield | The coroutine context |
| ripple::STAmount rpc::accountHolds | ( | BackendInterface const & | backend, |
| data::AmendmentCenterInterface const & | amendmentCenter, | ||
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | account, | ||
| ripple::Currency const & | currency, | ||
| ripple::AccountID const & | issuer, | ||
| bool | zeroIfFrozen, | ||
| boost::asio::yield_context | yield ) |
Get the amount that an account holds.
| backend | The backend to use |
| amendmentCenter | The amendmentCenter to use |
| sequence | The sequence |
| account | The account |
| currency | The currency |
| issuer | The issuer |
| zeroIfFrozen | Whether to return zero if frozen |
| yield | The coroutine context |
| ripple::STAmount rpc::ammAccountHolds | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | account, | ||
| ripple::Currency const & | currency, | ||
| ripple::AccountID const & | issuer, | ||
| bool const | zeroIfFrozen, | ||
| boost::asio::yield_context | yield ) |
Get the amount that an LPToken owner holds.
| backend | The backend to use |
| sequence | The sequence |
| account | The account |
| currency | The currency |
| issuer | The issuer |
| zeroIfFrozen | Whether to return zero if frozen |
| yield | The coroutine context |
| bool rpc::canHaveDeliveredAmount | ( | std::shared_ptr< ripple::STTx const > const & | txn, |
| std::shared_ptr< ripple::TxMeta const > const & | meta ) |
Whether the transaction can have a delivered amount.
| txn | The transaction |
| meta | The metadata |
|
static |
Check if transaction has a new MPToken created.
| txn | The transaction object |
| meta | The metadata object |
|
nodiscard |
Computes all book changes for the given ledger header and transactions.
| lgrInfo | The ledger header |
| transactions | The vector of transactions with heir metadata |
|
inlinenoexcept |
Decode the CTID from a string or a uint64_t.
| T | The type of the CTID |
| ctid | The CTID to decode |
| std::pair< std::shared_ptr< ripple::STTx const >, std::shared_ptr< ripple::STObject const > > rpc::deserializeTxPlusMeta | ( | data::TransactionAndMetadata const & | blobs | ) |
Deserialize a TransactionAndMetadata into a pair of STTx and STObject.
| blobs | The TransactionAndMetadata to deserialize |
| std::pair< std::shared_ptr< ripple::STTx const >, std::shared_ptr< ripple::TxMeta const > > rpc::deserializeTxPlusMeta | ( | data::TransactionAndMetadata const & | blobs, |
| std::uint32_t | seq ) |
Deserialize a TransactionAndMetadata into a pair of STTx and TxMeta.
| blobs | The TransactionAndMetadata to deserialize |
| seq | The sequence number to set |
|
noexcept |
Encode CTID as string.
| ledgerSeq | The ledger sequence |
| txnIndex | The transaction index |
| networkId | The network ID |
| bool rpc::fetchAndCheckAnyFlagsExists | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::Keylet const & | keylet, | ||
| std::vector< std::uint32_t > const & | flags, | ||
| boost::asio::yield_context | yield ) |
Fetches a ledger object and checks if any of the specified flag is set on the account.
| backend | The backend to use |
| sequence | The sequence |
| keylet | The keylet representing the object |
| flags | The flags to check on the fetched SLE. |
| yield | The coroutine context |
| boost::json::object rpc::generatePubLedgerMessage | ( | ripple::LedgerHeader const & | lgrInfo, |
| ripple::Fees const & | fees, | ||
| std::string const & | ledgerRange, | ||
| std::uint32_t | txnCount ) |
Generate a JSON object to publish ledger message.
| lgrInfo | The ledger header |
| fees | The fees |
| ledgerRange | The ledger range |
| txnCount | The transaction count |
| std::vector< ripple::AccountID > rpc::getAccountsFromTransaction | ( | boost::json::object const & | transaction | ) |
Get the account associated with a transaction.
| transaction | The transaction |
| ripple::STAmount rpc::getAmmLpHolds | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::Currency const & | cur1, | ||
| ripple::Currency const & | cur2, | ||
| ripple::AccountID const & | ammAccount, | ||
| ripple::AccountID const & | lpAccount, | ||
| boost::asio::yield_context | yield ) |
getAmmLpHolds returns the liquidity provider token balance
| backend | The backend to use |
| sequence | The sequence number to use |
| cur1 | The first currency |
| cur2 | The second currency |
| ammAccount | The amm account |
| lpAccount | The lp account |
| yield | The coroutine context |
| ripple::STAmount rpc::getAmmLpHolds | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::SLE const & | ammSle, | ||
| ripple::AccountID const & | lpAccount, | ||
| boost::asio::yield_context | yield ) |
getAmmLpHolds returns the liquidity provider token balance
| backend | The backend to use |
| sequence | The sequence number to use |
| ammSle | The amm ledger entry |
| lpAccount | The lp account |
| yield | The coroutine context |
| std::pair< ripple::STAmount, ripple::STAmount > rpc::getAmmPoolHolds | ( | BackendInterface const & | backend, |
| data::AmendmentCenterInterface const & | amendmentCenter, | ||
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | ammAccountID, | ||
| ripple::Issue const & | issue1, | ||
| ripple::Issue const & | issue2, | ||
| bool | freezeHandling, | ||
| boost::asio::yield_context | yield ) |
getAmmPoolHolds returns the balances of the amm asset pair
| backend | The backend to use |
| amendmentCenter | The amendmentCenter to use |
| sequence | The sequence number to use |
| ammAccountID | The amm account |
| issue1 | The first issue |
| issue2 | The second issue |
| freezeHandling | Whether to return zeroes for frozen accounts |
| yield | The coroutine context |
| std::optional< ripple::STAmount > rpc::getDeliveredAmount | ( | std::shared_ptr< ripple::STTx const > const & | txn, |
| std::shared_ptr< ripple::TxMeta const > const & | meta, | ||
| std::uint32_t | ledgerSequence, | ||
| uint32_t | date ) |
Get the delivered amount.
| txn | The transaction |
| meta | The metadata |
| ledgerSequence | The sequence |
| date | The date of the ledger |
| ClioErrorInfo const & rpc::getErrorInfo | ( | ClioError | code | ) |
Get the error info object from an clio-specific error code.
| code | The error code |
| std::expected< ripple::LedgerHeader, Status > rpc::getLedgerHeaderFromHashOrSeq | ( | BackendInterface const & | backend, |
| boost::asio::yield_context | yield, | ||
| std::optional< std::string > | ledgerHash, | ||
| std::optional< uint32_t > | ledgerIndex, | ||
| uint32_t | maxSeq ) |
Get ledger info from hash or sequence.
| backend | The backend to use |
| yield | The coroutine context |
| ledgerHash | The optional ledger hash |
| ledgerIndex | The optional ledger index |
| maxSeq | The maximum sequence to search |
|
static |
Get the delivered amount.
| meta | The metadata |
| std::expected< ripple::uint256, Status > rpc::getNFTID | ( | boost::json::object const & | request | ) |
Get the NFTID from the request.
| request | The request |
| std::uint64_t rpc::getStartHint | ( | ripple::SLE const & | sle, |
| ripple::AccountID const & | accountID ) |
Get the start hint for the account.
| sle | The ledger entry |
| accountID | The account ID |
| WarningInfo const & rpc::getWarningInfo | ( | WarningCode | code | ) |
Get the warning info object from a warning code.
| code | The warning code |
| bool rpc::insertDeliveredAmount | ( | boost::json::object & | metaJson, |
| std::shared_ptr< ripple::STTx const > const & | txn, | ||
| std::shared_ptr< ripple::TxMeta const > const & | meta, | ||
| uint32_t | date ) |
Add "DeliveredAmount" to the transaction json object.
| metaJson | The metadata json object to add "DeliveredAmount" |
| txn | The transaction object |
| meta | The metadata object |
| date | The date of the ledger |
| void rpc::insertDeliverMaxAlias | ( | boost::json::object & | txJson, |
| std::uint32_t | apiVersion ) |
Add "DeliverMax" which is the alias of "Amount" for "Payment" transaction to transaction json. Remove the "Amount" field when version is greater than 1.
| txJson | The transaction json object |
| apiVersion | The api version |
| bool rpc::insertMPTIssuanceID | ( | boost::json::object & | txnJson, |
| std::shared_ptr< ripple::STTx const > const & | txn, | ||
| boost::json::object & | metaJson, | ||
| std::shared_ptr< ripple::TxMeta const > const & | meta ) |
Add "mpt_issuance_id" into various MPTToken transaction json.
| txnJson | The transaction Json object |
| txn | The txn object |
| metaJson | The metadata Json object |
| meta | The metadata object |
| bool rpc::isAdminCmd | ( | std::string const & | method, |
| boost::json::object const & | request ) |
Check whether a request requires administrative privileges on rippled side.
| method | The method name to check |
| request | The request to check |
| bool rpc::isDeepFrozen | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | account, | ||
| ripple::Currency const & | currency, | ||
| ripple::AccountID const & | issuer, | ||
| boost::asio::yield_context | yield ) |
Whether the trustline is deep frozen.
For deep freeze, (unlike regular freeze) we do not care which account has the high/low deep freeze flag. We only care about if the trustline is deep frozen or not.
| backend | The backend to use |
| sequence | The sequence |
| account | The account |
| currency | The currency |
| issuer | The issuer |
| yield | The coroutine context |
| bool rpc::isFrozen | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | account, | ||
| ripple::Currency const & | currency, | ||
| ripple::AccountID const & | issuer, | ||
| boost::asio::yield_context | yield ) |
Whether the account is frozen.
| backend | The backend to use |
| sequence | The sequence |
| account | The account |
| currency | The currency |
| issuer | The issuer |
| yield | The coroutine context |
| bool rpc::isGlobalFrozen | ( | BackendInterface const & | backend, |
| std::uint32_t | seq, | ||
| ripple::AccountID const & | issuer, | ||
| boost::asio::yield_context | yield ) |
Whether global frozen is set.
| backend | The backend to use |
| seq | The ledger sequence |
| issuer | The issuer |
| yield | The coroutine context |
| bool rpc::isLPTokenFrozen | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | account, | ||
| ripple::Issue const & | asset, | ||
| ripple::Issue const & | asset2, | ||
| boost::asio::yield_context | yield ) |
Whether the account that owns a LPToken is frozen for the assets in the pool.
| backend | The backend to use |
| sequence | The sequence |
| account | The account |
| asset | The first asset in the pool |
| asset2 | The second asset in the pool |
| yield | The coroutine context |
| bool rpc::isOwnedByAccount | ( | ripple::SLE const & | sle, |
| ripple::AccountID const & | accountID ) |
Check whether the SLE is owned by the account.
| sle | The ledger entry |
| accountID | The account ID |
| std::expected< ripple::LedgerHeader, Status > rpc::ledgerHeaderFromRequest | ( | std::shared_ptr< data::BackendInterface const > const & | backend, |
| web::Context const & | ctx ) |
Get ledger info from the request.
| backend | The backend to use |
| ctx | The context of the request |
| std::vector< unsigned char > rpc::ledgerHeaderToBlob | ( | ripple::LedgerHeader const & | info, |
| bool | includeHash = false ) |
Convert a ledger header to a blob.
| info | The ledger header |
| includeHash | Whether to include the hash |
| void rpc::logDuration | ( | boost::json::object const & | request, |
| util::BaseTagDecorator const & | tag, | ||
| DurationType const & | dur ) |
Log the duration of the request processing.
| T | The type of the duration |
| request | The request to log |
| tag | The tag of the context of the request |
| dur | The duration to log |
| boost::json::object rpc::makeError | ( | ClioError | err, |
| std::optional< std::string_view > | customError = std::nullopt, | ||
| std::optional< std::string_view > | customMessage = std::nullopt ) |
Generate JSON from a rpc::ClioError.
| err | The clio's custom error |
| customError | A custom error |
| customMessage | A custom message |
| boost::json::object rpc::makeError | ( | RippledError | err, |
| std::optional< std::string_view > | customError = std::nullopt, | ||
| std::optional< std::string_view > | customMessage = std::nullopt ) |
Generate JSON from a rpc::RippledError.
| err | The rippled error |
| customError | A custom error |
| customMessage | A custom message |
| boost::json::object rpc::makeError | ( | Status const & | status | ) |
| std::expected< web::Context, Status > rpc::makeHttpContext | ( | boost::asio::yield_context | yc, |
| boost::json::object const & | request, | ||
| util::TagDecoratorFactory const & | tagFactory, | ||
| data::LedgerRange const & | range, | ||
| std::string const & | clientIp, | ||
| std::reference_wrapper< APIVersionParser const > | apiVersionParser, | ||
| bool | isAdmin ) |
A factory function that creates a HTTP context.
| yc | The coroutine context |
| request | The request as JSON object |
| tagFactory | A factory that provides tags to track requests |
| range | The ledger range that is available at request time |
| clientIp | The IP address of the connected client |
| apiVersionParser | A parser that is used to parse out the "api_version" field |
| isAdmin | Whether the connection has admin privileges |
| boost::json::object rpc::makeWarning | ( | WarningCode | code | ) |
| std::expected< web::Context, Status > rpc::makeWsContext | ( | boost::asio::yield_context | yc, |
| boost::json::object const & | request, | ||
| web::SubscriptionContextPtr | session, | ||
| util::TagDecoratorFactory const & | tagFactory, | ||
| data::LedgerRange const & | range, | ||
| std::string const & | clientIp, | ||
| std::reference_wrapper< APIVersionParser const > | apiVersionParser, | ||
| bool | isAdmin ) |
A factory function that creates a Websocket context.
| yc | The coroutine context |
| request | The request as JSON object |
| session | The subscription context |
| tagFactory | A factory that provides tags to track requests |
| range | The ledger range that is available at request time |
| clientIp | The IP address of the connected client |
| apiVersionParser | A parser that is used to parse out the "api_version" field |
| isAdmin | Whether the request has admin privileges |
| std::ostream & rpc::operator<< | ( | std::ostream & | stream, |
| Status const & | status ) |
| stream | The output stream |
| status | The Status |
|
inline |
Check if two MaybeError objects are equal.
| lhs | The first MaybeError object |
| rhs | The second MaybeError object |
| std::optional< AccountCursor > rpc::parseAccountCursor | ( | std::optional< std::string > | jsonCursor | ) |
Parse the account cursor from the JSON.
| jsonCursor | The JSON cursor |
| std::expected< ripple::Book, Status > rpc::parseBook | ( | boost::json::object const & | request | ) |
Parse the book from the request.
| request | The request |
| std::expected< ripple::Book, Status > rpc::parseBook | ( | ripple::Currency | pays, |
| ripple::AccountID | payIssuer, | ||
| ripple::Currency | gets, | ||
| ripple::AccountID | getIssuer, | ||
| std::optional< std::string > const & | domain ) |
Parse the book from the request.
| pays | The currency to pay |
| payIssuer | The issuer of the currency to pay |
| gets | The currency to get |
| getIssuer | The issuer of the currency to get |
| domain | The domain |
| ripple::Issue rpc::parseIssue | ( | boost::json::object const & | issue | ) |
Parse the json object into a ripple::Issue object.
| issue | The json object to parse. The accepted format is { "currency" : "USD", "issuer" : "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59" } or {"currency" : "XRP"} |
| raise | Json::error exception if the json object is not in the accepted format. |
| std::optional< ripple::Seed > rpc::parseRippleLibSeed | ( | boost::json::value const & | value | ) |
Parse a ripple-lib seed.
| value | JSON value to parse from |
| std::optional< std::uint32_t > rpc::parseStringAsUInt | ( | std::string const & | value | ) |
Parse the string as a uint32_t.
| value | The string to parse |
| std::expected< ripple::AccountID, Status > rpc::parseTaker | ( | boost::json::value const & | taker | ) |
Parse the taker from the request.
| taker | The taker as json |
| boost::json::array rpc::postProcessOrderBook | ( | std::vector< data::LedgerObject > const & | offers, |
| ripple::Book const & | book, | ||
| ripple::AccountID const & | takerID, | ||
| data::BackendInterface const & | backend, | ||
| data::AmendmentCenterInterface const & | amendmentCenter, | ||
| std::uint32_t | ledgerSequence, | ||
| boost::asio::yield_context | yield ) |
Post process an order book.
| offers | The offers |
| book | The book |
| takerID | The taker ID |
| backend | The backend to use |
| amendmentCenter | The amendmentCenter to use |
| ledgerSequence | The ledger sequence |
| yield | The coroutine context |
| std::shared_ptr< ripple::SLE const > rpc::read | ( | std::shared_ptr< data::BackendInterface const > const & | backend, |
| ripple::Keylet const & | keylet, | ||
| ripple::LedgerHeader const & | lgrInfo, | ||
| web::Context const & | context ) |
Read SLE from the backend.
| backend | The backend to use |
| keylet | The keylet to read |
| lgrInfo | The ledger header |
| context | The context of the request |
| bool rpc::specifiesCurrentOrClosedLedger | ( | boost::json::object const & | request | ) |
Check whether the request specifies the current or closed ledger.
| request | The request to check |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountChannelsHandler::ChannelResponse const & | channel ) |
| [out] | jv | The JSON object to convert to |
| channel | The channel response to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountChannelsHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountCurrenciesHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountInfoHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountLinesHandler::LineResponse const & | line ) |
| [out] | jv | The JSON object to convert to |
| line | The line response to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountLinesHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountNFTsHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountObjectsHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountOffersHandler::Offer const & | offer ) |
| [out] | jv | The JSON object to convert to |
| offer | The offer to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountOffersHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountTxHandler::Marker const & | marker ) |
| [out] | jv | The JSON object to convert to |
| marker | The marker to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AccountTxHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| AMMInfoHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
|
inline |
Implementation of value_from for BookChange type.
| [out] | jv | The JSON value to populate |
| change | The BookChange to serialize |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| BookChangesHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| BookOffersHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| DepositAuthorizedHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| FeatureHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| FeatureHandler::Output::Feature const & | feature ) |
| [out] | jv | The JSON object to convert to |
| feature | The feature to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| GatewayBalancesHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| GetAggregatePriceHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| LedgerDataHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| LedgerEntryHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| LedgerHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| LedgerIndexHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| LedgerRangeHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| MPTHoldersHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NFTHistoryHandler::Marker const & | marker ) |
| [out] | jv | The JSON object to convert to |
| marker | The marker to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NFTHistoryHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NFTInfoHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NFTOffersHandlerBase::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NFTsByIssuerHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| NoRippleCheckHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| RandomHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| SubscribeHandler::Output const & | output ) |
| jv | The json value to convert to |
| output | The output to convert from |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| TransactionEntryHandler::Output const & | output ) |
| [out] | jv | The JSON object to convert to |
| output | The output to convert |
| void rpc::tag_invoke | ( | boost::json::value_from_tag | , |
| boost::json::value & | jv, | ||
| VaultInfoHandler::Output const & | output ) |
| jv | The JSON object to convert to |
| output | The output to convert |
|
inline |
Convert an empty output to a JSON object.
| [out] | jv | The JSON object to convert to |
| AccountChannelsHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountChannelsHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountCurrenciesHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountCurrenciesHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountInfoHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountInfoHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountLinesHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountLinesHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountNFTsHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountNFTsHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountObjectsHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountObjectsHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountOffersHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountOffersHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AccountTxHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AccountTxHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| AMMInfoHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< AMMInfoHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| BookChangesHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< BookChangesHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| BookOffersHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< BookOffersHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| DepositAuthorizedHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< DepositAuthorizedHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| FeatureHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< FeatureHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| GatewayBalancesHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< GatewayBalancesHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| GetAggregatePriceHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< GetAggregatePriceHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| LedgerDataHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< LedgerDataHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| LedgerEntryHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< LedgerEntryHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| LedgerHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< LedgerHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| LedgerIndexHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< LedgerIndexHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| MPTHoldersHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< MPTHoldersHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| NFTHistoryHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< NFTHistoryHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| NFTInfoHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< NFTInfoHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| NFTOffersHandlerBase::Input rpc::tag_invoke | ( | boost::json::value_to_tag< NFTOffersHandlerBase::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| NFTsByIssuerHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< NFTsByIssuerHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| NoRippleCheckHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< NoRippleCheckHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| SubscribeHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< SubscribeHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The json value to convert from |
| TransactionEntryHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< TransactionEntryHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| UnsubscribeHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< UnsubscribeHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| VaultInfoHandler::Input rpc::tag_invoke | ( | boost::json::value_to_tag< VaultInfoHandler::Input > | , |
| boost::json::value const & | jv ) |
| jv | The JSON object to convert |
| boost::json::value rpc::toBoostJson | ( | RippledJson const & | value | ) |
Convert a RippledJson to boost::json::value.
| value | The RippledJson to convert |
| std::pair< boost::json::object, boost::json::object > rpc::toExpandedJson | ( | data::TransactionAndMetadata const & | blobs, |
| std::uint32_t | apiVersion, | ||
| NFTokenjson | nftEnabled = NFTokenjson::DISABLE, | ||
| std::optional< uint16_t > | networkId = std::nullopt ) |
Convert a TransactionAndMetadata to two JSON objects.
| blobs | The TransactionAndMetadata to convert |
| apiVersion | The api version to generate the JSON for |
| nftEnabled | Whether to include NFT information in the JSON |
| networkId | The network ID to use for ctid, not include ctid if nullopt |
| boost::json::object rpc::toJson | ( | ripple::LedgerHeader const & | info, |
| bool | binary, | ||
| std::uint32_t | apiVersion ) |
Convert a LedgerHeader to JSON object.
| info | The LedgerHeader to convert. |
| binary | Whether to convert in hex format. |
| apiVersion | The api version |
| boost::json::object rpc::toJson | ( | ripple::SLE const & | sle | ) |
Convert SLE to JSON.
| sle | The ledger entry to convert |
| boost::json::object rpc::toJson | ( | ripple::STBase const & | obj | ) |
Convert STBase object to JSON.
| obj | The object to convert |
| boost::json::object rpc::toJson | ( | ripple::TxMeta const & | meta | ) |
Convert a TxMeta to JSON object.
| meta | The TxMeta to convert. |
| boost::json::object rpc::toJsonWithBinaryTx | ( | data::TransactionAndMetadata const & | txnPlusMeta, |
| std::uint32_t | apiVersion ) |
Convert a TransactionAndMetadata to JSON object containing tx and metadata data in hex format. According to the apiVersion, the key is "tx_blob" and "meta" or "meta_blob".
| txnPlusMeta | The TransactionAndMetadata to convert. |
| apiVersion | The api version |
| ripple::Rate rpc::transferRate | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | issuer, | ||
| boost::asio::yield_context | yield ) |
Get the transfer rate.
| backend | The backend to use |
| sequence | The sequence |
| issuer | The issuer |
| yield | The coroutine context |
| std::expected< AccountCursor, Status > rpc::traverseNFTObjects | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | accountID, | ||
| ripple::uint256 | nextPage, | ||
| std::uint32_t | limit, | ||
| boost::asio::yield_context | yield, | ||
| std::function< void(ripple::SLE)> | atOwnedNode ) |
Traverse NFT objects and call the callback for each owned node.
| backend | The backend to use |
| sequence | The sequence |
| accountID | The account ID |
| nextPage | The next page |
| limit | The limit |
| yield | The coroutine context |
| atOwnedNode | The function to call for each owned node |
| std::expected< AccountCursor, Status > rpc::traverseOwnedNodes | ( | BackendInterface const & | backend, |
| ripple::AccountID const & | accountID, | ||
| std::uint32_t | sequence, | ||
| std::uint32_t | limit, | ||
| std::optional< std::string > | jsonCursor, | ||
| boost::asio::yield_context | yield, | ||
| std::function< void(ripple::SLE)> | atOwnedNode, | ||
| bool | nftIncluded = false ) |
Traverse nodes owned by an account.
| backend | The backend to use |
| accountID | The account ID |
| sequence | The sequence |
| limit | The limit of nodes to traverse |
| jsonCursor | The optional JSON cursor |
| yield | The coroutine context |
| atOwnedNode | The function to call for each owned node |
| nftIncluded | Whether to include NFTs |
| std::expected< AccountCursor, Status > rpc::traverseOwnedNodes | ( | BackendInterface const & | backend, |
| ripple::Keylet const & | owner, | ||
| ripple::uint256 const & | hexMarker, | ||
| std::uint32_t | startHint, | ||
| std::uint32_t | sequence, | ||
| std::uint32_t | limit, | ||
| boost::asio::yield_context | yield, | ||
| std::function< void(ripple::SLE)> | atOwnedNode ) |
Traverse nodes owned by an account.
| backend | The backend to use |
| owner | The keylet of the owner |
| hexMarker | The marker |
| startHint | The start hint |
| sequence | The sequence |
| limit | The limit of nodes to traverse |
| yield | The coroutine context |
| atOwnedNode | The function to call for each owned node |
| ripple::XRPAmount rpc::xrpLiquid | ( | BackendInterface const & | backend, |
| std::uint32_t | sequence, | ||
| ripple::AccountID const & | id, | ||
| boost::asio::yield_context | yield ) |
Get the XRP liquidity.
| backend | The backend to use |
| sequence | The sequence |
| id | The account ID |
| yield | The coroutine context |