Type alias CreateCandyMachineInput<T>

CreateCandyMachineInput<T>: {
    collection: {
        address: PublicKey;
        updateAuthority: Signer;
    };
    sellerFeeBasisPoints: number;
    itemsAvailable: BigNumber;
    candyMachine?: Signer;
    authority?: PublicKey | Signer;
    itemSettings?: CandyMachineHiddenSettings | CandyMachineConfigLineSettings;
    symbol?: string;
    maxEditionSupply?: BigNumber;
    isMutable?: boolean;
    creators?: Omit<Creator, "verified">[];
    guards?: Partial<T>;
    groups?: {
        label: string;
        guards: Partial<T>;
    }[];
    withoutCandyGuard?: boolean;
}

Type Parameters

Type declaration

  • collection: {
        address: PublicKey;
        updateAuthority: Signer;
    }

    The Collection NFT that all NFTs minted from this Candy Machine should be part of. This must include its address and the update authority as a Signer.

    Example

    If you do not have a Collection NFT yet, you can create one using the create method of the NFT module and setting isCollection to true.

    const { nft } = await metaplex.
    .nfts()
    .create({ isCollection: true, name: 'My Collection', ... });

    You can now use nft.address as the address of the collection and provide the update authority as a signer, which by default, should be metaplex.identity().

  • sellerFeeBasisPoints: number

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

    Example

    { sellerFeeBasisPoints: 250 } // For 2.5% royalties.
    
  • itemsAvailable: BigNumber

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

    Example

    { itemsAvailable: toBigNumber(1000) } // For 1000 items.
    
  • Optional candyMachine?: 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?: PublicKey | Signer

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

    By default, it is required as a Signer in order to create and wrap its Candy Guard. However, when withoutCandyGuard is set to true, it may be provided as a PublicKey instead.

    Default Value

    metaplex.identity()

  • Optional itemSettings?: CandyMachineHiddenSettings | CandyMachineConfigLineSettings

    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.

    Default Value

    Defaults to using configLines settings with:

    • No prefixes.
    • A length of 32 for the name.
    • A length of 200 for the URI.
    • Random mint ordering.
    {
    itemSettings: {
    type: 'configLines',
    prefixName: '',
    nameLength: 32,
    prefixUri: '',
    uriLength: 200,
    isSequential: false,
    }
    }

    See

  • Optional 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.

    Default Value

    ""

  • Optional 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.

    Default Value

    toBigNumber(0)

  • Optional 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.

    Default Value

    true

  • Optional creators?: Omit<Creator, "verified">[]

    Array of creators that should be set on minted NFTs.

    See

    Creator

    Default Value

    Defaults to using the authority parameter as the only creator.

    [{ address: authority, share: 100 }]
    
  • Optional guards?: Partial<T>

    The settings of all guards we wish to activate.

    Any guard not provided or set to null will be disabled.

    This parameter is ignored if withoutCandyGuard is set to true.

    Default Value

    {}, i.e. no guards are activated.

  • Optional groups?: {
        label: string;
        guards: Partial<T>;
    }[]

    This parameter allows us to create multiple minting groups that have their own set of requirements — i.e. guards.

    When groups are provided, the guards parameter becomes a set of default guards that will be applied to all groups. If a specific group enables a guard that is also present in the default guards, the group's guard will override the default guard.

    For each group, any guard not provided or set to null will be disabled.

    This parameter is ignored if withoutCandyGuard is set to true.

    Default Value

    [], i.e. no groups are created.

  • Optional withoutCandyGuard?: boolean

    Whether to skip the part of this operation that creates a Candy Guard for the new Candy Machine. When set to true, no Candy Guard will be created for the Candy Machine.

    Default Value

    false

Generated using TypeDoc