Home > @3rdweb/sdk > NFTModule > mintTo
Mint NFT
Signature:
mintTo(to: string, metadata: MetadataURIOrObject): Promise<NFTMetadata>;
Parameter | Type | Description |
---|---|---|
to | string | |
metadata | MetadataURIOrObject |
Returns:
Promise<NFTMetadata>
Mint an NFT to a specified wallet.
// Address of the wallet you want to mint the NFT to
const toAddress = ""
// Custom metadata of the NFT, note that you can fully customize this metadata with other properties.
const metadata = {
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.mintTo(toAddress, metadata);