subscribeScripthashes method

Future<List<Stream<String?>>> subscribeScripthashes(
  1. Iterable<String> scripthashes
)

Implementation

Future<List<Stream<String?>>> subscribeScripthashes(
  Iterable<String> scripthashes,
) async {
  var futures = <Future<Stream<String?>>>[];
  if (scripthashes.isNotEmpty) {
    peer.withBatch(() {
      for (var scripthash in scripthashes) {
        futures.add(subscribeScripthash(scripthash));
      }
    });
  }
  return await Future.wait<Stream<String?>>(futures);
}