broadcastTransactions method
returns transaction hashs as hexadecimal strings in the same order as rawTxs passed in
Implementation
Future<List<String>> broadcastTransactions(List<String> rawTxs) async {
var futures = <Future<String>>[];
if (rawTxs.isNotEmpty) {
peer.withBatch(() {
for (var rawTx in rawTxs) {
futures.add(broadcastTransaction(rawTx));
}
});
}
List<String> results = await Future.wait<String>(futures);
return results;
}