pub struct AliasOutput { /* private fields */ }block only.Expand description
Describes an alias account in the ledger that can be controlled by the state and governance controllers.
Implementations§
Source§impl AliasOutput
impl AliasOutput
pub fn try_from_dto( value: &AliasOutputDto, token_supply: u64, ) -> Result<Self, DtoError>
dto only.pub fn try_from_dto_unverified(value: &AliasOutputDto) -> Result<Self, DtoError>
dto only.pub fn try_from_dtos( amount: OutputBuilderAmountDto, native_tokens: Option<Vec<NativeTokenDto>>, alias_id: &AliasIdDto, state_index: Option<u32>, state_metadata: Option<Vec<u8>>, foundry_counter: Option<u32>, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, immutable_features: Option<Vec<FeatureDto>>, token_supply: u64, ) -> Result<Self, DtoError>
dto only.Source§impl AliasOutput
impl AliasOutput
Sourcepub const KIND: u8 = 4
pub const KIND: u8 = 4
The Output kind of an AliasOutput.
Sourcepub const STATE_METADATA_LENGTH_MAX: u16 = 8192
pub const STATE_METADATA_LENGTH_MAX: u16 = 8192
Maximum possible length in bytes of the state metadata.
Sourcepub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags
pub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags
The set of allowed UnlockConditions for an AliasOutput.
Sourcepub const ALLOWED_FEATURES: FeatureFlags
pub const ALLOWED_FEATURES: FeatureFlags
The set of allowed Features for an AliasOutput.
Sourcepub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags
pub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags
The set of allowed immutable Features for an AliasOutput.
Sourcepub fn new_with_amount(
amount: u64,
alias_id: AliasId,
token_supply: u64,
) -> Result<Self, Error>
pub fn new_with_amount( amount: u64, alias_id: AliasId, token_supply: u64, ) -> Result<Self, Error>
Creates a new AliasOutput with a provided amount.
Sourcepub fn new_with_minimum_storage_deposit(
alias_id: AliasId,
rent_structure: RentStructure,
token_supply: u64,
) -> Result<Self, Error>
pub fn new_with_minimum_storage_deposit( alias_id: AliasId, rent_structure: RentStructure, token_supply: u64, ) -> Result<Self, Error>
Creates a new AliasOutput with a provided rent structure.
The amount will be set to the minimum storage deposit.
Sourcepub fn build_with_amount(
amount: u64,
alias_id: AliasId,
) -> Result<AliasOutputBuilder, Error>
pub fn build_with_amount( amount: u64, alias_id: AliasId, ) -> Result<AliasOutputBuilder, Error>
Creates a new AliasOutputBuilder with a provided amount.
Sourcepub fn build_with_minimum_storage_deposit(
rent_structure: RentStructure,
alias_id: AliasId,
) -> Result<AliasOutputBuilder, Error>
pub fn build_with_minimum_storage_deposit( rent_structure: RentStructure, alias_id: AliasId, ) -> Result<AliasOutputBuilder, Error>
Creates a new AliasOutputBuilder with a provided rent structure.
The amount will be set to the minimum storage deposit.
Sourcepub fn native_tokens(&self) -> &NativeTokens
pub fn native_tokens(&self) -> &NativeTokens
Sourcepub fn alias_id_non_null(&self, output_id: &OutputId) -> AliasId
pub fn alias_id_non_null(&self, output_id: &OutputId) -> AliasId
Returns the alias ID if not null, or creates it from the output ID.
Sourcepub fn state_index(&self) -> u32
pub fn state_index(&self) -> u32
Sourcepub fn state_metadata(&self) -> &[u8] ⓘ
pub fn state_metadata(&self) -> &[u8] ⓘ
Sourcepub fn foundry_counter(&self) -> u32
pub fn foundry_counter(&self) -> u32
Sourcepub fn unlock_conditions(&self) -> &UnlockConditions
pub fn unlock_conditions(&self) -> &UnlockConditions
Sourcepub fn immutable_features(&self) -> &Features
pub fn immutable_features(&self) -> &Features
Sourcepub fn state_controller_address(&self) -> &Address
pub fn state_controller_address(&self) -> &Address
Sourcepub fn governor_address(&self) -> &Address
pub fn governor_address(&self) -> &Address
Sourcepub fn alias_address(&self, output_id: &OutputId) -> AliasAddress
pub fn alias_address(&self, output_id: &OutputId) -> AliasAddress
Returns the alias address for this output.
Sourcepub fn unlock(
&self,
output_id: &OutputId,
unlock: &Unlock,
inputs: &[(OutputId, &Output)],
context: &mut ValidationContext<'_>,
) -> Result<(), ConflictReason>
pub fn unlock( &self, output_id: &OutputId, unlock: &Unlock, inputs: &[(OutputId, &Output)], context: &mut ValidationContext<'_>, ) -> Result<(), ConflictReason>
Trait Implementations§
Source§impl Clone for AliasOutput
impl Clone for AliasOutput
Source§fn clone(&self) -> AliasOutput
fn clone(&self) -> AliasOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AliasOutput
impl Debug for AliasOutput
Source§impl<'de> Deserialize<'de> for AliasOutput
impl<'de> Deserialize<'de> for AliasOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&AliasOutput> for AliasOutputBuilder
impl From<&AliasOutput> for AliasOutputBuilder
Source§fn from(output: &AliasOutput) -> Self
fn from(output: &AliasOutput) -> Self
Source§impl From<&AliasOutput> for AliasOutputDto
Available on crate feature dto only.
impl From<&AliasOutput> for AliasOutputDto
dto only.Source§fn from(value: &AliasOutput) -> Self
fn from(value: &AliasOutput) -> Self
Source§impl From<AliasOutput> for Output
impl From<AliasOutput> for Output
Source§fn from(original: AliasOutput) -> Output
fn from(original: AliasOutput) -> Output
Source§impl Hash for AliasOutput
impl Hash for AliasOutput
Source§impl Ord for AliasOutput
impl Ord for AliasOutput
Source§fn cmp(&self, other: &AliasOutput) -> Ordering
fn cmp(&self, other: &AliasOutput) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl Packable for AliasOutput
impl Packable for AliasOutput
Source§type UnpackError = Error
type UnpackError = Error
Source§type UnpackVisitor = ProtocolParameters
type UnpackVisitor = ProtocolParameters
Source§fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
Packer.Source§fn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor,
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
fn unpack<U: Unpacker, const VERIFY: bool>( unpacker: &mut U, visitor: &Self::UnpackVisitor, ) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
Unpacker. The VERIFY generic parameter can be used to skip additional
syntactic checks.Source§impl PartialEq for AliasOutput
impl PartialEq for AliasOutput
Source§fn eq(&self, other: &AliasOutput) -> bool
fn eq(&self, other: &AliasOutput) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AliasOutput
impl PartialOrd for AliasOutput
Source§impl Serialize for AliasOutput
impl Serialize for AliasOutput
Source§impl StateTransitionVerifier for AliasOutput
impl StateTransitionVerifier for AliasOutput
fn creation( next_state: &Self, context: &ValidationContext<'_>, ) -> Result<(), StateTransitionError>
fn transition( current_state: &Self, next_state: &Self, context: &ValidationContext<'_>, ) -> Result<(), StateTransitionError>
fn destruction( _current_state: &Self, _context: &ValidationContext<'_>, ) -> Result<(), StateTransitionError>
impl Eq for AliasOutput
impl StructuralPartialEq for AliasOutput
Auto Trait Implementations§
impl Freeze for AliasOutput
impl RefUnwindSafe for AliasOutput
impl Send for AliasOutput
impl Sync for AliasOutput
impl Unpin for AliasOutput
impl UnsafeUnpin for AliasOutput
impl UnwindSafe for AliasOutput
Blanket Implementations§
Source§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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
Source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>].
Source§fn unpack_unverified<T>(
bytes: T,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>] skipping some syntatical checks.
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
pack.