Delayed Reveals
Delayed reveals are a way to show placeholder metadata for NFTs, and use a password to reveal the metadata at a later time.
Currently, delayed reveal is only supported on the NFT Drop contract.
For a step-by-step tutorial on how to set up an NFT Drop with delayed reveal, check out our guide: Release an NFT drop with delayed reveal without writing any code.
Create a delayed reveal
- React
- Javascript
- Python
- Go
// the real NFTs, these will be encrypted until your 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, until the reveal happens!
const placeholderNFT = {
name: "Hidden NFT",
description: "Will be revealed next week!"
};
// Create and encrypt the NFTs
await contract.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.revealer.reveal(batchId, "my secret password");
// the real NFTs, these will be encrypted until your 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, until the reveal happens!
const placeholderNFT = {
name: "Hidden NFT",
description: "Will be revealed next week!"
};
// Create and encrypt the NFTs
await contract.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.revealer.reveal(batchId, "my secret password");
Python SDK support for createDelayedRevealBatch is coming soon.
Want this feature sooner? Let us know in Discord!
Go SDK support for createDelayedRevealBatch is coming soon.
Want this feature sooner? Let us know in Discord!
View Unrevealed Batches
- React
- Javascript
- Python
- Go
const batches = await contract.revealer.getBatchesToReveal();
const batches = await contract.revealer.getBatchesToReveal();
Python SDK support for getBatchesToReveal is coming soon.
Want this feature sooner? Let us know in Discord!
Go SDK support for getBatchesToReveal is coming soon.
Want this feature sooner? Let us know in Discord!
Reveal Hidden NFTs
- React
- Javascript
- Python
- Go
// the batch to reveal
const batchId = 0;
// reveal the batch
await contract.revealer.reveal(batchId, "my secret password");
// the batch to reveal
const batchId = 0;
// reveal the batch
await contract.revealer.reveal(batchId, "my secret password");
Python SDK support for reveal is coming soon.
Want this feature sooner? Let us know in Discord!
Go SDK support for reveal is coming soon.
Want this feature sooner? Let us know in Discord!