queryEvents method

Future<Paged<List<SuiEvent>>> queryEvents(
  1. Map query, {
  2. String? cursor,
  3. int? limit,
  4. bool descendingOrder = false,
})

Implementation

Future<Paged<List<SuiEvent>>> queryEvents(
  Map query,
  {String? cursor,
  int? limit,
  bool descendingOrder = false}
) async {
  final result = await client.request(
    'suix_queryEvents',
    [
      query,
      cursor,
      limit,
      descendingOrder
    ]
  );

  final events = Paged<List<SuiEvent>>.fromJson(result, (json) {
    return (json as List).map((e) => SuiEvent.fromJson(e)).toList();
  });
  return events;
}