Struct SetPublicAuthWitInteraction
pub struct SetPublicAuthWitInteraction<'a, W> { /* private fields */ }Expand description
Convenience interaction for setting a public authwit in the AuthRegistry.
Wraps a call to AuthRegistry.set_authorized(message_hash, authorize).
Automatically enforces that only the authorizer (from) is the sender.
Mirrors TS SetPublicAuthwitContractInteraction.
Implementations§
§impl<'a, W> SetPublicAuthWitInteraction<'a, W>where
W: Wallet,
impl<'a, W> SetPublicAuthWitInteraction<'a, W>where
W: Wallet,
pub async fn create(
wallet: &'a W,
from: AztecAddress,
message_hash_or_intent: MessageHashOrIntent,
authorized: bool,
) -> Result<SetPublicAuthWitInteraction<'a, W>, Error>
pub async fn create( wallet: &'a W, from: AztecAddress, message_hash_or_intent: MessageHashOrIntent, authorized: bool, ) -> Result<SetPublicAuthWitInteraction<'a, W>, Error>
Create a new interaction for setting a public authwit.
Computes the message hash from the intent and chain info,
then constructs a call to AuthRegistry.set_authorized(hash, authorized).
pub fn request(&self) -> ExecutionPayload
pub fn request(&self) -> ExecutionPayload
Build the execution payload.
pub async fn simulate(
&self,
opts: SimulateOptions,
) -> Result<TxSimulationResult, Error>
pub async fn simulate( &self, opts: SimulateOptions, ) -> Result<TxSimulationResult, Error>
Simulate the interaction (sender is always from).
pub async fn send(&self, opts: SendOptions) -> Result<SendResult, Error>
pub async fn send(&self, opts: SendOptions) -> Result<SendResult, Error>
Send the interaction (sender is always from).
pub async fn profile(
&self,
opts: ProfileOptions,
) -> Result<TxProfileResult, Error>
pub async fn profile( &self, opts: ProfileOptions, ) -> Result<TxProfileResult, Error>
Profile the interaction (sender is always from).
Auto Trait Implementations§
impl<'a, W> Freeze for SetPublicAuthWitInteraction<'a, W>
impl<'a, W> RefUnwindSafe for SetPublicAuthWitInteraction<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for SetPublicAuthWitInteraction<'a, W>where
W: Sync,
impl<'a, W> Sync for SetPublicAuthWitInteraction<'a, W>where
W: Sync,
impl<'a, W> Unpin for SetPublicAuthWitInteraction<'a, W>
impl<'a, W> UnwindSafe for SetPublicAuthWitInteraction<'a, W>where
W: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more