1use crate::blueprints::access_controller::*;
2use crate::blueprints::component::*;
3use crate::blueprints::resource::*;
4use radix_common::data::scrypto::model::NonFungibleLocalId;
5use radix_common::prelude::*;
6use radix_common::types::GlobalAddressReservation;
7use radix_rust::rust::prelude::IndexSet;
8use sbor::rust::fmt::Debug;
9
10pub const ACCESS_CONTROLLER_BLUEPRINT: &str = "AccessController";
11
12define_type_marker!(Some(ACCESS_CONTROLLER_PACKAGE), AccessController);
13
14pub const ACCESS_CONTROLLER_CREATE_IDENT: &str = "create";
19
20#[derive(Debug, Eq, PartialEq, ScryptoSbor)]
21pub struct AccessControllerCreateInput {
22 pub controlled_asset: Bucket,
23 pub rule_set: RuleSet,
24 pub timed_recovery_delay_in_minutes: Option<u32>,
25 pub address_reservation: Option<GlobalAddressReservation>,
26}
27
28#[derive(Debug, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
29pub struct AccessControllerCreateManifestInput {
30 pub controlled_asset: ManifestBucket,
31 pub rule_set: ManifestRuleSet,
32 pub timed_recovery_delay_in_minutes: Option<u32>,
33 pub address_reservation: Option<ManifestAddressReservation>,
34}
35
36pub type AccessControllerCreateOutput = Global<AccessControllerMarker>;
37
38pub const ACCESS_CONTROLLER_CREATE_PROOF_IDENT: &str = "create_proof";
43
44#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
45pub struct AccessControllerCreateProofInput {}
46
47pub type AccessControllerCreateProofManifestInput = AccessControllerCreateProofInput;
48
49pub type AccessControllerCreateProofOutput = Proof;
50
51pub const ACCESS_CONTROLLER_INITIATE_RECOVERY_AS_PRIMARY_IDENT: &str =
56 "initiate_recovery_as_primary";
57
58#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
59pub struct AccessControllerInitiateRecoveryAsPrimaryInput {
60 pub rule_set: RuleSet,
61 pub timed_recovery_delay_in_minutes: Option<u32>,
62}
63
64#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
65pub struct AccessControllerInitiateRecoveryAsPrimaryManifestInput {
66 pub rule_set: ManifestRuleSet,
67 pub timed_recovery_delay_in_minutes: Option<u32>,
68}
69
70pub type AccessControllerInitiateRecoveryAsPrimaryOutput = ();
71
72pub const ACCESS_CONTROLLER_INITIATE_RECOVERY_AS_RECOVERY_IDENT: &str =
77 "initiate_recovery_as_recovery";
78
79#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
80pub struct AccessControllerInitiateRecoveryAsRecoveryInput {
81 pub rule_set: RuleSet,
82 pub timed_recovery_delay_in_minutes: Option<u32>,
83}
84
85#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
86pub struct AccessControllerInitiateRecoveryAsRecoveryManifestInput {
87 pub rule_set: ManifestRuleSet,
88 pub timed_recovery_delay_in_minutes: Option<u32>,
89}
90
91pub type AccessControllerInitiateRecoveryAsRecoveryOutput = ();
92
93pub const ACCESS_CONTROLLER_INITIATE_BADGE_WITHDRAW_ATTEMPT_AS_PRIMARY_IDENT: &str =
98 "initiate_badge_withdraw_attempt_as_primary";
99
100#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
101pub struct AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryInput;
102
103pub type AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryManifestInput =
104 AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryInput;
105
106pub type AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryOutput = ();
107
108pub const ACCESS_CONTROLLER_INITIATE_BADGE_WITHDRAW_ATTEMPT_AS_RECOVERY_IDENT: &str =
113 "initiate_badge_withdraw_attempt_as_recovery";
114
115#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
116pub struct AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryInput;
117
118pub type AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryManifestInput =
119 AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryInput;
120
121pub type AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryOutput = ();
122
123pub const ACCESS_CONTROLLER_QUICK_CONFIRM_PRIMARY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
128 "quick_confirm_primary_role_recovery_proposal";
129
130#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
131pub struct AccessControllerQuickConfirmPrimaryRoleRecoveryProposalInput {
132 pub rule_set: RuleSet,
133 pub timed_recovery_delay_in_minutes: Option<u32>,
134}
135
136#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
137pub struct AccessControllerQuickConfirmPrimaryRoleRecoveryProposalManifestInput {
138 pub rule_set: ManifestRuleSet,
139 pub timed_recovery_delay_in_minutes: Option<u32>,
140}
141
142pub type AccessControllerQuickConfirmPrimaryRoleRecoveryProposalOutput = ();
143
144pub const ACCESS_CONTROLLER_QUICK_CONFIRM_RECOVERY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
149 "quick_confirm_recovery_role_recovery_proposal";
150
151#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
152pub struct AccessControllerQuickConfirmRecoveryRoleRecoveryProposalInput {
153 pub rule_set: RuleSet,
154 pub timed_recovery_delay_in_minutes: Option<u32>,
155}
156
157#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
158pub struct AccessControllerQuickConfirmRecoveryRoleRecoveryProposalManifestInput {
159 pub rule_set: ManifestRuleSet,
160 pub timed_recovery_delay_in_minutes: Option<u32>,
161}
162
163pub type AccessControllerQuickConfirmRecoveryRoleRecoveryProposalOutput = ();
164
165pub const ACCESS_CONTROLLER_QUICK_CONFIRM_PRIMARY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
170 "quick_confirm_primary_role_badge_withdraw_attempt";
171
172#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
173pub struct AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptInput;
174
175pub type AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptManifestInput =
176 AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptInput;
177
178pub type AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptOutput = Bucket;
179
180pub const ACCESS_CONTROLLER_QUICK_CONFIRM_RECOVERY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
185 "quick_confirm_recovery_role_badge_withdraw_attempt";
186
187#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
188pub struct AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptInput;
189
190pub type AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptManifestInput =
191 AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptInput;
192
193pub type AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptOutput = Bucket;
194
195pub const ACCESS_CONTROLLER_TIMED_CONFIRM_RECOVERY_IDENT: &str = "timed_confirm_recovery";
200
201#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
202pub struct AccessControllerTimedConfirmRecoveryInput {
203 pub rule_set: RuleSet,
204 pub timed_recovery_delay_in_minutes: Option<u32>,
205}
206
207#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
208pub struct AccessControllerTimedConfirmRecoveryManifestInput {
209 pub rule_set: ManifestRuleSet,
210 pub timed_recovery_delay_in_minutes: Option<u32>,
211}
212
213pub type AccessControllerTimedConfirmRecoveryOutput = ();
214
215pub const ACCESS_CONTROLLER_CANCEL_PRIMARY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
220 "cancel_primary_role_recovery_proposal";
221
222#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
223pub struct AccessControllerCancelPrimaryRoleRecoveryProposalInput;
224
225pub type AccessControllerCancelPrimaryRoleRecoveryProposalManifestInput =
226 AccessControllerCancelPrimaryRoleRecoveryProposalInput;
227
228pub type AccessControllerCancelPrimaryRoleRecoveryProposalOutput = ();
229
230pub const ACCESS_CONTROLLER_CANCEL_RECOVERY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
235 "cancel_recovery_role_recovery_proposal";
236
237#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
238pub struct AccessControllerCancelRecoveryRoleRecoveryProposalInput;
239
240pub type AccessControllerCancelRecoveryRoleRecoveryProposalManifestInput =
241 AccessControllerCancelRecoveryRoleRecoveryProposalInput;
242
243pub type AccessControllerCancelRecoveryRoleRecoveryProposalOutput = ();
244
245pub const ACCESS_CONTROLLER_CANCEL_PRIMARY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
250 "cancel_primary_role_badge_withdraw_attempt";
251
252#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
253pub struct AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptInput;
254
255pub type AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptManifestInput =
256 AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptInput;
257
258pub type AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptOutput = ();
259
260pub const ACCESS_CONTROLLER_CANCEL_RECOVERY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
265 "cancel_recovery_role_badge_withdraw_attempt";
266
267#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
268pub struct AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptInput;
269
270pub type AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptManifestInput =
271 AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptInput;
272
273pub type AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptOutput = ();
274
275pub const ACCESS_CONTROLLER_LOCK_PRIMARY_ROLE_IDENT: &str = "lock_primary_role";
280
281#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
282pub struct AccessControllerLockPrimaryRoleInput;
283
284pub type AccessControllerLockPrimaryRoleManifestInput = AccessControllerLockPrimaryRoleInput;
285
286pub type AccessControllerLockPrimaryRoleOutput = ();
287
288pub const ACCESS_CONTROLLER_UNLOCK_PRIMARY_ROLE_IDENT: &str = "unlock_primary_role";
293
294#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
295pub struct AccessControllerUnlockPrimaryRoleInput;
296
297pub type AccessControllerUnlockPrimaryRoleManifestInput = AccessControllerUnlockPrimaryRoleInput;
298
299pub type AccessControllerUnlockPrimaryRoleOutput = ();
300
301pub const ACCESS_CONTROLLER_STOP_TIMED_RECOVERY_IDENT: &str = "stop_timed_recovery";
306
307#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestEncode, ManifestCategorize)]
308pub struct AccessControllerStopTimedRecoveryInput {
309 pub rule_set: RuleSet,
310 pub timed_recovery_delay_in_minutes: Option<u32>,
311}
312
313#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
314pub struct AccessControllerStopTimedRecoveryManifestInput {
315 pub rule_set: ManifestRuleSet,
316 pub timed_recovery_delay_in_minutes: Option<u32>,
317}
318
319pub type AccessControllerStopTimedRecoveryOutput = ();
320
321pub const ACCESS_CONTROLLER_MINT_RECOVERY_BADGES_IDENT: &str = "mint_recovery_badges";
326
327#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
328pub struct AccessControllerMintRecoveryBadgesInput {
329 pub non_fungible_local_ids: IndexSet<NonFungibleLocalId>,
330}
331
332pub type AccessControllerMintRecoveryBadgesManifestInput = AccessControllerMintRecoveryBadgesInput;
333
334pub type AccessControllerMintRecoveryBadgesOutput = Bucket;
335
336pub const ACCESS_CONTROLLER_LOCK_RECOVERY_FEE_IDENT: &str = "lock_recovery_fee";
343
344#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
345pub struct AccessControllerLockRecoveryFeeInput {
346 pub amount: Decimal,
347}
348
349pub type AccessControllerLockRecoveryFeeManifestInput = AccessControllerLockRecoveryFeeInput;
350
351pub type AccessControllerLockRecoveryFeeOutput = ();
352
353pub const ACCESS_CONTROLLER_WITHDRAW_RECOVERY_FEE_IDENT: &str = "withdraw_recovery_fee";
358
359#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
360pub struct AccessControllerWithdrawRecoveryFeeInput {
361 pub amount: Decimal,
362}
363
364pub type AccessControllerWithdrawRecoveryFeeManifestInput =
365 AccessControllerWithdrawRecoveryFeeInput;
366
367pub type AccessControllerWithdrawRecoveryFeeOutput = Bucket;
368
369pub const ACCESS_CONTROLLER_CONTRIBUTE_RECOVERY_FEE_IDENT: &str = "contribute_recovery_fee";
374
375#[derive(Debug, Eq, PartialEq, ScryptoSbor)]
376pub struct AccessControllerContributeRecoveryFeeInput {
377 pub bucket: Bucket,
378}
379
380#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
381pub struct AccessControllerContributeRecoveryFeeManifestInput {
382 pub bucket: ManifestBucket,
383}
384
385pub type AccessControllerContributeRecoveryFeeOutput = ();
386
387