getWorkchainShards method

Future<List<({int seqno, String shard, int workchain})>> getWorkchainShards(
  1. int seqno
)
inherited

Returns the latest workchain shards as a List of records, wrapped in a Future:

Future<List<({
  int workchain,
  String shard,
  int seqno,
})>>

Implementation

Future<
    List<
        ({
          int workchain,
          String shard,
          int seqno,
        })>> getWorkchainShards(int seqno) async {
  var shards = (await _getShards(seqno)).shards;
  var res = <({int workchain, String shard, int seqno})>[];

  for (var i = 0; i < shards.length; i += 1) {
    res.add((
      workchain: shards[i].workchain,
      shard: shards[i].shard,
      seqno: shards[i].seqno,
    ));
  }

  return res;
}