Struct radix_engine::blueprints::account::AccountBlueprint
source · pub struct AccountBlueprint;
Implementations§
source§impl AccountBlueprint
impl AccountBlueprint
pub fn get_definition() -> BlueprintDefinitionInit
fn create_modules<Y>(
role_assignment: RoleAssignment,
metadata_init: MetadataInit,
api: &mut Y
) -> Result<IndexMap<AttachedModuleId, Own>, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn on_virtualize<Y>(
input: OnVirtualizeInput,
api: &mut Y
) -> Result<OnVirtualizeOutput, RuntimeError>where
Y: ClientApi<RuntimeError>,
fn create_virtual<Y>(
public_key_hash: PublicKeyHash,
address_reservation: GlobalAddressReservation,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn securify<Y>(api: &mut Y) -> Result<Bucket, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn create_advanced<Y>(
owner_role: OwnerRole,
address_reservation: Option<GlobalAddressReservation>,
api: &mut Y
) -> Result<GlobalAddress, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn create<Y>(api: &mut Y) -> Result<(GlobalAddress, Bucket), RuntimeError>where
Y: ClientApi<RuntimeError>,
fn create_local<Y>(api: &mut Y) -> Result<Own, RuntimeError>where
Y: ClientApi<RuntimeError>,
fn lock_fee_internal<Y>(
amount: Decimal,
contingent: bool,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn lock_fee<Y>(amount: Decimal, api: &mut Y) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn lock_contingent_fee<Y>(
amount: Decimal,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
sourcepub fn deposit<Y>(bucket: Bucket, api: &mut Y) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn deposit<Y>(bucket: Bucket, api: &mut Y) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
Method requires auth - if call goes through it performs the deposit with no questions asked
sourcepub fn deposit_batch<Y>(
buckets: Vec<Bucket>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn deposit_batch<Y>(
buckets: Vec<Bucket>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
Method requires auth - if call goes through it performs the deposit with no questions asked
pub fn try_deposit_or_refund<Y>(
bucket: Bucket,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
api: &mut Y
) -> Result<Option<Bucket>, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn try_deposit_batch_or_refund<Y>(
buckets: Vec<Bucket>,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
api: &mut Y
) -> Result<Option<Vec<Bucket>>, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn try_deposit_or_abort<Y>(
bucket: Bucket,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
sourcepub fn try_deposit_batch_or_abort<Y>(
buckets: Vec<Bucket>,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn try_deposit_batch_or_abort<Y>(
buckets: Vec<Bucket>,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
Method is public to all - if ANY of the resources can’t be deposited then the execution panics.
fn validate_badge_is_present<Y>(
badge: ResourceOrNonFungible,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn withdraw<Y>(
resource_address: ResourceAddress,
amount: Decimal,
api: &mut Y
) -> Result<Bucket, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn withdraw_non_fungibles<Y>(
resource_address: ResourceAddress,
ids: IndexSet<NonFungibleLocalId>,
api: &mut Y
) -> Result<Bucket, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn burn<Y>(
resource_address: ResourceAddress,
amount: Decimal,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn burn_non_fungibles<Y>(
resource_address: ResourceAddress,
ids: IndexSet<NonFungibleLocalId>,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn lock_fee_and_withdraw<Y>(
amount_to_lock: Decimal,
resource_address: ResourceAddress,
amount: Decimal,
api: &mut Y
) -> Result<Bucket, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn lock_fee_and_withdraw_non_fungibles<Y>(
amount_to_lock: Decimal,
resource_address: ResourceAddress,
ids: IndexSet<NonFungibleLocalId>,
api: &mut Y
) -> Result<Bucket, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn create_proof_of_amount<Y>(
resource_address: ResourceAddress,
amount: Decimal,
api: &mut Y
) -> Result<Proof, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn create_proof_of_non_fungibles<Y>(
resource_address: ResourceAddress,
ids: IndexSet<NonFungibleLocalId>,
api: &mut Y
) -> Result<Proof, RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn set_default_deposit_rule<Y>(
default: DefaultDepositRule,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn set_resource_preference<Y>(
resource_address: ResourceAddress,
resource_preference: ResourcePreference,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
pub fn remove_resource_preference<Y>(
resource_address: ResourceAddress,
api: &mut Y
) -> Result<(), RuntimeError>where
Y: ClientApi<RuntimeError>,
fn get_default_deposit_rule<Y>(
api: &mut Y
) -> Result<DefaultDepositRule, RuntimeError>where
Y: ClientApi<RuntimeError>,
fn get_vault<F, Y, R>( resource_address: ResourceAddress, vault_fn: F, create: bool, api: &mut Y ) -> Result<R, RuntimeError>
fn is_deposit_allowed<Y>(
resource_address: &ResourceAddress,
api: &mut Y
) -> Result<bool, RuntimeError>where
Y: ClientApi<RuntimeError>,
fn does_vault_exist<Y>(
resource_address: &ResourceAddress,
api: &mut Y
) -> Result<bool, RuntimeError>where
Y: ClientApi<RuntimeError>,
fn get_resource_preference<Y>(
resource_address: &ResourceAddress,
api: &mut Y
) -> Result<Option<ResourcePreference>, RuntimeError>where
Y: ClientApi<RuntimeError>,
Auto Trait Implementations§
impl RefUnwindSafe for AccountBlueprint
impl Send for AccountBlueprint
impl Sync for AccountBlueprint
impl Unpin for AccountBlueprint
impl UnwindSafe for AccountBlueprint
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.