Skip to main content

miden_standards/account/access/
mod.rs

1use miden_protocol::account::{AccountComponent, AccountId};
2
3pub mod ownable2step;
4
5/// Access control configuration for account components.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum AccessControl {
8    /// Uses two-step ownership transfer with the provided initial owner.
9    Ownable2Step { owner: AccountId },
10}
11
12impl From<AccessControl> for AccountComponent {
13    fn from(access_control: AccessControl) -> Self {
14        match access_control {
15            AccessControl::Ownable2Step { owner } => Ownable2Step::new(owner).into(),
16        }
17    }
18}
19
20pub use ownable2step::{Ownable2Step, Ownable2StepError};