newFromPrivateKey static method

Future<FuelWallet> newFromPrivateKey({
  1. required String networkUrl,
  2. required String privateKey,
})

Imports the wallet from the provided private key. Mnemonic phrase would be absent, cause it's impossible to infer from private key

Implementation

static Future<FuelWallet> newFromPrivateKey({
  required String networkUrl,
  required String privateKey,
}) async {
  final walletUnlocked = await _wallet.newFromPrivateKey(
    networkUrl: networkUrl,
    privateKey: privateKey,
  );
  return FuelWallet(walletUnlocked);
}