generateMintSignature
Generates the payload and signature for minting an ERC20 token.
import { mintWithSignature, generateMintSignature,} from "thirdweb/extensions/erc20"; const { payload, signature } = await generateMintSignature({ account, contract, mintRequest: { to: "0x...", quantity: "10", },}); const transaction = mintWithSignature({ contract, payload, signature,});await sendTransaction({ transaction, account });
function generateMintSignature(): Promise<{ payload: { currency: string; price: bigint; primarySaleRecipient: string; quantity: bigint; to: string; uid: `0x${string}`; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`;}>;
The options for the minting process.
let options: { contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput;};
let returnType: Promise<{ payload: { currency: string; price: bigint; primarySaleRecipient: string; quantity: bigint; to: string; uid: `0x${string}`; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`;}>;
A promise that resolves to the payload and signature.