0x0::display

Module of NFT domains for displaying standard information

Current display domains are: - DisplayDomain (For NFTs and Collections) - UrlDomain (For NFTs and Collections) - SymbolDomain (For Collections) - Attributes (For NFTs)

Structs

display::Witness has drop

Witness used to authenticate witness protected endpoints

display::DisplayDomain has drop, store

Fields:

Name Type Description
name string::String
description string::String

display::SymbolDomain has store

Fields:

Name Type Description
symbol string::String

display::CollectionIdDomain has store

Fields:

Name Type Description
collection_id object::ID

Methods

public fun name(domain: &display::DisplayDomain): 
    &string::String

Gets name of DisplayDomain

public fun description(domain: &display::DisplayDomain): 
    &string::String

Gets description of DisplayDomain

public fun new_display_domain(
    name: string::String,
    description: string::String,
): display::DisplayDomain

Creates a new DisplayDomain with name and description

public fun set_name<C>(
    _witness: witness::Witness<C>,
    collection: &mut collection::Collection<C>,
    name: string::String,
)

Sets name of DisplayDomain

Requires that AttributionDomain is defined and sender is a creator

public fun set_description<C>(
    _witness: witness::Witness<C>,
    collection: &mut collection::Collection<C>,
    description: string::String,
)

Sets description of DisplayDomain

Requires that AttributionDomain is defined and sender is a creator

public fun display_domain<C>(nft: &nft::Nft<C>): 
    &display::DisplayDomain

public fun collection_display_domain<C>(
    nft: &collection::Collection<C>,
): &display::DisplayDomain

public fun add_display_domain<C, W>(
    witness: &W,
    nft: &mut nft::Nft<C>,
    name: string::String,
    description: string::String,
)

public fun add_collection_display_domain<C, W>(
    witness: &W,
    collection: &mut collection::Collection<C>,
    name: string::String,
    description: string::String,
)

public fun remove_display_domain<C, W>(
    witness: &W,
    nft: &mut nft::Nft<C>,
): display::DisplayDomain

public fun remove_display_domain_delegated<C>(
    _witness: witness::Witness<C>,
    nft: &mut nft::Nft<C>,
): display::DisplayDomain

public fun symbol(domain: &display::SymbolDomain): 
    &string::String

Gets symbol of SymbolDomain

public fun new_symbol_domain(symbol: string::String): 
    display::SymbolDomain

Creates new SymbolDomain with a symbol

public fun set_symbol<C>(
    _witness: witness::Witness<C>,
    collection: &mut collection::Collection<C>,
    symbol: string::String,
)

Sets name of DisplayDomain

Requires that AttributionDomain is defined and sender is a creator

public fun display_symbol<C>(nft: &nft::Nft<C>): 
    option::Option<string::String>

public fun display_collection_symbol<C>(
    nft: &collection::Collection<C>,
): option::Option<string::String>

public fun add_symbol_domain<C, W>(
    witness: &W,
    nft: &mut nft::Nft<C>,
    symbol: string::String,
)

public fun add_collection_symbol_domain<C, W>(
    witness: &W,
    nft: &mut collection::Collection<C>,
    symbol: string::String,
)

public fun collection_id(domain: &display::CollectionIdDomain): 
    &object::ID

Gets name of CollectionIdDomain

public fun new_collection_id_domain(collection_id: object::ID): 
    display::CollectionIdDomain

Creates a new CollectionIdDomain with name

public fun set_collection_id<C>(
    _witness: witness::Witness<C>,
    collection: &mut collection::Collection<C>,
    collection_id: object::ID,
)

Sets name of CollectionIdDomain

Requires that AttributionDomain is defined and sender is a creator

public fun collection_id_domain<C>(
    nft: &nft::Nft<C>,
): &display::CollectionIdDomain

public fun add_collection_id_domain<C, W>(
    witness: &W,
    nft: &mut nft::Nft<C>,
    collection_id: object::ID,
)