typescript-sdk

Home > @3rdweb/sdk > BundleDropModule

BundleDropModule class

Setup a collection of NFTs with a customizable number of each NFT that are minted as users claim them.

Signature:

export declare class BundleDropModule extends ModuleWithRoles<BundleDrop> implements ITransferable 

Extends: ModuleWithRoles<BundleDrop>

Implements: ITransferable

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.getBundleDropModule("");

Properties

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

Methods

Method Modifiers Description
balance(tokenId)    
balanceOf(address, tokenId)   Get NFT Balance
burn(tokenId, amount)    
canClaim(tokenId, quantity, addressToCheck)    
claim(tokenId, quantity, proofs)   Claim a token to yourself
claimTo(tokenId, quantity, addressToClaim, proofs)   Claim NFTs to Wallet
createBatch(metadatas)   Create Many NFTs
get(tokenId)    
getActiveClaimCondition(tokenId)    
getAll()   Get NFT Data
getAllClaimConditions(tokenId)    
getAllClaimerAddresses(tokenId)   (BETA) Pulls the list of all addresses that have claimed a particular token- This can be very slow for large numbers of token holders
getClaimConditionFactory()   Creates a claim condition factory
getClaimConditionsFactory()    
getClaimIneligibilityReasons(tokenId, 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()    
getOwned(_address)   getOwned is a convenience method for getting all owned tokens for a particular wallet.
getRoyaltyBps()   Gets the royalty BPS (basis points) of the contract
getRoyaltyRecipientAddress()   Gets the address of the royalty recipient
getSaleRecipient(tokenId)    
isApproved(address, operator)    
isTransferRestricted()    
lazyMintBatch(metadatas)    
setApproval(operator, approved)    
setClaimCondition(tokenId, factory)   Sets public claim conditions for the next minting using the claim condition factory.
setDefaultSaleRecipient(recipient)    
setModuleMetadata(metadata)    
setPublicClaimConditions(tokenId, conditions)    
setRestrictedTransfer(restricted)    
setRoyaltyBps(amount)    
setSaleRecipient(tokenId, recipient)    
totalSupply(tokenId)   Returns the total supply of a specific token
transfer(to, tokenId, amount, data)   Transfer NFT
transferFrom(from, to, tokenId, amount, data)    
updateClaimConditions(tokenId, factory)