Skip to main content

Erc721WithQuantitySignatureMintable.verify() method

Verify that a payload is correctly signed


const nftMetadata = {
name: "Cool NFT #1",
description: "This is a cool NFT",
image: fs.readFileSync("path/to/image.png"), // This can be an image url or file

const startTime = new Date();
const endTime = new Date( + 60 * 60 * 24 * 1000);
const payload = {
metadata: nftMetadata, // The NFT to mint
to: {{wallet_address}}, // Who will receive the NFT
quantity: 2, // the quantity of NFTs to mint
price: 0.5, // the price per NFT
currencyAddress: NATIVE_TOKEN_ADDRESS, // the currency to pay with
mintStartTime: startTime, // can mint anytime from now
mintEndTime: endTime, // to 24h from now
royaltyRecipient: "0x...", // custom royalty recipient for this NFT
royaltyBps: 100, // custom royalty fees for this NFT (in bps)
primarySaleRecipient: "0x...", // custom sale recipient for this NFT

const signedPayload = await contract.erc721.signature.generate(payload);
// Now you can verify if the signed payload is valid
const isValid = await contract.erc721.signature.verify(signedPayload);


verify(signedPayload: SignedPayload721WithQuantitySignature): Promise<boolean>;


signedPayloadSignedPayload721WithQuantitySignaturethe payload to verify