localSign static method
Implementation
static Future<String> localSign(MultiSignLocalParams params,
{Engine engine = Engine.ECDSA}) async {
final keys = [for (final key in params.keys) key.toMap()];
final localKeysResult = await _toLocalKeys(jsonEncode(keys));
final response = Response.fromJson(localKeysResult).handleResponse();
final localKeys = [
for (final key in jsonDecode(response)) KeyPair.fromJson(key)
];
final signParams = SignParams(params.msgs, params.t, localKeys);
switch (engine) {
case Engine.ECDSA:
return Ecdsa.sign(signParams);
case Engine.EDDSA:
return Eddsa.sign(signParams);
default:
throw Exception('Unsupported engine');
}
}