newFromMnemonicPhrase static method

Future<FuelWallet> newFromMnemonicPhrase({
  1. required String networkUrl,
  2. required String mnemonic,
})

Implementation

static Future<FuelWallet> newFromMnemonicPhrase({
  required String networkUrl,
  required String mnemonic,
}) async {
  final data = await _wallet.newFromMnemonic(
    mnemonic: mnemonic,
  );

  return FuelWallet(
    bech32Address: data['address']['bech32Address'],
    b256Address: data['address']['b256Address'],
    mnemonicPhrase: data['mnemonicPhrase'],
    privateKey: data['privateKey'],
    networkUrl: networkUrl,
  );
}