addressFromMnemonic method

Future<AddressIconData> addressFromMnemonic(
  1. String mnemonic, {
  2. String derivePath = '',
})

get address and avatar from mnemonic.

Implementation

Future<AddressIconData> addressFromMnemonic(String mnemonic,
    {String derivePath = ''}) async {
  final wallet = ethers.Wallet.fromMnemonic(mnemonic);
  return AddressIconData.fromJson({'address': wallet.address, 'svg': 'xxx'});
}