Type alias CandyMachine<T>

CandyMachine<T>: {
    model: "candyMachine";
    address: PublicKey;
    accountInfo: AccountInfo;
    authorityAddress: PublicKey;
    mintAuthorityAddress: PublicKey;
    collectionMintAddress: PublicKey;
    symbol: string;
    sellerFeeBasisPoints: number;
    isMutable: boolean;
    maxEditionSupply: BigNumber;
    creators: Omit<Creator, "verified">[];
    items: CandyMachineItem[];
    itemsAvailable: BigNumber;
    itemsMinted: BigNumber;
    itemsRemaining: BigNumber;
    itemsLoaded: number;
    isFullyLoaded: boolean;
    itemSettings: CandyMachineConfigLineSettings | CandyMachineHiddenSettings;
    featureFlags: FeatureFlags;
    candyGuard: Option<CandyGuard<T>>;
}

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.

Type Parameters

Type declaration

  • model: "candyMachine"
  • Readonly address: PublicKey

    The address of the Candy Machine account.

  • Readonly accountInfo: AccountInfo

    Blockchain data of the Candy Machine account.

  • Readonly authorityAddress: PublicKey

    Refers to the authority that is allowed to manage the Candy Machine. This includes updating its data, authorities, inserting items, etc.

  • Readonly mintAuthorityAddress: PublicKey

    Refers to the only authority that is allowed to mint from this Candy Machine. This will refer to the address of the Candy Guard associated with the Candy Machine if any.

  • Readonly collectionMintAddress: PublicKey

    The mint address of the collection NFT that should be associated with minted NFTs. When null, it means NFTs will not be part of a collection when minted.

  • Readonly symbol: string

    The 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 sellerFeeBasisPoints: number

    The royalties that should be set on minted NFTs in basis points (i.e. 250 is 2.5%).

  • Readonly isMutable: boolean

    Whether 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 maxEditionSupply: BigNumber

    The 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 creators: Omit<Creator, "verified">[]

    Array of creators that should be set on minted NFTs. creators can only verify NFTs after they have been minted. Thus, all the provided creators will have verified set to false.

    See

    Creator

  • Readonly items: CandyMachineItem[]

    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 itemsAvailable: BigNumber

    The total number of items availble in the Candy Machine, minted or not.

  • Readonly itemsMinted: BigNumber

    The number of items that have been minted on this Candy Machine so far.

  • Readonly itemsRemaining: BigNumber

    The number of remaining items in the Candy Machine that can still be minted.

  • Readonly itemsLoaded: number

    The number of items that have been inserted in the Candy Machine by its update 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 isFullyLoaded: boolean

    Whether 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 itemSettings: CandyMachineConfigLineSettings | CandyMachineHiddenSettings

    Settings related to the Candy Machine's items.

    These can either be inserted manually within the Candy Machine or they can be infered from a set of hidden settings.

    • If type is hidden, the Candy Machine is using hidden settings.
    • If type is configLines, the Candy Machine is using config line settings.

    See

  • Readonly featureFlags: FeatureFlags

    This array of booleans is used to keep track of which new features have been enabled on the Candy Machine.

  • Readonly candyGuard: Option<CandyGuard<T>>

    The Candy Guard associted with the Candy Machine if any.

Generated using TypeDoc