getAccountChannels method
This request returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. (A channel's "source" and "owner" are the same.) All information retrieved is relative to a particular version of the ledger. `See account_channels
Implementation
Future<Map<String, dynamic>> getAccountChannels(
String address, {
String? destinationAmount,
int limit = 200,
String? ledgerHash,
XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
}) async {
final Map<String, dynamic> configParams = {};
_createRpcConfig(configParams, "account", address);
_createRpcConfig(configParams, "destination_account", destinationAmount);
_createRpcConfig(configParams, "limit", limit);
_createRpcConfig(configParams, "ledger_index", ledgerIndex?.value);
_createRpcConfig(configParams, "ledger_hash", ledgerHash);
final response = await makeCustomCall<Map<String, dynamic>>(
"account_channels", [configParams]);
return response;
}