radix_engine_interface/blueprints/access_controller/
invocations.rs1use 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)]
29pub struct AccessControllerCreateManifestInput {
30 pub controlled_asset: ManifestBucket,
31 pub rule_set: RuleSet,
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, ManifestSbor)]
59pub struct AccessControllerInitiateRecoveryAsPrimaryInput {
60 pub rule_set: RuleSet,
61 pub timed_recovery_delay_in_minutes: Option<u32>,
62}
63
64pub type AccessControllerInitiateRecoveryAsPrimaryManifestInput =
65 AccessControllerInitiateRecoveryAsPrimaryInput;
66
67pub type AccessControllerInitiateRecoveryAsPrimaryOutput = ();
68
69pub const ACCESS_CONTROLLER_INITIATE_RECOVERY_AS_RECOVERY_IDENT: &str =
74 "initiate_recovery_as_recovery";
75
76#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
77pub struct AccessControllerInitiateRecoveryAsRecoveryInput {
78 pub rule_set: RuleSet,
79 pub timed_recovery_delay_in_minutes: Option<u32>,
80}
81
82pub type AccessControllerInitiateRecoveryAsRecoveryManifestInput =
83 AccessControllerInitiateRecoveryAsRecoveryInput;
84
85pub type AccessControllerInitiateRecoveryAsRecoveryOutput = ();
86
87pub const ACCESS_CONTROLLER_INITIATE_BADGE_WITHDRAW_ATTEMPT_AS_PRIMARY_IDENT: &str =
92 "initiate_badge_withdraw_attempt_as_primary";
93
94#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
95pub struct AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryInput;
96
97pub type AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryManifestInput =
98 AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryInput;
99
100pub type AccessControllerInitiateBadgeWithdrawAttemptAsPrimaryOutput = ();
101
102pub const ACCESS_CONTROLLER_INITIATE_BADGE_WITHDRAW_ATTEMPT_AS_RECOVERY_IDENT: &str =
107 "initiate_badge_withdraw_attempt_as_recovery";
108
109#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
110pub struct AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryInput;
111
112pub type AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryManifestInput =
113 AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryInput;
114
115pub type AccessControllerInitiateBadgeWithdrawAttemptAsRecoveryOutput = ();
116
117pub const ACCESS_CONTROLLER_QUICK_CONFIRM_PRIMARY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
122 "quick_confirm_primary_role_recovery_proposal";
123
124#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
125pub struct AccessControllerQuickConfirmPrimaryRoleRecoveryProposalInput {
126 pub rule_set: RuleSet,
127 pub timed_recovery_delay_in_minutes: Option<u32>,
128}
129
130pub type AccessControllerQuickConfirmPrimaryRoleRecoveryProposalManifestInput =
131 AccessControllerQuickConfirmPrimaryRoleRecoveryProposalInput;
132
133pub type AccessControllerQuickConfirmPrimaryRoleRecoveryProposalOutput = ();
134
135pub const ACCESS_CONTROLLER_QUICK_CONFIRM_RECOVERY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
140 "quick_confirm_recovery_role_recovery_proposal";
141
142#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
143pub struct AccessControllerQuickConfirmRecoveryRoleRecoveryProposalInput {
144 pub rule_set: RuleSet,
145 pub timed_recovery_delay_in_minutes: Option<u32>,
146}
147
148pub type AccessControllerQuickConfirmRecoveryRoleRecoveryProposalManifestInput =
149 AccessControllerQuickConfirmRecoveryRoleRecoveryProposalInput;
150
151pub type AccessControllerQuickConfirmRecoveryRoleRecoveryProposalOutput = ();
152
153pub const ACCESS_CONTROLLER_QUICK_CONFIRM_PRIMARY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
158 "quick_confirm_primary_role_badge_withdraw_attempt";
159
160#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
161pub struct AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptInput;
162
163pub type AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptManifestInput =
164 AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptInput;
165
166pub type AccessControllerQuickConfirmPrimaryRoleBadgeWithdrawAttemptOutput = Bucket;
167
168pub const ACCESS_CONTROLLER_QUICK_CONFIRM_RECOVERY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
173 "quick_confirm_recovery_role_badge_withdraw_attempt";
174
175#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
176pub struct AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptInput;
177
178pub type AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptManifestInput =
179 AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptInput;
180
181pub type AccessControllerQuickConfirmRecoveryRoleBadgeWithdrawAttemptOutput = Bucket;
182
183pub const ACCESS_CONTROLLER_TIMED_CONFIRM_RECOVERY_IDENT: &str = "timed_confirm_recovery";
188
189#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
190pub struct AccessControllerTimedConfirmRecoveryInput {
191 pub rule_set: RuleSet,
192 pub timed_recovery_delay_in_minutes: Option<u32>,
193}
194
195pub type AccessControllerTimedConfirmRecoveryManifestInput =
196 AccessControllerTimedConfirmRecoveryInput;
197
198pub type AccessControllerTimedConfirmRecoveryOutput = ();
199
200pub const ACCESS_CONTROLLER_CANCEL_PRIMARY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
205 "cancel_primary_role_recovery_proposal";
206
207#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
208pub struct AccessControllerCancelPrimaryRoleRecoveryProposalInput;
209
210pub type AccessControllerCancelPrimaryRoleRecoveryProposalManifestInput =
211 AccessControllerCancelPrimaryRoleRecoveryProposalInput;
212
213pub type AccessControllerCancelPrimaryRoleRecoveryProposalOutput = ();
214
215pub const ACCESS_CONTROLLER_CANCEL_RECOVERY_ROLE_RECOVERY_PROPOSAL_IDENT: &str =
220 "cancel_recovery_role_recovery_proposal";
221
222#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
223pub struct AccessControllerCancelRecoveryRoleRecoveryProposalInput;
224
225pub type AccessControllerCancelRecoveryRoleRecoveryProposalManifestInput =
226 AccessControllerCancelRecoveryRoleRecoveryProposalInput;
227
228pub type AccessControllerCancelRecoveryRoleRecoveryProposalOutput = ();
229
230pub const ACCESS_CONTROLLER_CANCEL_PRIMARY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
235 "cancel_primary_role_badge_withdraw_attempt";
236
237#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
238pub struct AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptInput;
239
240pub type AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptManifestInput =
241 AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptInput;
242
243pub type AccessControllerCancelPrimaryRoleBadgeWithdrawAttemptOutput = ();
244
245pub const ACCESS_CONTROLLER_CANCEL_RECOVERY_ROLE_BADGE_WITHDRAW_ATTEMPT_IDENT: &str =
250 "cancel_recovery_role_badge_withdraw_attempt";
251
252#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
253pub struct AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptInput;
254
255pub type AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptManifestInput =
256 AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptInput;
257
258pub type AccessControllerCancelRecoveryRoleBadgeWithdrawAttemptOutput = ();
259
260pub const ACCESS_CONTROLLER_LOCK_PRIMARY_ROLE_IDENT: &str = "lock_primary_role";
265
266#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
267pub struct AccessControllerLockPrimaryRoleInput;
268
269pub type AccessControllerLockPrimaryRoleManifestInput = AccessControllerLockPrimaryRoleInput;
270
271pub type AccessControllerLockPrimaryRoleOutput = ();
272
273pub const ACCESS_CONTROLLER_UNLOCK_PRIMARY_ROLE_IDENT: &str = "unlock_primary_role";
278
279#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
280pub struct AccessControllerUnlockPrimaryRoleInput;
281
282pub type AccessControllerUnlockPrimaryRoleManifestInput = AccessControllerUnlockPrimaryRoleInput;
283
284pub type AccessControllerUnlockPrimaryRoleOutput = ();
285
286pub const ACCESS_CONTROLLER_STOP_TIMED_RECOVERY_IDENT: &str = "stop_timed_recovery";
291
292#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
293pub struct AccessControllerStopTimedRecoveryInput {
294 pub rule_set: RuleSet,
295 pub timed_recovery_delay_in_minutes: Option<u32>,
296}
297
298pub type AccessControllerStopTimedRecoveryManifestInput = AccessControllerStopTimedRecoveryInput;
299
300pub type AccessControllerStopTimedRecoveryOutput = ();
301
302pub const ACCESS_CONTROLLER_MINT_RECOVERY_BADGES_IDENT: &str = "mint_recovery_badges";
307
308#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
309pub struct AccessControllerMintRecoveryBadgesInput {
310 pub non_fungible_local_ids: IndexSet<NonFungibleLocalId>,
311}
312
313pub type AccessControllerMintRecoveryBadgesManifestInput = AccessControllerMintRecoveryBadgesInput;
314
315pub type AccessControllerMintRecoveryBadgesOutput = Bucket;
316
317pub const ACCESS_CONTROLLER_LOCK_RECOVERY_FEE_IDENT: &str = "lock_recovery_fee";
324
325#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
326pub struct AccessControllerLockRecoveryFeeInput {
327 pub amount: Decimal,
328}
329
330pub type AccessControllerLockRecoveryFeeManifestInput = AccessControllerLockRecoveryFeeInput;
331
332pub type AccessControllerLockRecoveryFeeOutput = ();
333
334pub const ACCESS_CONTROLLER_WITHDRAW_RECOVERY_FEE_IDENT: &str = "withdraw_recovery_fee";
339
340#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
341pub struct AccessControllerWithdrawRecoveryFeeInput {
342 pub amount: Decimal,
343}
344
345pub type AccessControllerWithdrawRecoveryFeeManifestInput =
346 AccessControllerWithdrawRecoveryFeeInput;
347
348pub type AccessControllerWithdrawRecoveryFeeOutput = Bucket;
349
350pub const ACCESS_CONTROLLER_CONTRIBUTE_RECOVERY_FEE_IDENT: &str = "contribute_recovery_fee";
355
356#[derive(Debug, Eq, PartialEq, ScryptoSbor)]
357pub struct AccessControllerContributeRecoveryFeeInput {
358 pub bucket: Bucket,
359}
360
361#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor)]
362pub struct AccessControllerContributeRecoveryFeeManifestInput {
363 pub bucket: ManifestBucket,
364}
365
366pub type AccessControllerContributeRecoveryFeeOutput = ();
367
368