Module 0x107a::alias_output
- Resource
AliasOutput
- Constants
- Function
extract_assets
- Function
receive
- Function
attach_alias
- Function
load_alias
use 0x107a::alias;
use 0x2::bag;
use 0x2::balance;
use 0x2::dynamic_object_field;
use 0x2::object;
use 0x2::transfer;
Resource AliasOutput
Owned Object controlled by the Governor Address.
struct AliasOutput<T> has key
Fields
Constants
The Alias dynamic object field name.
const ALIAS_NAME: vector<u8> = [97, 108, 105, 97, 115];
Function extract_assets
The function extracts assets from a legacy AliasOutput
.
- returns the coin Balance,
- the native tokens Bag,
- and the
Alias
object that persists the AliasID=ObjectID from Stardust.
public fun extract_assets<T>(output: alias_output::AliasOutput<T>): (balance::Balance<T>, bag::Bag, alias::Alias)
Implementation
Function receive
Utility function to receive an AliasOutput
object in other Stardust modules.
Other modules in the Stardust package can call this function to receive an AliasOutput
object (nft).
public(friend) fun receive<T>(parent: &mut object::UID, output: transfer::Receiving<alias_output::AliasOutput<T>>): alias_output::AliasOutput<T>
Implementation
Function attach_alias
Utility function to attach an Alias
to an AliasOutput
.
public fun attach_alias<T>(output: &mut alias_output::AliasOutput<T>, alias: alias::Alias)
Implementation
Function load_alias
Loads the Alias
object from the dynamic object field.
fun load_alias<T>(output: &mut alias_output::AliasOutput<T>): alias::Alias