pub fn wif_from_private_key(private_key: &Secp256r1PrivateKey) -> String
Expand description
Converts a Secp256r1PrivateKey
into a WIF (Wallet Import Format) string.
This function takes a Secp256r1PrivateKey
, converts it to its raw byte representation,
adds the appropriate prefix and suffix, calculates the checksum, and then encodes it into WIF format.
§Arguments
private_key
- A reference to theSecp256r1PrivateKey
to be converted.
§Returns
A String
containing the WIF representation of the provided private key.