pub trait SignerRecoverable {
// Required methods
fn recover_signer(&self) -> Result<Address, SignatureError>;
fn recover_signer_unchecked(&self) -> Result<Address, SignatureError>;
}
Expand description
A type that can recover the signer of a transaction.
This is a helper trait that only provides the ability to recover the signer (address) of a transaction.
Required Methods§
sourcefn recover_signer(&self) -> Result<Address, SignatureError>
fn recover_signer(&self) -> Result<Address, SignatureError>
Recover signer from signature and hash.
Returns an error if the transaction’s signature is invalid following EIP-2.
Note:
This can fail for some early ethereum mainnet transactions pre EIP-2, use
Self::recover_signer_unchecked
if you want to recover the signer without ensuring that
the signature has a low s
value.
sourcefn recover_signer_unchecked(&self) -> Result<Address, SignatureError>
fn recover_signer_unchecked(&self) -> Result<Address, SignatureError>
Recover signer from signature and hash without ensuring that the signature has a low s
value.
Returns an error if the transaction’s signature is invalid.