generateMnemonic method

Future<AddressIconDataWithMnemonic> generateMnemonic({
  1. int? index,
  2. String? mnemonic,
})

Generate a set of new mnemonic.

Implementation

Future<AddressIconDataWithMnemonic> generateMnemonic(
    {int? index, String? mnemonic}) async {
  final dynamic acc = await serviceRoot.webView!
      .evalJavascript('eth.keyring.gen("$mnemonic",$index)');
  return AddressIconDataWithMnemonic.fromJson(acc);
}