mintWithSignature
Mints ERC721 tokens to a specified address with a signature via a MintableERC721 module.
import { MintableERC721 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server// requires to be generated with a wallet that has the MINTER_ROLEconst { payload, signature } = await MintableERC721.generateMintSignature({ account, contract, nfts: [ { name: "My NFT", description: "My NFT", image: "https://example.com/image.png", }, ], mintRequest: { recipient: "0x...", }, }); // prepare the transaction, this is typically done on the client// can be executed by any walletconst transaction = MintableERC721.mintWithSignature({ contract, payload, signature,}); // Send the transactionawait sendTransaction({ transaction, account });
function mintWithSignature( payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>,
The options for minting tokens.
payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`;}>;
any, AbiFunction,>;
A transaction to mint tokens.