Erc1155.revealer property
Delayed reveal
Example
// the real NFTs, these will be encrypted until you reveal them
const realNFTs = [
{
name: "Common NFT #1",
description: "Common NFT, one of many.",
image: fs.readFileSync("path/to/image.png"),
},
{
name: "Super Rare NFT #2",
description: "You got a Super Rare NFT!",
image: fs.readFileSync("path/to/image.png"),
},
];
// A placeholder NFT that people will get immediately in their wallet, and will be converted to the real NFT at reveal time
const placeholderNFT = {
name: "Hidden NFT",
description: "Will be revealed next week!",
};
// Create and encrypt the NFTs
await contract.erc1155.drop.revealer.createDelayedRevealBatch(
placeholderNFT,
realNFTs,
"my secret password",
);
// Whenever you're ready, reveal your NFTs at any time
const batchId = 0; // the batch to reveal
await contract.erc1155.revealer.reveal(batchId, "my secret password");
Signature:
get revealer(): import("./delayed-reveal").DelayedReveal<import("../../types/eips").BaseDelayedRevealERC1155>;
Remarks
Create a batch of encrypted NFTs that can be revealed at a later time.