Skip to content

Commit

Permalink
chore: renamed bls12_381 -> zkcrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-londhe committed Jan 3, 2025
1 parent de48d2e commit c8a3e17
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions bls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ edition = { workspace = true }
authors = ["Grandine <[email protected]>"]

[features]
default = ["blst"]
blst = [
default = ["bls-blst"]
bls-blst = [
"dep:blst",
"dep:itertools"
]
bls12_381 = [
bls-zkcrypto = [
"dep:bls12_381",
"dep:ff",
"dep:sha2",
Expand Down
6 changes: 3 additions & 3 deletions bls/src/backends/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(feature = "blst")]
#[cfg(feature = "bls-blst")]
pub mod blst;

#[cfg(feature = "bls12_381")]
pub mod bls12_381;
#[cfg(feature = "bls-zkcrypto")]
pub mod zkcrypto;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions bls/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "blst")]
#[cfg(feature = "bls-blst")]
use blst::BLST_ERROR;

#[derive(Debug, thiserror::Error)]
Expand All @@ -13,12 +13,12 @@ pub enum Error {
NoPublicKeysToAggregate,
#[error("failed to decompress point")]
DecompressionFailed,
#[cfg(feature = "blst")]
#[cfg(feature = "bls-blst")]
#[error("blst error: {0:?}")]
Blst(BLST_ERROR),
}

#[cfg(feature = "blst")]
#[cfg(feature = "bls-blst")]
impl From<BLST_ERROR> for Error {
fn from(err: BLST_ERROR) -> Self {
Self::Blst(err)
Expand Down
6 changes: 3 additions & 3 deletions bls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ pub mod consts;
pub mod error;
pub mod traits;

#[cfg(feature = "blst")]
#[cfg(feature = "bls-blst")]
pub use crate::backends::blst::{
cached_public_key::CachedPublicKey, public_key::PublicKey, public_key_bytes::PublicKeyBytes,
secret_key::SecretKey, secret_key_bytes::SecretKeyBytes, signature::Signature,
signature_bytes::SignatureBytes,
};

#[cfg(feature = "bls12_381")]
pub use crate::backends::bls12_381::{
#[cfg(feature = "bls-zkcrypto")]
pub use crate::backends::zkcrypto::{
cached_public_key::CachedPublicKey, public_key::PublicKey, public_key_bytes::PublicKeyBytes,
secret_key::SecretKey, secret_key_bytes::SecretKeyBytes, signature::Signature,
signature_bytes::SignatureBytes,
Expand Down

0 comments on commit c8a3e17

Please sign in to comment.