generateMintSignature
Generates a mint signature for a given mint request to be used with a MintableERC20 module.
import { MintableERC20 } 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 MintableERC20.generateMintSignature({ account, contract, mintRequest: { recipient: "0x...", quantity: "10", }, }); // prepare the transaction, this is typically done on the client// can be executed by any walletconst transaction = MintableERC20.mintWithSignature({ contract, payload, signature,}); // Send the transactionawait sendTransaction({ transaction, account });
function generateMintSignature(): Promise<{ payload: { amount: bigint; data: `0x${string}`; to: `0x${string}` }; signature: `0x${string}`;}>;
The options for minting tokens.
let options: { contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput;};