Skip to main content

useLazyMint

This feature is currently in beta and may change based on feedback that we receive.

Use this to lazy mint a batch of NFTs on your DropContract

Signature:

export declare function useLazyMint<TContract extends DropContract>(contract: RequiredParam<TContract>, onProgress?: (progress: UploadProgressEvent) => void): import("@tanstack/react-query").UseMutationResult<import("@thirdweb-dev/sdk").TransactionResultWithId<{
[x: string]: unknown;
name?: string | number | undefined;
description?: string | null | undefined;
image?: string | null | undefined;
external_url?: string | null | undefined;
animation_url?: string | null | undefined;
background_color?: string | undefined;
properties?: {
[x: string]: unknown;
} | {
[x: string]: unknown;
}[] | undefined;
attributes?: {
[x: string]: unknown;
} | {
[x: string]: unknown;
}[] | undefined;
id: string;
uri: string;
}>[], unknown, {
metadatas: NFTMetadataInput[];
}, unknown>;

Parameters

ParameterTypeDescription
contractRequiredParam<TContract>an instance of a NFTContract with the drop extension
onProgress(progress: UploadProgressEvent) => void(Optional) an optional callback that will be called with the progress of the upload

Returns:

import("@tanstack/react-query").UseMutationResult<import("@thirdweb-dev/sdk").TransactionResultWithId<{ [x: string]: unknown; name?: string | number | undefined; description?: string | null | undefined; image?: string | null | undefined; external_url?: string | null | undefined; animation_url?: string | null | undefined; background_color?: string | undefined; properties?: { [x: string]: unknown; } | { [x: string]: unknown; }[] | undefined; attributes?: { [x: string]: unknown; } | { [x: string]: unknown; }[] | undefined; id: string; uri: string; }>[], unknown, { metadatas: NFTMetadataInput[]; }, unknown>

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