Trait AccountInterface

Source
pub trait AccountInterface
where Self: Sized,
{ type W: WitnessGenerator<Fp>; type Bool: BoolInterface; type Balance: BalanceInterface; type GlobalSlot: GlobalSlotSinceGenesisInterface; type VerificationKeyHash: VerificationKeyHashInterface; type D;
Show 19 methods // Required methods fn register_verification_key(&self, data: &Self::D, w: &mut Self::W); fn get(&self) -> &Account; fn get_mut(&mut self) -> &mut Account; fn set_delegate(&mut self, new: CompressedPubKey); fn zkapp(&self) -> MyCow<'_, ZkAppAccount>; fn zkapp_mut(&mut self) -> &mut ZkAppAccount; fn verification_key_hash(&self) -> Self::VerificationKeyHash; fn set_token_id(&mut self, token_id: TokenId); fn is_timed(&self) -> Self::Bool; fn balance(&self) -> Self::Balance; fn set_balance(&mut self, balance: Self::Balance); fn check_timing( &self, txn_global_slot: &Self::GlobalSlot, w: &mut Self::W, ) -> (TimingValidation<Self::Bool>, Timing); fn make_zkapp(&mut self); fn unmake_zkapp(&mut self); fn proved_state(&self) -> Self::Bool; fn set_proved_state(&mut self, proved_state: Self::Bool); fn app_state(&self) -> [Fp; 8]; fn last_action_slot(&self) -> Self::GlobalSlot; fn set_last_action_slot(&mut self, slot: Self::GlobalSlot);
}

Required Associated Types§

Required Methods§

Source

fn register_verification_key(&self, data: &Self::D, w: &mut Self::W)

Source

fn get(&self) -> &Account

Source

fn get_mut(&mut self) -> &mut Account

Source

fn set_delegate(&mut self, new: CompressedPubKey)

Source

fn zkapp(&self) -> MyCow<'_, ZkAppAccount>

Source

fn zkapp_mut(&mut self) -> &mut ZkAppAccount

Source

fn verification_key_hash(&self) -> Self::VerificationKeyHash

Source

fn set_token_id(&mut self, token_id: TokenId)

Source

fn is_timed(&self) -> Self::Bool

Source

fn balance(&self) -> Self::Balance

Source

fn set_balance(&mut self, balance: Self::Balance)

Source

fn check_timing( &self, txn_global_slot: &Self::GlobalSlot, w: &mut Self::W, ) -> (TimingValidation<Self::Bool>, Timing)

Source

fn make_zkapp(&mut self)

Source

fn unmake_zkapp(&mut self)

Source

fn proved_state(&self) -> Self::Bool

Source

fn set_proved_state(&mut self, proved_state: Self::Bool)

Source

fn app_state(&self) -> [Fp; 8]

Source

fn last_action_slot(&self) -> Self::GlobalSlot

Source

fn set_last_action_slot(&mut self, slot: Self::GlobalSlot)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AccountInterface for Account

Source§

type W = ()

Source§

type Bool = bool

Source§

type Balance = Balance

Source§

type GlobalSlot = Slot

Source§

type D = ()

Source§

type VerificationKeyHash = Option<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

impl AccountInterface for SnarkAccount

Source§

type W = Witness<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

type D = ZkappSingleData

Source§

type Bool = CircuitVar<Boolean>

Source§

type Balance = CheckedBalance<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

type GlobalSlot = CheckedSlot<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

type VerificationKeyHash = SnarkVerificationKeyHash