newFromMnemonicPhraseAndIndex static method
Derives the wallet from the provided mnemonic and index. Constructs the derivation path from the provided index and the conformed Fuel's template "m/44'/1179993420'/$index'/0/0" and imports the wallet using this path
Implementation
static Future<FuelWallet> newFromMnemonicPhraseAndIndex({
required String networkUrl,
required String mnemonic,
required int index,
}) async {
final ISdkWallet sdkWallet;
if (_isBeta3Url(networkUrl)) {
throw Exception("Path derivation is not supported for beta-3");
} else {
final fuelsWallet = await fuels.FuelWallet.newFromMnemonicPhraseAndIndex(
networkUrl: networkUrl, mnemonic: mnemonic, index: index);
sdkWallet = FuelsSdkWallet(fuelsWallet);
}
return FuelWallet(sdkWallet);
}