diff --git a/bolt-sidecar/src/signer/commit_boost.rs b/bolt-sidecar/src/signer/commit_boost.rs index ab928ada0..01af5357f 100644 --- a/bolt-sidecar/src/signer/commit_boost.rs +++ b/bolt-sidecar/src/signer/commit_boost.rs @@ -111,10 +111,12 @@ impl CommitBoostSigner { } impl CommitBoostSigner { + /// Get the public key of the signer. pub fn pubkey(&self) -> BlsPublicKey { self.get_consensus_pubkey() } + /// Sign an object root with the Commit Boost domain. pub async fn sign_commit_boost_root(&self, data: [u8; 32]) -> eyre::Result { // convert the pubkey from ethereum_consensus to commit-boost format let pubkey = cb_common::signer::BlsPublicKey::from( diff --git a/bolt-sidecar/src/signer/keystore.rs b/bolt-sidecar/src/signer/keystore.rs index 6a17fed39..9652a603a 100644 --- a/bolt-sidecar/src/signer/keystore.rs +++ b/bolt-sidecar/src/signer/keystore.rs @@ -1,8 +1,8 @@ //! An ERC-2335 keystore signer. -use std::fmt::Debug; use std::{ ffi::OsString, + fmt::Debug, fs, path::{Path, PathBuf}, }; diff --git a/bolt-sidecar/src/signer/local.rs b/bolt-sidecar/src/signer/local.rs index 264232580..f9cd38f00 100644 --- a/bolt-sidecar/src/signer/local.rs +++ b/bolt-sidecar/src/signer/local.rs @@ -2,7 +2,6 @@ use std::fmt::Debug; use blst::{min_pk::Signature, BLST_ERROR}; use ethereum_consensus::{crypto::PublicKey as BlsPublicKey, deneb::compute_signing_root}; -use rand::RngCore; use crate::{crypto::bls::BLSSig, ChainConfig}; pub use blst::min_pk::SecretKey as BlsSecretKey; @@ -99,7 +98,9 @@ impl LocalSigner { } /// Generate a random BLS secret key. +#[cfg(test)] pub fn random_bls_secret() -> BlsSecretKey { + use rand::RngCore; let mut rng = rand::thread_rng(); let mut ikm = [0u8; 32]; rng.fill_bytes(&mut ikm);