getTransactionBlockBatch method
Future<List<SuiTransactionBlockResponse> >
getTransactionBlockBatch(
- List<
TransactionDigest> digests, [ - SuiTransactionBlockResponseOptions? options
Implementation
Future<List<SuiTransactionBlockResponse>> getTransactionBlockBatch(
List<TransactionDigest> digests,
[SuiTransactionBlockResponseOptions? options]
) async {
final requests = digests.map((d) => ({
'method': 'sui_getTransactionBlock',
'args': [d, options?.toJson()],
}));
final result = await client.batchRequest(requests) as List;
if (result.isEmpty) return <SuiTransactionBlockResponse>[];
final resp = result.map((e) => SuiTransactionBlockResponse.fromJson(e));
return resp.toList();
}