Controller

Type Alias Controller 

Source
pub type Controller = Entity;
Expand description

The main controller of the account

Aliased Type§

pub struct Controller {
    pub auth: Authenticator,
    pub data: Binary,
    pub nonce: u64,
}

Fields§

§auth: Authenticator§data: Binary

For CosmosEOA: this is the base64 encoding of the bytes of the addr i.e. toBase(toUtf8(addr))

§nonce: u64

Implementations§

Source§

impl Controller

Source

pub fn increment_nonce(&mut self)

Increase nonce by 1

Source

pub fn ensure_nonces_are_equal(&self, nonce: &Nonce) -> Result<(), RelayTxError>

Ensure nonces are equal

Source

pub fn auth_type(&self) -> &AuthenticatorType

Returns the AuthenicatorType

Source

pub fn authenticator(&self) -> &Authenticator

Returns the Authenicator

Source

pub fn to_type_data_slice(&self) -> Vec<u8>

Serialise into a unique slice to be stored as previous_controller