Skip to content

Commit

Permalink
chore: manual debug impl
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Oct 8, 2024
1 parent d5a3b3f commit a1b1c7e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bolt-sidecar/src/crypto/bls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@ pub trait SignerBLS: Send + Debug {
}

/// A BLS signer that can sign any type that implements the [`SignableBLS`] trait.
#[derive(Debug, Clone)]
#[derive(Clone)]
pub struct Signer {
chain: ChainConfig,
key: BlsSecretKey,
}

impl Debug for Signer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Signer")
.field("pubkey", &self.pubkey())
.field("chain", &self.chain.name())
.finish()
}
}

impl Signer {
/// Create a new signer with the given BLS secret key.
pub fn new(key: BlsSecretKey, chain: ChainConfig) -> Self {
Expand Down

0 comments on commit a1b1c7e

Please sign in to comment.