personalSign static method
Personal sign
message
requires hexadecimal string
Implementation
static Future<String> personalSign(String message) async {
final result = await _channel.invokeMethod('evmPersonalSign', message);
if (jsonDecode(result)["status"] == true ||
jsonDecode(result)["status"] == 1) {
final signature = jsonDecode(result)["data"] as String;
return signature;
} else {
final error = RpcError.fromJson(jsonDecode(result)["data"]);
return Future.error(error);
}
}