getBatchesToReveal

Retrieves the batches available to reveal in an NFT contract.

Example

import { getBatchesToReveal } from "thirdweb/extensions/erc721";
const batches = await getBatchesToReveal({ contract: contract });
const { transactionHash } = await sendTransaction({
transaction,
account,
});
function getBatchesToReveal(
): Promise<Array<BatchToReveal>>;

Parameters

{BaseTransactionOptions} - The transaction options.

Type

let options: { contract: ThirdwebContract<abi> } & T;

Returns

let returnType: {
batchId: bigint;
batchUri: string;
placeholderMetadata: NFTMetadata;
};

A promise resolving to an array of unrevealed batches.

Use the batchId and corresponding password for each batch to reveal it with reveal . reveal