getAccountLines method

Future<Map<String, dynamic>> getAccountLines(
  1. String address, {
  2. String? peer,
  3. int? limit,
  4. String? ledgerHash,
  5. XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
})

This request returns information about an account's trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger. See account_lines

Implementation

Future<Map<String, dynamic>> getAccountLines(
  String address, {
  String? peer,
  int? limit,
  String? ledgerHash,
  XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
}) async {
  final Map<String, dynamic> configParams = {};
  _createRpcConfig(configParams, "account", address);
  _createRpcConfig(configParams, "limit", limit);
  _createRpcConfig(configParams, "peer", peer);
  _createRpcConfig(configParams, "ledger_index", ledgerIndex?.value);
  _createRpcConfig(configParams, "ledger_hash", ledgerHash);
  final response = await makeCustomCall<Map<String, dynamic>>(
      "account_lines", [configParams]);
  return response;
}