addressFromMnemonic method

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

get address and avatar from mnemonic.

Implementation

Future<AddressIconData> addressFromMnemonic(
    {String? derivePath, required String mnemonic}) async {
  final acc = await service.addressFromMnemonic(
      derivePath: derivePath, mnemonic: mnemonic);
  if (acc['error'] != null) {
    throw Exception(acc['error']);
  }
  return AddressIconData.fromJson(acc);
}