generateWif method
Generates a WIF given a hexPrivateKey and target network
Wif wif = new WalletFactory().generateWif(hexPrivateKey, Network.testnet);
Implementation
Wif generateWif(HexPrivateKey hexPrivateKey, NetworkPrefix networkPrefix) {
String networkKey = networkPrefix.value! + hexPrivateKey.value!;
String hashedKey = _toSha256(_toSha256(networkKey));
String checkSum = hashedKey.substring(0, 6);
return Wif(_toBase64(networkKey + checkSum));
}