Struct ethers_iqkms::types::Signature
source · [−]Expand description
An ECDSA signature
Fields
r: U256R value
s: U256S Value
v: u64V value
Implementations
sourceimpl Signature
impl Signature
sourcepub fn verify<M, A>(&self, message: M, address: A) -> Result<(), SignatureError>where
M: Into<RecoveryMessage>,
A: Into<H160>,
pub fn verify<M, A>(&self, message: M, address: A) -> Result<(), SignatureError>where
M: Into<RecoveryMessage>,
A: Into<H160>,
Verifies that signature on message was produced by address
sourcepub fn recover<M>(&self, message: M) -> Result<H160, SignatureError>where
M: Into<RecoveryMessage>,
pub fn recover<M>(&self, message: M) -> Result<H160, 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.
sourcepub fn recovery_id(&self) -> Result<Id, SignatureError>
pub fn recovery_id(&self) -> Result<Id, SignatureError>
Retrieve the recovery ID.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Signature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Signature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Signature
impl Serialize for Signature
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'a> TryFrom<&'a [u8]> for Signature
impl<'a> TryFrom<&'a [u8]> for Signature
sourcefn try_from(
bytes: &'a [u8]
) -> Result<Signature, <Signature as TryFrom<&'a [u8]>>::Error>
fn try_from(
bytes: &'a [u8]
) -> Result<Signature, <Signature as TryFrom<&'a [u8]>>::Error>
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.
impl Copy for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request