mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-21 04:05:51 +00:00
Adds account_channels RPC
This commit is contained in:
@@ -43,7 +43,9 @@ enum RPCCommand {
|
||||
ledger_data,
|
||||
book_offers,
|
||||
ledger_range,
|
||||
ledger_entry
|
||||
ledger_entry,
|
||||
account_channels,
|
||||
account_lines
|
||||
};
|
||||
std::unordered_map<std::string, RPCCommand> commandMap{
|
||||
{"tx", tx},
|
||||
@@ -53,7 +55,9 @@ std::unordered_map<std::string, RPCCommand> commandMap{
|
||||
{"ledger_entry", ledger_entry},
|
||||
{"account_info", account_info},
|
||||
{"ledger_data", ledger_data},
|
||||
{"book_offers", book_offers}};
|
||||
{"book_offers", book_offers},
|
||||
{"account_channels", account_channels},
|
||||
{"account_lines", account_lines}};
|
||||
|
||||
boost::json::object
|
||||
doAccountInfo(
|
||||
@@ -83,6 +87,14 @@ boost::json::object
|
||||
doLedgerRange(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
boost::json::object
|
||||
doAccountChannels(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
boost::json::object
|
||||
doAccountLines(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
|
||||
boost::json::object
|
||||
buildResponse(
|
||||
@@ -118,6 +130,12 @@ buildResponse(
|
||||
case book_offers:
|
||||
return doBookOffers(request, backend);
|
||||
break;
|
||||
case account_channels:
|
||||
return doAccountChannels(request, backend);
|
||||
break;
|
||||
case account_lines:
|
||||
return doAccountLines(request, backend);
|
||||
break;
|
||||
default:
|
||||
BOOST_LOG_TRIVIAL(error) << "Unknown command: " << command;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user