getObjectBatch method

Future<List<SuiObjectResponse>> getObjectBatch(
  1. List<String> objectIds
)

Implementation

Future<List<SuiObjectResponse>> getObjectBatch(List<String> objectIds) async {
  final requests = objectIds.map((id) => ({
    'method': 'sui_getObject',
    'args': [id],
  }));
  final dataList = await client.batchRequest(requests);

  final result = (dataList as List)
    .map((data) => SuiObjectResponse.fromJson(data))
    .toList();
  return result;
}