getAccountObjects method

Future<Map<String, dynamic>> getAccountObjects(
  1. String address, {
  2. AccountObjectType? type,
  3. bool? deletionBlockersOnly,
  4. int? limit,
})

This request returns the raw ledger format for all objects owned by an account. For a higher-level view of an account's trust lines and balances, see AccountLinesRequest instead.

Implementation

Future<Map<String, dynamic>> getAccountObjects(
  String address, {
  AccountObjectType? type,
  bool? deletionBlockersOnly,
  int? limit,
}) async {
  final Map<String, dynamic> configParams = {"account": address};
  _createRpcConfig(
      configParams, "deletion_blockers_only", deletionBlockersOnly);
  _createRpcConfig(configParams, "type", type?.value);
  _createRpcConfig(configParams, "limit", limit);
  final response = await makeCustomCall<Map<String, dynamic>>(
      "account_objects", [configParams]);
  return response;
}