import {
mintWithSignature,
generateMintSignature,
} from "thirdweb/extensions/erc721";
const { payload, signature } = await generateMintSignature({
account,
contract,
mintRequest: {
to: "0x...",
metadata: {
name: "My NFT",
description: "This is my NFT",
image: "https://example.com/image.png",
},
},
});
const transaction = mintWithSignature({
contract,
payload,
signature,
});
await sendTransaction({ transaction, account });