typescript-sdk

Home > @3rdweb/sdk > DropModule

DropModule class

Setup a collection of one-of-one NFTs that are minted as users claim them.

Signature:

export declare class DropModule extends ModuleWithRoles<DropV2> implements ITransferable 

Extends: ModuleWithRoles<DropV2>

Implements: ITransferable

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the DropModule class.

Example

import { ThirdwebSDK } from "@3rdweb/sdk";

// You can switch out this provider with any wallet or provider setup you like.
const provider = ethers.Wallet.createRandom();
const sdk = new ThirdwebSDK(provider);
const module = sdk.getDropModule("");

Properties

Property Modifiers Type Description
moduleType static ModuleType  
roles static readonly [“admin”, “minter”, “transfer”]  

Methods

Method Modifiers Description
balance()    
balanceOf(address)   Get NFT Balance
burn(tokenId)    
canClaim(quantity, addressToCheck)   Can Claim
claim(quantity, proofs)   Claim NFTs
claimTo(quantity, addressToClaim, proofs)   Claim NFTs to Wallet
createBatch(metadatas)   (BETA) Create batch allows you to create a batch of tokens in one transaction. This function can only be called once per module at the moment.
createDelayedRevealBatch(placeholder, metadatas, password)   Create batch allows you to create a batch of tokens in one transaction. This function can only be called once per module at the moment.
get(tokenId)    
getActiveClaimCondition()    
getActiveMintCondition()    
getAll(queryParams)   Get All NFTs
getAllClaimConditions()    
getAllClaimed(queryParams)    
getAllMintConditions()    
getAllUnclaimed(queryParams)    
getBatchesToReveal()   Gets a list of token uris that needs to be revealed.
getClaimConditionsFactory()   Creates a claim condition factory
getClaimIneligibilityReasons(quantity, addressToCheck)   For any claim conditions that a particular wallet is violating, this function returns human readable information about the breaks in the condition that can be used to inform the user.
getDefaultSaleRecipient()    
getMintConditionsFactory()    
getOwned(_address)   Get Owned NFTs
getRoyaltyBps()   Gets the royalty BPS (basis points) of the contract
getRoyaltyRecipientAddress()   Gets the address of the royalty recipient
isApproved(address, operator)    
isTransferRestricted()    
lazyMint(metadata)    
lazyMintBatch(metadatas)    
ownerOf(tokenId)    
reveal(batchId, password)    
setApproval(operator, approved)    
setClaimCondition(factory)   Sets public mint conditions for the next minting using the claim condition factory.
setClaimConditions(factory)    
setDefaultSaleRecipient(recipient)    
setMintConditions(factory)    
setModuleMetadata(metadata)    
setPublicMintConditions(conditions)    
setRestrictedTransfer(restricted)    
setRoyaltyBps(amount)    
totalClaimedSupply()    
totalSupply()    
totalUnclaimedSupply()    
transfer(to, tokenId)   Transfer NFT
transferFrom(from, to, tokenId)    
updateClaimConditions(factory)