pathFind method
Implementation
Future<Map<String, dynamic>> pathFind(
PathFindSubcommand subcommand,
String sourceAccount,
String destinationAccount,
XRP destinationAmount, {
List<List<PathStep>>? paths,
XRP? sendMax,
}) async {
final Map<String, dynamic> configParams = {};
createRpcConfig(configParams, "subcommand", subcommand.value);
createRpcConfig(configParams, "source_account", sourceAccount);
createRpcConfig(configParams, "destination_account", destinationAccount);
createRpcConfig(
configParams, "destination_amount", destinationAmount.toJson());
createRpcConfig(configParams, "send_max", sendMax?.toJson());
createRpcConfig(configParams, "paths",
paths?.map((e) => e.map((e) => e.toJson()).toList()).toList());
final response =
await makeCustomCall<Map<String, dynamic>>("path_find", [configParams]);
return response;
}