pub struct SignedAuthorization { /* private fields */ }Expand description
A signed EIP-7702 authorization.
Implementations§
Source§impl SignedAuthorization
impl SignedAuthorization
Sourcepub fn new_unchecked(
inner: Authorization,
y_parity: u8,
r: U256,
s: U256,
) -> Self
pub fn new_unchecked( inner: Authorization, y_parity: u8, r: U256, s: U256, ) -> Self
Creates a new signed authorization from raw signature values.
Sourcepub fn signature(&self) -> Result<Signature, SignatureError>
pub fn signature(&self) -> Result<Signature, SignatureError>
Gets the signature for the authorization. Returns SignatureError if signature could
not be constructed from vrs values.
Note that this signature might still be invalid for recovery as it might have s value
greater than secp256k1n/2.
Sourcepub const fn strip_signature(self) -> Authorization
pub const fn strip_signature(self) -> Authorization
Returns the inner Authorization.
Sourcepub const fn inner(&self) -> &Authorization
pub const fn inner(&self) -> &Authorization
Returns the inner Authorization.
Source§impl SignedAuthorization
impl SignedAuthorization
Recover the authority for the authorization.
§Note
Implementers should check that the authority has no code.
Sourcepub fn into_recovered(self) -> RecoveredAuthorization
pub fn into_recovered(self) -> RecoveredAuthorization
Recover the authority and transform the signed authorization into a
RecoveredAuthorization.
Methods from Deref<Target = Authorization>§
Sourcepub fn chain_id(&self) -> &U256
pub fn chain_id(&self) -> &U256
Get the chain_id for the authorization.
§Note
Implementers should check that this matches the current chain_id or is 0.
Sourcepub fn signature_hash(&self) -> B256
pub fn signature_hash(&self) -> B256
Computes the signature hash used to sign the authorization, or recover the authority from a signed authorization list item.
The signature hash is keccak(MAGIC || rlp([chain_id, address, nonce]))
Trait Implementations§
Source§impl Clone for SignedAuthorization
impl Clone for SignedAuthorization
Source§fn clone(&self) -> SignedAuthorization
fn clone(&self) -> SignedAuthorization
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more