typescript-sdk

Home > @3rdweb/sdk > NFTModule > mintBatchTo

NFTModule.mintBatchTo() method

Mint Many NFTs

Signature:

mintBatchTo(to: string, metadatas: MetadataURIOrObject[]): Promise<NFTMetadata[]>;

Parameters

Parameter Type Description
to string  
metadatas MetadataURIOrObject[]  

Returns:

Promise<NFTMetadata[]>

Remarks

Mint many NFTs at once to a specified wallet.

Example

// Address of the wallet you want to mint the NFT to
const toAddress = ""

// Custom metadata of the NFTs you want to mint.
const metadatas = [{
  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
}, {
  name: "Cool NFT #2",
  description: "This is a cool NFT",
  image: fs.readFileSync("path/to/other/image.png"),
}];

await module.mintBatchTo(toAddress, metadatas);