diff --git a/src/keypair.rs b/src/keypair.rs index 15f1090f..08e0103b 100644 --- a/src/keypair.rs +++ b/src/keypair.rs @@ -53,9 +53,12 @@ impl> KeyPair { } /// Obtains a KeyPair from a private key - pub fn from_private_key(sk: S) -> Result> { - let pk = sk.public_key()?; - Ok(Self { pk, sk }) + pub fn from_private_key(private_key: S) -> Result> { + let pk = private_key.public_key()?; + Ok(Self { + pk, + sk: private_key, + }) } }