junobuild_auth/strategies.rs
1use crate::state::types::state::AuthenticationHeapState;
2use ic_certification::Hash;
3
4pub trait AuthHeapStrategy {
5 fn with_auth_state<R>(&self, f: impl FnOnce(&Option<AuthenticationHeapState>) -> R) -> R;
6
7 fn with_auth_state_mut<R>(
8 &self,
9 f: impl FnOnce(&mut Option<AuthenticationHeapState>) -> R,
10 ) -> R;
11}
12
13pub trait AuthCertificateStrategy {
14 fn update_certified_data(&self);
15
16 fn get_asset_hashes_root_hash(&self) -> Hash;
17}