useRevealLazyMint
Hook for revealing a batch of delayed reveal NFTs using delayed reveal .
Available to use on contracts that implement the ERC721Revealable or ERC1155Revealable interfaces.
import { useRevealLazyMint } from "@thirdweb-dev/react"; const { mutateAsync, isLoading, error } = useRevealLazyMint(contract);
import { useContract, useRevealLazyMint, Web3Button,} from "@thirdweb-dev/react"; function App() { // Contract must be an ERC-721 or ERC-1155 contract that implements the ERC721Revealable or ERC1155Revealable interface const { contract } = useContract(contractAddress); const { mutateAsync: revealLazyMint, isLoading, error, } = useRevealLazyMint(contract); return ( <Web3Button contractAddress={contractAddress} action={() => revealLazyMint({ batchId: "{{batch_id}}", // ID of the batch to reveal (use useBatchesToReveal to get the batch IDs) password: "{{password}}", // Password to reveal the batch }) } > Reveal Lazy Mint </Web3Button> );}
contract: RequiredParam<TContract>,): UseMutationResult< Omit< { data: () => Promise<unknown>; receipt: providers.TransactionReceipt; }, "data" >, unknown, unknown>;
let returnType: UseMutationResult< Omit< { data: () => Promise<unknown>; receipt: providers.TransactionReceipt; }, "data" >, unknown, unknown>;