getHistories method
returns histories in the same order as scripthashes passed in
Implementation
Future<List<List<ScripthashHistory>>> getHistories(
Iterable<String> scripthashes,
) async {
var futures = <Future<List<ScripthashHistory>>>[];
if (scripthashes.isNotEmpty) {
peer.withBatch(() {
for (var scripthash in scripthashes) {
futures.add(getHistory(scripthash));
}
});
}
List<List<ScripthashHistory>> results =
await Future.wait<List<ScripthashHistory>>(futures);
return results;
}