radix_engine_interface/blueprints/resource/
auth_zone.rs

1use crate::internal_prelude::*;
2
3pub const AUTH_ZONE_BLUEPRINT: &str = "AuthZone";
4
5pub const AUTH_ZONE_POP_IDENT: &str = "pop";
6
7#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
8pub struct AuthZonePopInput {}
9
10pub type AuthZonePopManifestInput = AuthZonePopInput;
11
12pub type AuthZonePopOutput = Option<Proof>;
13
14pub const AUTH_ZONE_PUSH_IDENT: &str = "push";
15
16#[derive(Debug, Eq, PartialEq, ScryptoSbor)]
17pub struct AuthZonePushInput {
18    pub proof: Proof,
19}
20
21#[derive(Debug, Eq, PartialEq, ManifestSbor)]
22pub struct AuthZonePushManifestInput {
23    pub proof: ManifestProof,
24}
25
26pub type AuthZonePushOutput = ();
27
28pub const AUTH_ZONE_CREATE_PROOF_OF_AMOUNT_IDENT: &str = "create_proof_of_amount";
29
30#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
31pub struct AuthZoneCreateProofOfAmountInput {
32    pub amount: Decimal,
33    pub resource_address: ResourceAddress,
34}
35
36pub type AuthZoneCreateProofOfAmountManifestInput = AuthZoneCreateProofOfAmountInput;
37
38pub type AuthZoneCreateProofOfAmountOutput = Proof;
39
40pub const AUTH_ZONE_CREATE_PROOF_OF_NON_FUNGIBLES_IDENT: &str = "create_proof_of_non_fungibles";
41
42#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
43pub struct AuthZoneCreateProofOfNonFungiblesInput {
44    pub ids: IndexSet<NonFungibleLocalId>,
45    pub resource_address: ResourceAddress,
46}
47
48pub type AuthZoneCreateProofOfNonFungiblesManifestInput = AuthZoneCreateProofOfNonFungiblesInput;
49
50pub type AuthZoneCreateProofOfNonFungiblesOutput = Proof;
51
52pub const AUTH_ZONE_CREATE_PROOF_OF_ALL_IDENT: &str = "create_proof_of_all";
53
54#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
55pub struct AuthZoneCreateProofOfAllInput {
56    pub resource_address: ResourceAddress,
57}
58
59pub type AuthZoneCreateProofOfAllManifestInput = AuthZoneCreateProofOfAllInput;
60
61pub type AuthZoneCreateProofOfAllOutput = Proof;
62
63pub const AUTH_ZONE_DROP_PROOFS_IDENT: &str = "drop_proofs";
64
65#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
66pub struct AuthZoneDropProofsInput {}
67
68pub type AuthZoneDropProofsManifestInput = AuthZoneDropProofsInput;
69
70pub type AuthZoneDropProofsOutput = ();
71
72pub const AUTH_ZONE_DROP_SIGNATURE_PROOFS_IDENT: &str = "drop_signature_proofs";
73
74#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
75pub struct AuthZoneDropSignatureProofsInput {}
76
77pub type AuthZoneDropSignatureProofsManifestInput = AuthZoneDropSignatureProofsInput;
78
79pub type AuthZoneDropSignatureProofsOutput = ();
80
81pub const AUTH_ZONE_DROP_REGULAR_PROOFS_IDENT: &str = "drop_regular_proofs";
82
83#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
84pub struct AuthZoneDropRegularProofsInput {}
85
86pub type AuthZoneDropRegularProofsManifestInput = AuthZoneDropRegularProofsInput;
87
88pub type AuthZoneDropRegularProofsOutput = ();
89
90pub const AUTH_ZONE_DRAIN_IDENT: &str = "drain";
91
92#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
93pub struct AuthZoneDrainInput {}
94
95pub type AuthZoneDrainManifestInput = AuthZoneDrainInput;
96
97pub type AuthZoneDrainOutput = Vec<Proof>;
98
99pub const AUTH_ZONE_ASSERT_ACCESS_RULE_IDENT: &str = "assert_access_rule";
100
101#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestSbor)]
102pub struct AuthZoneAssertAccessRuleInput {
103    pub rule: AccessRule,
104}
105
106#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
107pub struct AuthZoneAssertAccessRuleManifestInput {
108    pub rule: ManifestAccessRule,
109}
110
111pub type AuthZoneAssertAccessRuleOutput = ();
112
113#[derive(Debug, Eq, PartialEq)]
114pub struct AuthZoneRef(pub NodeId);