pub fn export_wif(
key: &PrivateKey,
network: Network,
compressed: bool,
) -> StringExpand description
Export a private key to WIF format.
ยงExample
use rustywallet_export::{export_wif, Network};
use rustywallet_keys::prelude::PrivateKey;
let key = PrivateKey::random();
// Compressed mainnet WIF (starts with K or L)
let wif = export_wif(&key, Network::Mainnet, true);
assert!(wif.starts_with('K') || wif.starts_with('L'));
// Uncompressed mainnet WIF (starts with 5)
let wif = export_wif(&key, Network::Mainnet, false);
assert!(wif.starts_with('5'));