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

chore: mark Signature as deprecated #819

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ mod signed;
pub use signed::{BigIntConversionError, ParseSignedError, Sign, Signed};

mod signature;
pub use signature::{
normalize_v, to_eip155_v, Parity, PrimitiveSignature, Signature, SignatureError,
};
pub use signature::{normalize_v, to_eip155_v, PrimitiveSignature, SignatureError};
#[allow(deprecated)]
pub use signature::{Parity, Signature};

pub mod utils;
pub use utils::{eip191_hash_message, keccak256, Keccak256};
Expand Down
4 changes: 4 additions & 0 deletions crates/primitives/src/signature/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
mod error;
pub use error::SignatureError;

#[allow(deprecated)]
mod parity;
#[allow(deprecated)]
pub use parity::Parity;

#[allow(deprecated)]
mod sig;
#[allow(deprecated)]
pub use sig::Signature;

mod utils;
Expand Down
1 change: 1 addition & 0 deletions crates/primitives/src/signature/parity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{

/// The parity of the signature, stored as either a V value (which may include
/// a chain id), or the y-parity.
#[deprecated(since = "0.8.15", note = "see https://github.com/alloy-rs/core/pull/776")]
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
#[cfg_attr(feature = "arbitrary", derive(derive_arbitrary::Arbitrary, proptest_derive::Arbitrary))]
pub enum Parity {
Expand Down
1 change: 1 addition & 0 deletions crates/primitives/src/signature/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const SECP256K1N_ORDER: U256 =
uint!(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141_U256);

/// An Ethereum ECDSA signature.
#[deprecated(since = "0.8.15", note = "use PrimitiveSignature instead")]
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
pub struct Signature {
v: Parity,
Expand Down
Loading