getCheckpoints method

Future<Paged<List<Checkpoint>>> getCheckpoints({
  1. String? cursor,
  2. int? limit,
  3. bool descendingOrder = false,
})

Implementation

Future<Paged<List<Checkpoint>>> getCheckpoints({
  String? cursor,
  int? limit,
  bool descendingOrder = false
}) async {
  final result = await client.request('sui_getCheckpoints', [cursor, limit, descendingOrder]);
  final checkPoints = Paged<List<Checkpoint>>.fromJson(result, (json) {
    return (json as List).map((e) => Checkpoint.fromJson(e)).toList();
  });
  return checkPoints;
}