getBlockTxids method

Future<List<String>> getBlockTxids(
  1. String hash
)

Returns a list of all txids in the block.

Implementation

Future<List<String>> getBlockTxids(String hash) async {
  var response = await http.get(Uri.parse("$url/api/block/$hash/txids"));
  List<dynamic> json = jsonDecode(response.body);
  List<String> result = json.map((i) => i as String).toList();
  return result;
}