Home > @3rdweb/sdk > BundleModule
BundleModule class
Create a collection of NFTs that lets you optionally mint multiple copies of each NFT.
Signature:
export declare class BundleModule extends ModuleWithRoles<NFTBundleContract> implements ITransferable
Extends: ModuleWithRoles<NFTBundleContract>
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.getBundleModule("");
Properties
Property |
Modifiers |
Type |
Description |
moduleType |
static |
ModuleType |
|
roles |
static |
readonly [“admin”, “minter”, “pauser”, “transfer”] |
|
Methods
Method |
Modifiers |
Description |
balance(tokenId) |
|
|
balanceOf(address, tokenId) |
|
Get NFT Balance |
burn(args) |
|
Burn NFT |
burnBatch(args) |
|
|
burnBatchFrom(account, args) |
|
|
burnFrom(account, args) |
|
|
create(metadata) |
|
|
createAndMint(metadataWithSupply) |
|
Mint NFT |
createAndMintBatch(metadataWithSupply) |
|
Mint Many NFTs |
createBatch(metadatas) |
|
|
createWithErc20(tokenContract, tokenAmount, args) |
|
|
createWithERC721(tokenContract, tokenId, metadata) |
|
|
createWithNFT(tokenContract, tokenId, metadata) |
|
|
createWithToken(tokenContract, tokenAmount, args) |
|
|
get(tokenId, address) |
|
Get a single bundle item by tokenId. |
getAll(address) |
|
Get NFT Data |
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 |
isApproved(address, operator, assetContract, assetId) |
|
|
isTransferRestricted() |
|
|
mint(args) |
|
|
mintBatch(args) |
|
|
mintBatchTo(to, args, data) |
|
|
mintTo(to, args, data) |
|
|
setApproval(operator, approved) |
|
|
setModuleMetadata(metadata) |
|
|
setRestrictedTransfer(restricted) |
|
|
setRoyaltyBps(amount) |
|
|
transfer(to, tokenId, amount) |
|
Transfer NFT |
transferBatchFrom(from, to, args, data) |
|
Transfer Many NFTs |
transferFrom(from, to, args, data) |
|
|
unwrapNFT(tokenId) |
|
|
unwrapToken(tokenId, amount) |
|
|