newFromMnemonic method
Implementation
@override
Future<Map> newFromMnemonic({
required String mnemonic,
}) async {
final w = await WalletUnlocked.newFromMnemonicPhrase(
bridge: _bridge,
phrase: mnemonic,
);
final address = await w.address();
final bech32Address = await address.toBech32String();
final b256Address = await address.toB256String();
final data = {
'address': {
'bech32Address': bech32Address,
'b256Address': b256Address,
},
'privateKey': w.privateKey,
'mnemonicPhrase': w.mnemonicPhrase,
};
return data;
}