pub struct Signature(/* private fields */);Expand description
A wrapper over AlloySignature with custom serialization.
Implementations§
Source§impl Signature
impl Signature
pub fn from_signature_and_parity(sig: Signature, v: bool) -> Self
pub fn new(r: U256, s: U256, v: bool) -> Self
pub fn recover_address_from_prehash( &self, prehash: &B256, ) -> Result<Address, SignatureError>
pub fn as_primitive_signature(&self) -> &AlloySignature
pub fn as_bytes(&self) -> [u8; 65]
pub fn r(&self) -> U256
pub fn s(&self) -> U256
pub fn v(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Signature> for Signature
impl From<Signature> for Signature
Source§fn from(ps: AlloySignature) -> Self
fn from(ps: AlloySignature) -> Self
Converts to this type from the input type.
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnsafeUnpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more