generate static method

Future<List<MultiKeypair>> generate(
  1. int thread,
  2. int total, {
  3. Engine engine = Engine.ECDSA,
})

Implementation

static Future<List<MultiKeypair>> generate(int thread, int total,
    {Engine engine = Engine.ECDSA}) async {
  final data = {
    'uid': uuid(),
    't': thread,
    'n': total,
    'engine': engine.name,
  };
  final result = await compute(_multiGenerate, jsonEncode(data));
  final keys = Response.fromJson(result).handleResponse();
  return [for (final k in jsonDecode(keys)) MultiKeypair.fromMap(k)];
}