Class CandyMachineClient

This is a client for the Candy Machine V3 module.

It enables us to interact with the Candy Machine V3 and Candy Guard programs in order to create, update, delete and mint from Candy Machines as well as registering your own custom Candy Guards.

You may access this client via the candyMachines() method of your Metaplex instance.

const candyMachineClient = metaplex.candyMachines();

Example

You can create a new Candy Machine with minimum input like so. By default, the current identity of the Metaplex instance will be the authority of the Candy Machine and it will immediately create a Candy Guard linked to the new Candy Machine.

 const { candyMachine } = await metaplex
.candyMachines()
.create({
itemsAvailable: toBigNumber(5000),
sellerFeeBasisPoints: 333, // 3.33%
collection: {
address: collectionNft.address,
updateAuthority: collectionUpdateAuthority,
},
});

See

CandyGuard The CandyGuard model

Hierarchy

  • CandyMachineClient

Properties

metaplex: Metaplex

Constructors

Methods

Generated using TypeDoc