pub trait WalletTrait {
type Error: From<StdError>;
// Required methods
fn info(&self, ctx: QueryCtx<'_>) -> Result<WalletInfo, StdError>;
fn data(
&self,
ctx: QueryCtx<'_>,
key: Binary,
) -> Result<Option<Binary>, StdError>;
fn controller_rotation(
&self,
ctx: ExecCtx<'_>,
new_controller: Controller,
) -> Result<Response, Self::Error>;
fn auth_exec(
&self,
ctx: ExecCtx<'_>,
transaction: RelayTransaction,
) -> Result<Response, Self::Error>;
fn auth_exec_without_plugins(
&self,
ctx: ExecCtx<'_>,
transaction: RelayTransaction,
) -> Result<Response, Self::Error>;
fn controller_nonce_update(
&self,
ctx: ExecCtx<'_>,
) -> Result<Response, Self::Error>;
fn update_data(
&self,
ctx: ExecCtx<'_>,
data: Vec<(Binary, Option<Binary>)>,
) -> Result<Response, Self::Error>;
}Expand description
The trait for each authenticator contract
Required Associated Types§
Required Methods§
Sourcefn data(
&self,
ctx: QueryCtx<'_>,
key: Binary,
) -> Result<Option<Binary>, StdError>
fn data( &self, ctx: QueryCtx<'_>, key: Binary, ) -> Result<Option<Binary>, StdError>
Returns the data given the key
Sourcefn controller_rotation(
&self,
ctx: ExecCtx<'_>,
new_controller: Controller,
) -> Result<Response, Self::Error>
fn controller_rotation( &self, ctx: ExecCtx<'_>, new_controller: Controller, ) -> Result<Response, Self::Error>
Permission: contract self (controller / plugins)
Sourcefn auth_exec(
&self,
ctx: ExecCtx<'_>,
transaction: RelayTransaction,
) -> Result<Response, Self::Error>
fn auth_exec( &self, ctx: ExecCtx<'_>, transaction: RelayTransaction, ) -> Result<Response, Self::Error>
Permission: Open Main exec function and checks for auth from controller
Sourcefn auth_exec_without_plugins(
&self,
ctx: ExecCtx<'_>,
transaction: RelayTransaction,
) -> Result<Response, Self::Error>
fn auth_exec_without_plugins( &self, ctx: ExecCtx<'_>, transaction: RelayTransaction, ) -> Result<Response, Self::Error>
Permission: Open This allows for exec of tx without called any plugins. Allowing for the removal of faulty plugins on the proxy wallet