radix_engine_interface/blueprints/access_controller/
data.rs1use crate::blueprints::resource::AccessRule;
2use crate::internal_prelude::*;
3#[cfg(feature = "fuzzing")]
4use arbitrary::Arbitrary;
5
6#[derive(Debug, Clone, Copy, PartialOrd, PartialEq, Ord, Eq, ScryptoSbor, Hash)]
8pub enum Role {
9 Primary,
10 Recovery,
11 Confirmation,
12}
13
14#[derive(Debug, Clone, Copy, PartialOrd, PartialEq, Ord, Eq, ScryptoSbor, Hash)]
17pub enum Proposer {
18 Primary,
19 Recovery,
20}
21
22impl From<Proposer> for Role {
23 fn from(value: Proposer) -> Self {
24 match value {
25 Proposer::Primary => Role::Primary,
26 Proposer::Recovery => Role::Recovery,
27 }
28 }
29}
30
31#[cfg_attr(feature = "fuzzing", derive(Arbitrary))]
34#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
35pub struct RuleSet {
36 pub primary_role: AccessRule,
37 pub recovery_role: AccessRule,
38 pub confirmation_role: AccessRule,
39}
40
41#[derive(Debug, Clone, PartialEq, Eq, ScryptoSbor)]
42pub struct RecoveryProposal {
43 pub rule_set: RuleSet,
45
46 pub timed_recovery_delay_in_minutes: Option<u32>,
48}