generateAirdropSignatureERC721
Generates the req and signature for sending ERC721 airdrop.
import { airdropERC721WithSignature, generateAirdropSignatureERC721,} from "thirdweb/extensions/airdrop"; // list of recipients and tokenIds to airdrop for each recipientconst contents = [ { recipient: "0x...", tokenId: 0 }, { recipient: "0x...", tokenId: 1 }, { recipient: "0x...", tokenId: 2 },]; const { req, signature } = await generateAirdropSignatureERC721({ account, contract, airdropRequest: { tokenAddress: "0x...", // address of the ERC721 token to airdrop contents, },}); const transaction = airdropERC721WithSignature({ contract, req, signature,});await sendTransaction({ transaction, account });
function generateAirdropSignatureERC721(options: GenerateAirdropERC721SignatureOptions) : Promise<{ req: { contents: readonly Array<{ recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }>
The options for the airdrop.
let options: { airdropRequest: GenerateReqInput;};