getCoinBalancesOwnedByAddress method
Implementation
Future<List<SuiObjectResponse>> getCoinBalancesOwnedByAddress(
String address,
{String? typeArg}
) async {
final objects = await getOwnedObjects(address);
final coinIds = objects
.data
.where((x) => Coin.isCoin(x)
&& (typeArg == null || typeArg == Coin.getCoinTypeArg(x)))
.map((y) => y.data!.objectId);
final result = await getObjectBatch(coinIds.toList());
return result;
}