mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 19:56:00 +00:00
impliments account RPC handlers
This commit is contained in:
@@ -45,7 +45,10 @@ enum RPCCommand {
|
||||
ledger_range,
|
||||
ledger_entry,
|
||||
account_channels,
|
||||
account_lines
|
||||
account_lines,
|
||||
account_currencies,
|
||||
account_offers,
|
||||
account_objects
|
||||
};
|
||||
std::unordered_map<std::string, RPCCommand> commandMap{
|
||||
{"tx", tx},
|
||||
@@ -57,7 +60,10 @@ std::unordered_map<std::string, RPCCommand> commandMap{
|
||||
{"ledger_data", ledger_data},
|
||||
{"book_offers", book_offers},
|
||||
{"account_channels", account_channels},
|
||||
{"account_lines", account_lines}};
|
||||
{"account_lines", account_lines},
|
||||
{"account_currencies", account_currencies},
|
||||
{"account_offers", account_offers},
|
||||
{"account_objects", account_objects}};
|
||||
|
||||
boost::json::object
|
||||
doAccountInfo(
|
||||
@@ -95,6 +101,18 @@ boost::json::object
|
||||
doAccountLines(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
boost::json::object
|
||||
doAccountCurrencies(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
boost::json::object
|
||||
doAccountOffers(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
boost::json::object
|
||||
doAccountObjects(
|
||||
boost::json::object const& request,
|
||||
BackendInterface const& backend);
|
||||
|
||||
boost::json::object
|
||||
buildResponse(
|
||||
@@ -136,6 +154,15 @@ buildResponse(
|
||||
case account_lines:
|
||||
return doAccountLines(request, backend);
|
||||
break;
|
||||
case account_currencies:
|
||||
return doAccountCurrencies(request, backend);
|
||||
break;
|
||||
case account_offers:
|
||||
return doAccountOffers(request, backend);
|
||||
break;
|
||||
case account_objects:
|
||||
return doAccountObjects(request, backend);
|
||||
break;
|
||||
default:
|
||||
BOOST_LOG_TRIVIAL(error) << "Unknown command: " << command;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user