newFromPrivateKey static method

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

Implementation

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

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