typescript-sdk

Home > @3rdweb/sdk > BundleModule > createAndMintBatch

BundleModule.createAndMintBatch() method

Mint Many NFTs

Signature:

createAndMintBatch(metadataWithSupply: INFTBundleCreateArgs[]): Promise<BundleMetadata[]>;

Parameters

Parameter Type Description
metadataWithSupply INFTBundleCreateArgs[]  

Returns:

Promise<BundleMetadata[]>

Remarks

Mint many different NFTs with specified supplies.

Example

// Custom metadata and supplies of your NFTs
const metadataWithSupply = [{
  supply: 1, // The number of this NFT you want to mint
  metadata: {
    name: "Cool NFT #1",
    description: "This is a cool NFT",
    image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
  },
}, {
  supply: 1,
  metadata: {
    name: "Cool NFT #2",
    description: "This is a cool NFT",
    image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
  },
}];

await module.createAndMintBatch(metadataWithSupply);