Skip to main content

Signature-Based Minting

Signature-based minting, or "on-demand minting" allows you, (the admin wallet) to generate signatures that allow other users to mint tokens on your smart contract.

This allows you to check any on-chain or off-chain conditions before allowing a user to mint a token from/into your smart contract.

Read the full design document to explore how signature-based minting works at the smart contract level below.

Resources

How it works:

  1. Wallet A generates a signature for a token (specifying name, image, description, properties, and minter address).
  2. Wallet B can use the signature provided by Wallet A to mint the NFT.

You can grant signatures for specific wallets to mint tokens with properties you specify in your contract.

For example, you could grant a signature for a wallet to mint an NFT that contains their Discord profile picture, and only grant a signature if that person is a member of your Discord server, like we do in our on-demand minting example.

Prebuilt Contracts

Some prebuilt contracts have signature-based minting capabilities built in.

Signature Drop

The signature drop contract allows signature-based claiming.

This means they can claim lazy-minted NFT(s) with the generated signature.

// see how to craft a payload to sign in the `contract.signature.generate()` documentation
const signedPayload = contract.signature.generate(payload);

// now anyone can mint the NFT
const tx = contract.signature.mint(signedPayload);
const receipt = tx.receipt; // the mint transaction receipt
const mintedId = tx.id; // the id of the NFT minted
View in React SDK Documentation

ERC721

Generate signatures for users to mint new NFTs in your collection

This feature is missing a code snippet or might not be supported yet.

Check the React SDK Reference for more information.

Reach out on Discord for further assistance!

ERC1155

This feature is missing a code snippet or might not be supported yet.

Check the React SDK Reference for more information.

Reach out on Discord for further assistance!

ERC20

This feature is missing a code snippet or might not be supported yet.

Check the React SDK Reference for more information.

Reach out on Discord for further assistance!