getGasObjectsOwnedByAddress method

Future<List<SuiObject>> getGasObjectsOwnedByAddress(
  1. String address
)

Implementation

Future<List<SuiObject>> getGasObjectsOwnedByAddress(String address) async {
  final objects = await getOwnedObjects(address, options: SuiObjectDataOptions(showType: true));
  final result = objects
    .data
    .where((x) => Coin.isSUI(x))
    .map((y) => y.data!);
  return result.toList();
}