Struct AccountActions
pub struct AccountActions<Context>
{ /* private fields */ }
Implementations
impl<Context> AccountActions<Context>
pub fn init(
context: Context,
is_valid_impl: fn(&mut PrivateContext, Field) -> bool,
) -> Self
impl AccountActions<&mut PrivateContext>
pub fn entrypoint(
self,
app_payload: AppPayload,
fee_payment_method: u8,
cancellable: bool,
)
pub fn verify_private_authwit(self, inner_hash: Field) -> Field
Verifies that the msg_sender is authorized to consume inner_hash by the account.
Computes the message_hash using the msg_sender, chain_id, version and inner_hash.
Then executes the is_valid_impl function to verify that the message is authorized.
Will revert if the message is not authorized.
@param inner_hash The hash of the message that the msg_sender is trying to consume.
Verifies that the
app_hashis authorized and executes theapp_payload.@param app_payload The payload that contains the calls to be executed in the app phase.
@param fee_payment_method The mechanism via which the account contract will pay for the transaction:
@param cancellable Controls whether to emit app_payload.tx_nonce as a nullifier, allowing a subsequent transaction to be sent with a higher priority fee. This can be used to cancel the first transaction sent, assuming it hasn't been mined yet.