reth_primitives::transaction

Trait SignedTransactionIntoRecoveredExt

Source
pub trait SignedTransactionIntoRecoveredExt: SignedTransaction {
    // Provided methods
    fn try_ecrecovered(&self) -> Option<RecoveredTx<Self>> { ... }
    fn try_into_ecrecovered(self) -> Result<RecoveredTx<Self>, Self> { ... }
    fn into_ecrecovered_unchecked(self) -> Option<RecoveredTx<Self>> { ... }
    fn with_signer(self, signer: Address) -> RecoveredTx<Self> { ... }
}
Expand description

Extension trait for [SignedTransaction] to convert it into RecoveredTx.

Provided Methods§

Source

fn try_ecrecovered(&self) -> Option<RecoveredTx<Self>>

Tries to recover signer and return RecoveredTx by cloning the type.

Source

fn try_into_ecrecovered(self) -> Result<RecoveredTx<Self>, Self>

Tries to recover signer and return RecoveredTx.

Returns Err(Self) if the transaction’s signature is invalid, see also [SignedTransaction::recover_signer].

Source

fn into_ecrecovered_unchecked(self) -> Option<RecoveredTx<Self>>

Consumes the type, recover signer and return RecoveredTx without ensuring that the signature has a low s value (EIP-2).

Returns None if the transaction’s signature is invalid.

Source

fn with_signer(self, signer: Address) -> RecoveredTx<Self>

Returns the RecoveredTx transaction with the given sender.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> SignedTransactionIntoRecoveredExt for T
where T: SignedTransaction,