Type alias CreateCandyMachineV2Input

CreateCandyMachineV2Input: {
    symbol: undefined | string;
    creators: undefined | Creator[];
    isMutable: undefined | boolean;
    endSettings: undefined | Option<CandyMachineV2EndSettings>;
    hiddenSettings: undefined | Option<CandyMachineV2HiddenSettings>;
    whitelistMintSettings: undefined | Option<CandyMachineV2WhitelistMintSettings>;
    gatekeeper: undefined | Option<CandyMachineV2Gatekeeper>;
    wallet: undefined | PublicKey;
    tokenMint: undefined | Option<PublicKey>;
    maxEditionSupply: undefined | BigNumber;
    retainAuthority: undefined | boolean;
    goLiveDate: undefined | Option<DateTime>;
    sellerFeeBasisPoints: number;
    price: Amount<Currency>;
    itemsAvailable: BigNumber;
    candyMachine?: undefined | Signer;
    authority?: undefined | PublicKey | Signer;
    collection?: undefined | Option<PublicKey>;
}

Type declaration

  • symbol: undefined | 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.

    Default Value

    ""

  • creators: undefined | 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).

    Default Value

    [{
    address: metaplex.identity().publicKey,
    share: 100,
    verified: false,
    }]
  • isMutable: undefined | 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.

    Default Value

    true

  • endSettings: undefined | Option<CandyMachineV2EndSettings>

    An 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).

    Default Value

    null

  • hiddenSettings: undefined | Option<CandyMachineV2HiddenSettings>

    Settings 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.

    • First, it allows the creation of larger drops (20k+), since the JSON metadata URIs are not stored on-chain for each item.
    • In turn, this also allows the creation of hide-and-reveal drops, where users discover which items they minted after the mint is complete.

    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.

    Default Value

    null

  • whitelistMintSettings: undefined | Option<CandyMachineV2WhitelistMintSettings>

    {@inheritDoc CandyMachineWhitelistMintSettings}

    Default Value

    null

  • gatekeeper: undefined | Option<CandyMachineV2Gatekeeper>

    {@inheritDoc CandyMachineGatekeeper}

    Default Value

    null

  • wallet: undefined | PublicKey

    The 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.

    Default Value

    metaplex.identity().publicKey

  • tokenMint: undefined | Option<PublicKey>

    The 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.

  • maxEditionSupply: undefined | 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.

    Default Value

    toBigNumber(0)

  • retainAuthority: undefined | boolean

    Wheter 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.

    Default Value

    true

  • goLiveDate: undefined | Option<DateTime>

    The 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).

    Default Value

    null

  • sellerFeeBasisPoints: number

    The royalties that should be set on minted NFTs in basis points

    Example

    { sellerFeeBasisPoints: 250 } // For 2.5% royalties.
    
  • price: Amount<Currency>

    The 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.

    Example

    { price: sol(1.5) } // For 1.5 SOL.
    { price: token(320, 2, MYTOKEN) } // For 3.2 MYTOKEN which is a 2-decimal token.
  • itemsAvailable: BigNumber

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

    Example

    { itemsAvailable: toBigNumber(1000) } // For 1000 items.
    
  • Optional candyMachine?: undefined | Signer

    The Candy Machine to create as a Signer. This expects a brand new Keypair with no associated account.

    Default Value

    Keypair.generate()

  • Optional authority?: undefined | PublicKey | Signer

    The authority that will be allowed to update the Candy Machine. Upon creation, passing the authority's public key is enough to set it. However, when also passing a collection to this operation, this authority will need to be passed as a Signer so the relevant instruction can be signed.

    Default Value

    metaplex.identity()

  • Optional collection?: undefined | Option<PublicKey>

    The mint address of the Collection NFT that all NFTs minted from this Candy Machine should be part of. When provided, the authority parameter will need to be passed as a Signer. When null, minted NFTs won't be part of a collection.

    Default Value

    null

Generated using TypeDoc