Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove Signature generic #719

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ pub use alloy_primitives as primitives;
#[doc(no_inline)]
pub use primitives::{hex, uint};

#[cfg(feature = "unstable-doc")]
#[doc(hidden)]
#[allow(unused_imports)]
pub use primitives::PrivateSignature as _;

#[cfg(feature = "dyn-abi")]
#[doc(inline)]
pub use alloy_dyn_abi as dyn_abi;
Expand Down
16 changes: 1 addition & 15 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,7 @@ mod signed;
pub use signed::{BigIntConversionError, ParseSignedError, Sign, Signed};

mod signature;
pub use signature::{to_eip155_v, Parity, SignatureError};

/// Only available for documentation purposes.
// Without this visible (not `#[doc(hidden)]`) re-export, `rustdoc` will not generate documentation
// for the `Signature` type alias below.
#[cfg(feature = "unstable-doc")]
pub use signature::Signature as PrivateSignature;

/// An ECDSA Signature, consisting of V, R, and S.
#[cfg(feature = "k256")]
pub type Signature = signature::Signature<k256::ecdsa::Signature>;

/// An ECDSA Signature, consisting of V, R, and S.
#[cfg(not(feature = "k256"))]
pub type Signature = signature::Signature<()>;
pub use signature::{to_eip155_v, Parity, Signature, SignatureError};

pub mod utils;
pub use utils::{eip191_hash_message, keccak256, Keccak256};
Expand Down
3 changes: 0 additions & 3 deletions crates/primitives/src/signature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ mod parity;
pub use parity::Parity;

mod sig;
#[cfg(feature = "unstable-doc")]
pub use sig::Signature;
#[cfg(not(feature = "unstable-doc"))]
pub(crate) use sig::Signature;

mod utils;
pub use utils::to_eip155_v;
Loading