DelayedReveal
Delayed Reveal
Thirdweb's DelayedReveal
is a contract extension for base NFT contracts. It lets you create batches of 'delayed-reveal' NFTs. You can learn more about the usage of delayed reveal NFTs here - https://blog.thirdweb.com/delayed-reveal-nfts
Methods
encryptDecrypt
Encrypt/decrypt data on chain.
Encrypt/decrypt given data
with key
. Uses inline assembly. See: https://ethereum.stackexchange.com/questions/69825/decrypt-message-on-chain
Parameters
data
bytes
Bytes of data to encrypt/decrypt.
key
bytes
Secure key used by caller for encryption/decryption.
Returns
result
bytes
Output after encryption/decryption of given data.
encryptedData
Mapping from tokenId of a batch of tokens => to delayed reveal data.
Parameters
_0
uint256
undefined
Returns
_0
bytes
undefined
getRevealURI
Returns revealed URI for a batch of NFTs.
Reveal encrypted base URI for _batchId
with caller/admin's _key
used for encryption. Reverts if there's no encrypted URI for _batchId
. See {encryptDecrypt}.
Parameters
_batchId
uint256
ID of the batch for which URI is being revealed.
_key
bytes
Secure key used by caller/admin for encryption of baseURI.
Returns
revealedURI
string
Decrypted base URI.
isEncryptedBatch
Returns whether the relvant batch of NFTs is subject to a delayed reveal.
Returns true
if _batchId
's base URI is encrypted.
Parameters
_batchId
uint256
ID of a batch of NFTs.
Returns
_0
bool
undefined
reveal
Reveals a batch of delayed reveal NFTs.
Parameters
identifier
uint256
The ID for the batch of delayed-reveal NFTs to reveal.
key
bytes
The key with which the base URI for the relevant batch of NFTs was encrypted.
Returns
revealedURI
string
undefined
Events
TokenURIRevealed
Parameters
index indexed
uint256
undefined
revealedURI
string
undefined
Last updated