Type alias UpdateCandyMachineInput<T>

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

Type Parameters

Type declaration

  • candyMachine: PublicKey | CandyMachine<T>

    The Candy Machine to update.

    This can either be a Candy Machine instance or its address. When passing its address, you will need to provide enough input so the SDK knows what to update.

    For instance, if you only want to update the creators array of the Candy Machine, you will also need to provide all other Candy Machine data such as its symbol, its sellerFeeBasisPoints, etc.

    That's because the program requires all data to be provided at once when updating. The SDK will raise an error if you don't provide enough data letting you know what's missing.

    Alternatively, if you provide a Candy Machine instance, the SDK will use its current data to fill all the gaps so you can focus on what you want to update.

  • Optional candyGuard?: PublicKey

    The address of the Candy Guard associated to the Candy Machine, if any. This is only required if candyMachine is provided as an address and you are trying to update the guards or groups parameters.

    Default Value

    candyMachine.candyGuard?.address

  • Optional authority?: Signer

    The Signer authorized to update the Candy Machine.

    Default Value

    metaplex.identity()

  • Optional candyGuardAuthority?: Signer

    The Signer authorized to update the associated Candy Guard, if any. This is typically the same as the Candy Machine authority.

    Default Value

    Defaults to the authority parameter.

  • Optional newAuthority?: PublicKey

    The new authority that will be allowed to manage the Candy Machine. This includes updating its data, authorities, inserting items, etc.

    Warning: This means the current authority Signer will no longer be able to manage the Candy Machine.

    Note that if your Candy Machine has a Candy Guard associated to it, you might want to also update the Candy Guard's authority using the newCandyGuardAuthority parameter.

    Default Value

    Defaults to not being updated.

  • Optional newMintAuthority?: Signer

    The new authority that will be able to mint from this Candy Machine.

    This must be a Signer to ensure Candy Guards are not used to mint from unexpected Candy Machines as some of its guards could have side effects.

    Default Value

    Defaults to not being updated.

  • Optional newCandyGuardAuthority?: PublicKey

    The new authority that will be allowed to manage the Candy Guard account associated with the Candy Machine.

    Warning: This means the current Candy Guard authority Signer will no longer be able to manage the Candy Guard account.

    Default Value

    Defaults to not being updated.

  • Optional collection?: {
        address: PublicKey;
        updateAuthority: Signer;
        currentCollectionAddress?: PublicKey;
    }

    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.

    If the candyMachine attribute is passed as a PublicKey, you will also need to provide the mint address of the current collection that will be overriden.

    Default Value

    Defaults to not being updated.

    • address: PublicKey

      The mint address of the collection.

    • updateAuthority: Signer

      The update authority of the collection as a Signer.

    • Optional currentCollectionAddress?: PublicKey

      The mint address of the current collection that will be overriden.

  • Optional sellerFeeBasisPoints?: number

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

    Default Value

    Defaults to not being updated.

  • Optional itemsAvailable?: BigNumber

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

    Default Value

    Defaults to not being updated.

  • 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 not being updated.

    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

    Defaults to not being updated.

  • 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

    Defaults to not being updated.

  • 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

    Defaults to not being updated.

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

    Array of creators that should be set on minted NFTs.

    Default Value

    Defaults to not being updated.

    See

    Creator

  • Optional guards?: Partial<T>

    The settings of all guards we wish to activate.

    Note that this will override the existing guards settings so you must provide all guards you wish to activate.

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

    Default Value

    Defaults to not being updated.

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

    Note that this will override the existing groups settings so you must provide all groups and guards you wish to activate.

    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.

    You may disable groups by providing an empty array [].

    Default Value

    Defaults to not being updated.

Generated using TypeDoc