signMessage method

Future signMessage({
  1. required String message,
  2. required String address,
  3. required String pass,
})

sign message with private key of an account.

Implementation

Future<dynamic> signMessage(
    {required String message,
    required String address,
    required String pass}) async {
  final res = await serviceRoot.webView!.evalJavascript(
      'eth.keyring.signMessage("$message", "$address", "$pass")');
  return res;
}