[−][src]Struct web3::types::Recovery
Data for recovering the public address of signed data.
Note that the signature data is in 'Electrum' notation and may have chain
replay protection applied. That means that v is expected to be 27, 28,
or 35 + chain_id * 2 or 36 + chain_id * 2.
Fields
message: RecoveryMessageThe message to recover
v: u64V value.
r: H256R value.
s: H256S value.
Implementations
impl Recovery[src]
pub fn new<M>(message: M, v: u64, r: H256, s: H256) -> Recovery where
M: Into<RecoveryMessage>, [src]
M: Into<RecoveryMessage>,
Creates new recovery data from its parts.
pub fn from_raw_signature<M, B>(
message: M,
raw_signature: B
) -> Result<Recovery, ParseSignatureError> where
M: Into<RecoveryMessage>,
B: AsRef<[u8]>, [src]
message: M,
raw_signature: B
) -> Result<Recovery, ParseSignatureError> where
M: Into<RecoveryMessage>,
B: AsRef<[u8]>,
Creates new recovery data from a raw signature.
This 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.
pub fn recovery_id(&self) -> Option<i32>[src]
Retrieve the Recovery Id ("Standard V")
Returns None if v value is invalid
(equivalent of returning 4 in some implementaions).
pub fn as_signature(&self) -> Option<([u8; 64], i32)>[src]
Retrieves the recovery id & compact signature in it's raw form.
Trait Implementations
impl Clone for Recovery[src]
impl Debug for Recovery[src]
impl<'a> From<&'a SignedData> for Recovery[src]
fn from(signed: &'a SignedData) -> Self[src]
impl<'a> From<&'a SignedTransaction> for Recovery[src]
fn from(tx: &'a SignedTransaction) -> Self[src]
impl PartialEq<Recovery> for Recovery[src]
impl StructuralPartialEq for Recovery[src]
Auto Trait Implementations
impl RefUnwindSafe for Recovery
impl Send for Recovery
impl Sync for Recovery
impl Unpin for Recovery
impl UnwindSafe for Recovery
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,