generateMintSignature

Generates the payload and signature for minting an ERC1155 token.

Example

import {
mintWithSignature,
generateMintSignature,
} from "thirdweb/extensions/erc1155";
const { payload, signature } = await generateMintSignature({
account,
contract,
mintRequest: {
to: "0x...",
quantity: 10n,
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 });

Parameters

Returns

A promise that resolves to the payload and signature.