Skip to content

Commit

Permalink
Expose signer's field public_key directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
koxu1996 committed Feb 13, 2024
1 parent b1a78b4 commit 8b78660
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions kairos-cli/bin/crypto/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use casper_types::{crypto, PublicKey};

pub struct CasperSigner {
secret_key: CasperPrivateKey,
public_key: CasperPublicKey,
pub public_key: CasperPublicKey,
}

#[allow(unused)]
Expand All @@ -25,10 +25,6 @@ impl CasperSigner {
})
}

pub fn get_public_key(&self) -> CasperPublicKey {
self.public_key.clone()
}

pub fn sign_message(&self, message: &[u8]) -> Result<Vec<u8>, CryptoError> {
let signature = crypto::sign(message, &self.secret_key.0, &self.public_key.0);
let bytes = signature
Expand Down

0 comments on commit 8b78660

Please sign in to comment.