blocks method

Future<List<BlockInfo>> blocks(
  1. int startHeight,
  2. int endHeight
)

Get a range of blocks

Returns blocks from startHeight to endHeight inclusive

Implementation

Future<List<BlockInfo>> blocks(int startHeight, int endHeight) async {
  final data = await _proxyInterface.get('/blocks/$startHeight/$endHeight');
  final blocks = pb.Blocks.fromBuffer(data);
  return blocks.blocks.map(BlockInfo.fromProto).toList();
}