-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract Signature into conditional traits
- Loading branch information
Showing
4 changed files
with
92 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use crate::{Parity, U256}; | ||
|
||
#[cfg(not(feature = "rlp"))] | ||
pub trait RlpSuperSig {} | ||
|
||
#[cfg(feature = "rlp")] | ||
pub trait RlpSuperSig: alloy_rlp::Encodable + alloy_rlp::Decodable {} | ||
|
||
#[cfg(not(feature = "k256"))] | ||
pub trait K256SuperSig {} | ||
|
||
#[cfg(feature = "k256")] | ||
pub trait K256SuperSig: From<(k256::ecdsa::Signature, k256::ecdsa::RecoveryId)> {} | ||
|
||
#[cfg(not(feature = "serde"))] | ||
pub trait SerdeSuperSig {} | ||
|
||
#[cfg(feature = "serde")] | ||
pub trait SerdeSuperSig: serde::Serialize + serde::Deserialize {} | ||
|
||
#[cfg(not(feature = "arbitrary"))] | ||
pub trait ArbitrarySuperSig {} | ||
|
||
#[cfg(feature = "arbitrary")] | ||
pub trait ArbitrarySuperSig: | ||
arbitrary::Arbitrary | ||
+ proptest::arbitrary::Arbitrary<Parameters=(),Strategy=proptest::strategy::FilterMap< | ||
<(U256, U256, Parity) as proptest::arbitrary::Arbitrary>::Strategy, | ||
fn((U256, U256, Parity)) -> Option<Self>, | ||
>> {} |