NFTCollection class
Create a collection of one-of-one NFTs.
Example
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
const sdk = new ThirdwebSDK("{{chainName}}");
const contract = sdk.getNFTCollection("{{contract_address}}");
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(network, address, storage, options, contractWrapper) | Constructs a new instance of the NFTCollection class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| contractAbi | static | any | |
| contractRoles | static | readonly ["admin", "minter", "transfer"] | |
| contractType | static | "nft-collection" | |
| encoder | ContractEncoder<TokenERC721> | ||
| estimator | GasCostEstimator<TokenERC721> | ||
| events | ContractEvents<TokenERC721> | ||
| metadata | ContractMetadata<TokenERC721, typeof NFTCollection.schema> | ||
| platformFees | ContractPlatformFee<TokenERC721> | ||
| roles | ContractRoles<TokenERC721, typeof NFTCollection.contractRoles[number]> | ||
| royalties | ContractRoyalty<TokenERC721, typeof NFTCollection.schema> | Configure royalties | |
| sales | ContractPrimarySale<TokenERC721> | ||
| signature | Erc721WithQuantitySignatureMintable | Signature Minting |
Methods
| Method | Modifiers | Description |
|---|---|---|
| burnToken(tokenId) | Burn a single NFT | |
| getAll(queryParams) | Get All Minted NFTs | |
| getOwned(walletAddress) | Get Owned NFTs | |
| getOwnedTokenIds(walletAddress) | Get all token ids of NFTs owned by a specific wallet. | |
| isTransferRestricted() | Get whether users can transfer NFTs from this contract | |
| mintBatch(metadata) | Mint Many unique NFTs | |
| mintBatchTo(walletAddress, metadata) | Mint Many unique NFTs | |
| mintTo(walletAddress, metadata) | Mint a unique NFT | |
| mintToSelf(metadata) | Mint a unique NFT | |
| totalSupply() | Get the total count NFTs minted in this contract |
Signature:
export declare class NFTCollection extends Erc721<TokenERC721>
Extends: Erc721<TokenERC721