Wrap BLS keypair, pubkey and privkey in newtypes

This commit is contained in:
Paul Hauner
2018-12-29 14:31:16 +11:00
parent 39f2171053
commit 4757b35ed2
9 changed files with 125 additions and 34 deletions

View File

@@ -11,7 +11,7 @@ pub struct PublicKey(RawPublicKey);
impl PublicKey {
pub fn from_secret_key(secret_key: &SecretKey) -> Self {
PublicKey(RawPublicKey::from_secret_key(secret_key))
PublicKey(RawPublicKey::from_secret_key(secret_key.as_raw()))
}
/// Returns the underlying signature.