generateMintSignature

Generates the payload and signature for minting an ERC721 token.

Example

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 });
function generateMintSignature(
): Promise<SignPayloadResult<T>>;

Parameters

The options for the minting process.

Type

Returns

let returnType: Promise<SignPayloadResult<T>>;

A promise that resolves to the payload and signature.