Structs
loose_mint_cap::PointerDomain has store
loose_mint_cap::PointerDomain has store
Fields:
Name | Type | Description |
---|---|---|
metadata_id
|
object::ID
|
|
loose_mint_cap::LooseMintCap<C> has store, key
loose_mint_cap::LooseMintCap<C> has store, key
Fields:
Name | Type | Description |
---|---|---|
id
|
object::UID
|
|
name
|
string::String
|
|
url
|
url::Url
|
|
metadata_id
|
object::ID
|
|
LooseMintCap
object
LooseMintCap
ensures that supply policy on Collection
and
Metadata
are not violated.
Methods
public fun metadata_id(
pointer: &loose_mint_cap::PointerDomain,
): object::ID
public fun metadata_id(
pointer: &loose_mint_cap::PointerDomain,
): object::ID
Return ID
of Metadata
associated with this pointer
public(friend) fun from_unregulated<C>(
mint_cap: mint_cap::UnregulatedMintCap<C>,
metadata_id: object::ID,
name: string::String,
url: url::Url,
ctx: &mut tx_context::TxContext,
): loose_mint_cap::LooseMintCap<C>
public(friend) fun from_unregulated<C>(
mint_cap: mint_cap::UnregulatedMintCap<C>,
metadata_id: object::ID,
name: string::String,
url: url::Url,
ctx: &mut tx_context::TxContext,
): loose_mint_cap::LooseMintCap<C>
Create LooseMintCap
with unregulated supply
Safety
Neither Collection
nor Metadata
have regulated supply.
public(friend) fun from_regulated<C>(
mint_cap: mint_cap::RegulatedMintCap<C>,
metadata_id: object::ID,
name: string::String,
url: url::Url,
ctx: &mut tx_context::TxContext,
): loose_mint_cap::LooseMintCap<C>
public(friend) fun from_regulated<C>(
mint_cap: mint_cap::RegulatedMintCap<C>,
metadata_id: object::ID,
name: string::String,
url: url::Url,
ctx: &mut tx_context::TxContext,
): loose_mint_cap::LooseMintCap<C>
Create LooseMintCap
with unregulated supply
Safety
Either Collection
or Metadata
must have regulated supply, such
that RegulatedMintCap
does not violate either.
public fun name<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): &string::String
public fun name<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): &string::String
Get loose Nft
name
public fun url<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): &url::Url
public fun url<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): &url::Url
Get loose Nft
URL
public fun is_regulated<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): bool
public fun is_regulated<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): bool
Returns whether LooseMintCap
is eligible to mint NFTs of the
given type
public fun supply<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): option::Option<u64>
public fun supply<C>(
mint_cap: &loose_mint_cap::LooseMintCap<C>,
): option::Option<u64>
Returns the remaining supply available to LooseMintCap
If factory is unregulated then none will be returned.
public fun mint_nft<C>(
mint_cap: &mut loose_mint_cap::LooseMintCap<C>,
ctx: &mut tx_context::TxContext,
): nft::Nft<C>
public fun mint_nft<C>(
mint_cap: &mut loose_mint_cap::LooseMintCap<C>,
ctx: &mut tx_context::TxContext,
): nft::Nft<C>
Mints Nft
from LooseMintCap
Panics
Panics if supply was exceeded.
public entry fun mint_nft_and_transfer<C>(
mint_cap: &mut loose_mint_cap::LooseMintCap<C>,
ctx: &mut tx_context::TxContext,
)
public entry fun mint_nft_and_transfer<C>(
mint_cap: &mut loose_mint_cap::LooseMintCap<C>,
ctx: &mut tx_context::TxContext,
)
Mints Nft
from LooseMintCap
and transfer to transaction sender
Panics
Panics if supply was exceeded.