Erc1155
Standard ERC1155 NFT functions
Basic functionality for a ERC1155 contract that handles IPFS storage for you.
const contract = await sdk.getContract("{{contract_address}}");await contract.erc1155.transfer(walletAddress, tokenId, quantity);
class Erc1155< T extends DropERC1155 | TokenERC1155 | BaseERC1155 = | BaseERC1155 | BaseSignatureMintERC1155, > implements UpdateableNetwork, DetectableFeature {}
function constructor( contractWrapper: ContractWrapper<T>, chainId: number,
Get NFT balance of a specific wallet
Get a wallets NFT balance (number of NFTs in this contract owned by the wallet).
// Address of the wallet to check NFT balanceconst walletAddress = "{{wallet_address}}";const tokenId = 0; // Id of the NFT to checkconst balance = await contract.erc1155.balanceOf( walletAddress, tokenId,);
function balanceOf( address: string, tokenId: BigNumberish,): Promise<BigNumber>;
Get all NFTs
Get all the data associated with every NFT in this contract.
By default, returns the first 100 NFTs, use queryParams to fetch more.
const nfts = await contract.erc1155.getAll();
function getAll(queryParams?: { count?: number; start?: number;
The NFT metadata for all NFTs queried.
Use contract.erc1155.claim.prepare(...args)
instead
Construct a claim transaction without executing it. This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution.
function getClaimTransaction( destinationAddress: string, tokenId: BigNumberish, quantity: BigNumberish,): Promise<>;
let returnType: Promise<>;
Use contract.erc1155.mint.prepare(...args)
instead
Construct a mint transaction without executing it. This is useful for estimating the gas cost of a mint transaction, overriding transaction options and having fine grained control over the transaction execution.
function getMintTransaction(receiver: string, metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }) : Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>
The metadata of the NFT you want to mint
let metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }
let returnType: Promise<>;
Get all NFTs owned by a specific wallet
Get all the data associated with the NFTs owned by a specific wallet.
// Address of the wallet to get the NFTs ofconst address = "{{wallet_address}}";const nfts = await contract.erc1155.getOwned(address);
function getOwned( walletAddress?: string, queryParams?: { count?: number; start?: number },
The NFT metadata for all NFTs in the contract.
Get the total supply of a specific NFT
This is not the sum of supply of all NFTs in the contract.
function totalCirculatingSupply( tokenId: BigNumberish,): Promise<BigNumber>;
Get the total number of NFTs minted
This returns the total number of NFTs minted in this contract, not the total supply of a given token.
const count = await contract.erc1155.totalCount();console.log(count);
function totalCount(): Promise<BigNumber>;
Get the total supply of a specific token
const tokenId = 0;const nft = await contract.erc1155.totalSupply(tokenId);
function totalSupply(tokenId: BigNumberish): Promise<BigNumber>;
function airdrop( tokenId: BigNumberish, addresses: | Array<string> | Array<{ address: string; quantity?: string | number }>, fromAddress: string, data: BytesLike,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling airdrop.prepare()
with same arguments. Learn more
function burn( tokenId: BigNumberish, amount: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling burn.prepare()
with same arguments. Learn more
function burnBatch( tokenIds: Array<BigNumberish>, amounts: Array<BigNumberish>,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling burnBatch.prepare()
with same arguments. Learn more
function burnBatchFrom( account: string, tokenIds: Array<BigNumberish>, amounts: Array<BigNumberish>,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling burnBatchFrom.prepare()
with same arguments. Learn more
function burnFrom( account: string, tokenId: BigNumberish, amount: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling burnFrom.prepare()
with same arguments. Learn more
function claim( tokenId: BigNumberish, quantity: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling claim.prepare()
with same arguments. Learn more
function claimTo( destinationAddress: string, tokenId: BigNumberish, quantity: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling claimTo.prepare()
with same arguments. Learn more
function lazyMint(metadatas: Array<string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">)>, options: { onProgress: (event: UploadProgressEvent) => void }) : Promise<TResult>
let metadatas: Array<string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">)>
Preparable
You can also prepare the transaction without executing it by calling lazyMint.prepare()
with same arguments. Learn more
function mint(metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }) : Promise<TResult>
let metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }
Preparable
You can also prepare the transaction without executing it by calling mint.prepare()
with same arguments. Learn more
function mintAdditionalSupply( tokenId: BigNumberish, additionalSupply: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling mintAdditionalSupply.prepare()
with same arguments. Learn more
function mintAdditionalSupplyTo( receiver: string, tokenId: BigNumberish, additionalSupply: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling mintAdditionalSupplyTo.prepare()
with same arguments. Learn more
function mintBatch(metadataWithSupply: Array<{ metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<...>>>; description: ZodNullable<ZodOptional<ZodNullable<...>>>; image: ZodOptional<ZodNullable<ZodUnion<...>>>; name: ZodNullable<ZodOptional<ZodUnion<...>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<...>>>; background_color: ZodNullable<ZodOptional<ZodUnion<...>>>; external_url: ZodOptional<ZodNullable<ZodUnion<...>>>; properties: ZodNullable<ZodOptional<ZodUnion<...>>> }>, ZodUnion<[ZodEffects<ZodUnion<[..., ..., ...]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }>) : Promise<TResult>
let metadataWithSupply: Array<{ metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<...>>>; description: ZodNullable<ZodOptional<ZodNullable<...>>>; image: ZodOptional<ZodNullable<ZodUnion<...>>>; name: ZodNullable<ZodOptional<ZodUnion<...>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<...>>>; background_color: ZodNullable<ZodOptional<ZodUnion<...>>>; external_url: ZodOptional<ZodNullable<ZodUnion<...>>>; properties: ZodNullable<ZodOptional<ZodUnion<...>>> }>, ZodUnion<[ZodEffects<ZodUnion<[..., ..., ...]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }>
Preparable
You can also prepare the transaction without executing it by calling mintBatch.prepare()
with same arguments. Learn more
function mintBatchTo(receiver: string, metadataWithSupply: Array<{ metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<...>>>; description: ZodNullable<ZodOptional<ZodNullable<...>>>; image: ZodOptional<ZodNullable<ZodUnion<...>>>; name: ZodNullable<ZodOptional<ZodUnion<...>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<...>>>; background_color: ZodNullable<ZodOptional<ZodUnion<...>>>; external_url: ZodOptional<ZodNullable<ZodUnion<...>>>; properties: ZodNullable<ZodOptional<ZodUnion<...>>> }>, ZodUnion<[ZodEffects<ZodUnion<[..., ..., ...]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }>) : Promise<TResult>
let metadataWithSupply: Array<{ metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<...>>>; description: ZodNullable<ZodOptional<ZodNullable<...>>>; image: ZodOptional<ZodNullable<ZodUnion<...>>>; name: ZodNullable<ZodOptional<ZodUnion<...>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<...>>>; background_color: ZodNullable<ZodOptional<ZodUnion<...>>>; external_url: ZodOptional<ZodNullable<ZodUnion<...>>>; properties: ZodNullable<ZodOptional<ZodUnion<...>>> }>, ZodUnion<[ZodEffects<ZodUnion<[..., ..., ...]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }>
Preparable
You can also prepare the transaction without executing it by calling mintBatchTo.prepare()
with same arguments. Learn more
function mintTo(receiver: string, metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }) : Promise<TResult>
let metadataWithSupply: { metadata: string | (objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; name: ZodNullable<ZodOptional<ZodUnion<[..., ...]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[..., ..., ...]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<..., ..., ...>, ZodType<..., ..., ...>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">); supply: string | number | bigint | (BigNumber) }
Preparable
You can also prepare the transaction without executing it by calling mintTo.prepare()
with same arguments. Learn more
function setApprovalForAll( operator: string, approved: boolean,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling setApprovalForAll.prepare()
with same arguments. Learn more
function transfer( to: string, tokenId: BigNumberish, amount: BigNumberish, data: BytesLike,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling transfer.prepare()
with same arguments. Learn more
function transferBatch( to: string, tokenIds: Array<BigNumberish>, amounts: Array<BigNumberish>, fromAddress: string, data: BytesLike,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling transferBatch.prepare()
with same arguments. Learn more
function transferFrom( from: string, to: string, tokenId: BigNumberish, amount: BigNumberish, data: BytesLike,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling transferFrom.prepare()
with same arguments. Learn more
function updateMetadata(tokenId: BigNumberish, metadata: objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">) : Promise<TResult>
let metadata: objectInputType<extendShape<{ animation_url: ZodNullable<ZodOptional<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; description: ZodNullable<ZodOptional<ZodNullable<ZodString>>>; image: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; name: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodNumber]>>> }, { attributes: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>>; background_color: ZodNullable<ZodOptional<ZodUnion<[ZodString, ZodEffects<ZodString, string, string>, ZodString]>>>; external_url: ZodOptional<ZodNullable<ZodUnion<[ZodUnion<[..., ...]>, ZodString]>>>; properties: ZodNullable<ZodOptional<ZodUnion<[ZodEffects<ZodArray<..., ...>, Array<...>, Array<...>>, ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodObject<{ }, "strip", ZodUnion<...>, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>]>>> }>, ZodUnion<[ZodEffects<ZodUnion<[ZodBigInt, ZodType<BigNumber, ZodTypeDef, BigNumber>, ZodType<BN, ZodTypeDef, BN>]>, string, bigint | (BN) | (BigNumber)>, ZodUnknown]>, "strip">
Preparable
You can also prepare the transaction without executing it by calling updateMetadata.prepare()
with same arguments. Learn more
let chainId: number;
Configure claim conditions
Define who can claim NFTs in the collection, when and how many.
const presaleStartTime = new Date();const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);const claimConditions = [ { startTime: presaleStartTime, // start the presale now maxClaimableSupply: 2, // limit how many mints for this presale price: 0.01, // presale price snapshot: ['0x...', '0x...'], // limit minting to only certain addresses }, { startTime: publicSaleStartTime, // 24h after presale, start public sale price: 0.08, // public sale price }]);await contract.erc1155.claimConditions.set(tokenId, claimConditions);
Mint delayed reveal NFTs
Create a batch of encrypted NFTs that can be revealed at a later time.
// the real NFTs, these will be encrypted until you reveal themconst 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 timeconst placeholderNFT = { name: "Hidden NFT", description: "Will be revealed next week!",};// Create and encrypt the NFTsawait contract.erc1155.drop.revealer.createDelayedRevealBatch( placeholderNFT, realNFTs, "my secret password",);// Whenever you're ready, reveal your NFTs at any timeconst batchId = 0; // the batch to revealawait contract.erc1155.revealer.reveal(batchId, "my secret password");
Mint with signature
Generate dynamic NFTs with your own signature, and let others mint them using that signature.
// see how to craft a payload to sign in the `contract.erc1155.signature.generate()` documentationconst signedPayload = contract.erc1155.signature().generate(payload); // now anyone can mint the NFTconst tx = contract.erc1155.signature.mint(signedPayload);const receipt = tx.receipt; // the mint transaction receiptconst mintedId = tx.id; // the id of the NFT minted