newFromMnemonicPhraseAndPath static method

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

Imports the wallet from the provided mnemonic phrase and derivation path

Implementation

static Future<FuelWallet> newFromMnemonicPhraseAndPath({
  required String networkUrl,
  required String mnemonic,
  required String derivationPath,
}) async {
  final ISdkWallet sdkWallet;
  if (_isBeta3Url(networkUrl)) {
    throw Exception("Path derivation is not supported for beta-3");
  } else {
    final fuelsWallet = await fuels.FuelWallet.newFromMnemonicPhraseAndPath(
        networkUrl: networkUrl,
        mnemonic: mnemonic,
        derivationPath: derivationPath);
    sdkWallet = FuelsSdkWallet(fuelsWallet);
  }
  return FuelWallet(sdkWallet);
}