Skip to main content

AuthorizationTr

Trait AuthorizationTr 

Source
pub trait AuthorizationTr {
    // Required methods
    fn authority(&self) -> Option<Address>;
    fn chain_id(&self) -> U256;
    fn nonce(&self) -> u64;
    fn address(&self) -> Address;
}
Expand description

Authorization trait.

Required Methods§

Source

fn authority(&self) -> Option<Address>

Authority address.

§Note

Authority signature can be invalid, so this method returns None if the authority could not be recovered.

Valid signature Parity should be 0 or 1 and signature s-value should be less than SECP256K1N_HALF.

Source

fn chain_id(&self) -> U256

Returns the chain id from the authorization.

Source

fn nonce(&self) -> u64

Returns the nonce.

§Note

If nonce is not same as the nonce of the signer account, the authorization is skipped.

Source

fn address(&self) -> Address

Returns the address that this account is delegated to.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + AuthorizationTr + ?Sized> AuthorizationTr for &'a T

Source§

fn authority(&self) -> Option<Address>

Source§

fn chain_id(&self) -> U256

Source§

fn nonce(&self) -> u64

Source§

fn address(&self) -> Address

Source§

impl<L: AuthorizationTr, R: AuthorizationTr> AuthorizationTr for Either<L, R>

Source§

fn authority(&self) -> Option<Address>

Source§

fn chain_id(&self) -> U256

Source§

fn nonce(&self) -> u64

Source§

fn address(&self) -> Address

Source§

impl<T: AuthorizationTr + ?Sized> AuthorizationTr for Arc<T>

Source§

fn authority(&self) -> Option<Address>

Source§

fn chain_id(&self) -> U256

Source§

fn nonce(&self) -> u64

Source§

fn address(&self) -> Address

Source§

impl<T: AuthorizationTr + ?Sized> AuthorizationTr for Box<T>

Source§

fn authority(&self) -> Option<Address>

Source§

fn chain_id(&self) -> U256

Source§

fn nonce(&self) -> u64

Source§

fn address(&self) -> Address

Source§

impl<T: AuthorizationTr + ?Sized> AuthorizationTr for Rc<T>

Source§

fn authority(&self) -> Option<Address>

Source§

fn chain_id(&self) -> U256

Source§

fn nonce(&self) -> u64

Source§

fn address(&self) -> Address

Implementors§