typescript-sdk

Home > @3rdweb/sdk > BundleDropModule > createBatch

BundleDropModule.createBatch() method

Create Many NFTs

Signature:

createBatch(metadatas: MetadataURIOrObject[]): Promise<string[]>;

Parameters

Parameter Type Description
metadatas MetadataURIOrObject[]  

Returns:

Promise<string[]>

Remarks

Create and mint NFTs.

Example

// Custom metadata of the NFTs to create
const metadatas = [{
  name: "Cool NFT",
  description: "This is a cool NFT",
  image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
}, {
  name: "Cool NFT",
  description: "This is a cool NFT",
  image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
}];

await module.createBatch(metadatas);