Readonly
model: "candyMachineV2"A model identifier to distinguish models in the SDK.
Readonly
address: PublicKeyThe address of the Candy Machine account.
Readonly
programThe address of program that owns the Candy Machine account.
Readonly
version: 1 | 2Whether this Candy Machine was created from v1 or v2.
Readonly
authorityThe address of the authority that is allowed to manage this Candy Machine.
Readonly
walletThe address of the wallet receiving the payments for minting NFTs. If the Candy Machine accepts payments in SOL, this is the SOL treasury account. Otherwise, this is the token account associated with the treasury Mint.
Readonly
tokenThe address of the Mint account of the SPL Token that should be used
to accept payments for minting NFTs. When null
, it means the
Candy Machine account accepts payments in SOL.
Readonly
collectionThe mint address of the collection NFT that should be associated with
minting NFTs. When null
, it means NFTs will not be part of a
collection when minted.
Readonly
uuid: stringA 6-character long unique identifier for the Candy Machine. This usually is the first 6 characters of the address. This is more of an internal field used by the program and you typically shouldn't need it.
Readonly
price: AmountThe price of minting an NFT.
If the Candy Machine uses no treasury mint (i.e. the tokenMintAddress
is null
), this amount will be in SOL. Otherwise, its currency will
match the currency of the treasury mint.
Readonly
symbol: stringThe symbol to use when minting NFTs (e.g. "MYPROJECT")
This can be any string up to 10 bytes and can be made optional by providing an empty string.
Readonly
sellerThe royalties that should be set on minted NFTs in basis points (i.e. 250 is 2.5%).
Readonly
isWhether the minted NFTs should be mutable or not.
We recommend setting this to true
unless you have a specific reason.
You can always make NFTs immutable in the future but you cannot make
immutable NFTs mutable ever again.
Readonly
retainWheter the minted NFTs should use the Candy Machine authority as their update authority.
We strongly recommend setting this to true
unless you have a
specific reason. When set to false
, the update authority will
be given to the address that minted the NFT and you will no longer
be able to update the minted NFTs in the future.
Readonly
goThe timestamp of when the Candy Machine will be live.
If this is null
or if the timestamp refers to a time in the
future, no one will be able to mint NFTs from the Candy Machine
(except its authority that can bypass this live date).
Readonly
maxThe maximum number of editions that can be printed from the minted NFTs.
For most use cases, you'd want to set this to 0
to prevent
minted NFTs to be printed multiple times.
Note that you cannot set this to null
which means unlimited editions
are not supported by the Candy Machine program.
Readonly
items: CandyMachineV2Item[]The parsed items that are loaded in the Candy Machine.
If the Candy Machine is using hidden settings, this will be an empty array.
Readonly
itemsThe total number of items availble in the Candy Machine, minted or not.
Readonly
itemsThe number of items that have been minted on this Candy Machine so far.
Readonly
itemsThe number of remaining items in the Candy Machine that can still be minted.
Readonly
itemsThe number of items that have been inserted in the Candy Machine by its authority. If this number if lower than the number of items available, the Candy Machine is not ready and cannot be minted from.
This field is irrelevant if the Candy Machine is using hidden settings.
Readonly
isWhether all items in the Candy Machine have been inserted by its authority.
This field is irrelevant if the Candy Machine is using hidden settings.
Readonly
endAn optional constraint defining when the Candy Machine will end.
If this is null
, the Candy Machine will end when there are
no more items to mint from (i.e. itemsRemaining
is 0
).
Readonly
hiddenAn optional setting that makes items in the Candy Machine hidden by providing a single URI for all minted NFTs and the hash of a file that maps mint number to actual NFT URIs.
Hidden settings serve two purposes.
Once hidden settings are enabled, every minted NFT will have the same URI and the name will be created by appending the mint number (e.g., “#45”) to the specified name. The hash is expected to be a 32 character string corresponding to the hash of a cache file that has the mapping between a mint number and the actual metadata URI. This allows the order of the mint to be verified by others after the mint is complete.
Since the metadata URIs are not on-chain, it is possible to create very large drops. The only caveat is that there is a need for an off-chain process to update the metadata for each item. This is important otherwise all items will have the same metadata.
Readonly
whitelistWhitelist settings provide a variety of different use cases and revolve around the idea of using custom SPL tokens to offer special rights to token holders. How these SPL tokens are distributed is up to you.
For example, you can offer a discount to token holders, you can allow token holders to mint NFTs before everyone else, or a combination of both.
Readonly
gatekeeper: Option<CandyMachineV2Gatekeeper>Gatekeeper settings allow us to protect ourselves against malicious actors such as bots. Whilst the Candy Machine program itself has some protection mechanisms against bots, you may want to add extra protection to ensure only humand can mint from your project.
To enable gatekeeper settings, you must provide the address of a Gatekeeper Network which usually encapsulates multiple gatekeeper providers and is responsible for validating the legitimacy of the minting actor.
Readonly
creators: Creator[]Object that represents the creator of an asset. It contains its public key, its shares of the royalties in percent and whether or not the creator is verified for a given asset (i.e. they signed the asset).
Generated using TypeDoc
This model contains all the relevant information about a Candy Machine. This includes its settings but also all of the items (a.k.a. config lines) loaded inside the Candy Machine along with some statistics about the items.