Struct ethers_core::types::Signature [−][src]
Expand description
An ECDSA signature
Fields
r: U256
R value
s: U256
S Value
v: u64
V value in ‘Electrum’ notation.
Implementations
pub fn verify<M, A>(&self, message: M, address: A) -> Result<(), SignatureError> where
M: Into<RecoveryMessage>,
A: Into<Address>,
pub fn verify<M, A>(&self, message: M, address: A) -> Result<(), SignatureError> where
M: Into<RecoveryMessage>,
A: Into<Address>,
Verifies that signature on message
was produced by address
pub fn recover<M>(&self, message: M) -> Result<Address, SignatureError> where
M: Into<RecoveryMessage>,
pub fn recover<M>(&self, message: M) -> Result<Address, SignatureError> where
M: Into<RecoveryMessage>,
Recovers the Ethereum address which was used to sign the given message.
Recovery signature data uses ‘Electrum’ notation, this means the v
value is expected to be either 27
or 28
.
Trait Implementations
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
Parses a raw signature which is expected to be 65 bytes long where
the first 32 bytes is the r
value, the second 32 bytes the s
value
and the final byte is the v
value in ‘Electrum’ notation.
type Error = SignatureError
type Error = SignatureError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl UnwindSafe for Signature
Blanket Implementations
Mutably borrows from an owned value. Read more