Skip to main content

IDelayedRevealDeprecated

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​

function encryptDecrypt(bytes data, bytes key) external pure returns (bytes result)

Performs XOR encryption/decryption.

Parameters​

NameTypeDescription
databytesThe data to encrypt. In the case of delayed-reveal NFTs, this is the "revealed" state base URI of the relevant batch of NFTs.
keybytesThe key with which to encrypt data

Returns​

NameTypeDescription
resultbytesundefined

encryptedBaseURI​

function encryptedBaseURI(uint256 identifier) external view returns (bytes)

Returns the encrypted base URI associated with the given identifier.

Parameters​

NameTypeDescription
identifieruint256undefined

Returns​

NameTypeDescription
_0bytesundefined

reveal​

function reveal(uint256 identifier, bytes key) external nonpayable returns (string revealedURI)

Reveals a batch of delayed reveal NFTs.

Parameters​

NameTypeDescription
identifieruint256The ID for the batch of delayed-reveal NFTs to reveal.
keybytesThe key with which the base URI for the relevant batch of NFTs was encrypted.

Returns​

NameTypeDescription
revealedURIstringundefined

Events​

TokenURIRevealed​

event TokenURIRevealed(uint256 indexed index, string revealedURI)

Emitted when tokens are revealed.

Parameters​

NameTypeDescription
index indexeduint256undefined
revealedURIstringundefined