Function useDelayedRevealLazyMint

  • Beta

    Lazy mint NFTs with delayed reveal

    Type Parameters

    Parameters

    • contract: RequiredParam<TContract>

      an instance of a DropContract

    • Optional onProgress: ((progress) => void)

      an optional callback that will be called with the progress of the upload

        • (progress): void
        • Parameters

          • progress: UploadProgressEvent

          Returns void

    Returns UseMutationResult<TransactionResultWithId[], unknown, DelayedRevealLazyMintInput, unknown>

    a mutation object that can be used to lazy mint a batch of NFTs

    Example

    const Component = () => {
    const { contract } = useContract("{{contract_address}}");
    const {
    mutate: delayedRevealLazyMint,
    isLoading,
    error,
    } = useDelayedRevealLazyMint(contract);

    if (error) {
    console.error("failed to lazy mint NFT", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={() => delayedRevealLazyMint({ metadatas: [{ name: "My NFT!"}] })}
    >
    Delayed Reveal Lazy mint NFT!
    </button>
    );
    };

    Twfeature

    ERC721Revealable | ERC1155Revealable

    See

    Documentation

Generated using TypeDoc