UNPKG

@apillon/sdk

Version:

▶◀ Apillon SDK for NodeJS ▶◀

136 lines 4.61 kB
import { IMintNftData, INftActionResponse, SubstrateChain } from './../../types/nfts'; import { IApillonList } from '../../types/apillon'; import { ITransactionFilters, ITransaction, CollectionType, CollectionStatus, EvmChain } from '../../types/nfts'; import { ApillonModel } from '../../lib/apillon'; export declare class NftCollection extends ApillonModel { /** * Collection symbol. */ symbol: any; /** * Collection name */ name: any; /** * collection description. */ description: string; /** * Collection type. Defines the smart contract used. */ collectionType: CollectionType; /** * Max amount of NFTs that can get minted in this collection. 0 represents unlimited. */ maxSupply: number; /** * Base uri from which uri for each token is calculated from: * Base uri + token id + base extension. */ baseUri: string; /** * Base extension from which uri for each token is calculated from: * Base uri + token id + base extension. */ baseExtension: string; /** * If nft is transferable. */ isSoulbound: boolean; /** * If true, NFT token IDs are always sequential. * If false, custom token IDs can be provided when minting. */ isAutoIncrement: boolean; /** * If collection owner can burn / destroy a NFT. */ isRevokable: boolean; /** * If this collection has drop (anyone can buy a nft directly from the smart contract) functionality enabled. */ drop: boolean; /** * Price per NFT if drop is active. */ dropPrice: number; /** * UNIX timestamp of when general buying of NFTs start. */ dropStart: number; /** * Amount of reserved NFTs that can't be bought by general public but can get minted by the collection owner. */ dropReserve: number; /** * Percentage amount of royalties fees. */ royaltiesFees: number; /** * Address to which royalties are paid. */ royaltiesAddress: string; /** * Status of the collection. From not deployed etc. */ collectionStatus: CollectionStatus; /** * Smart contract address (available after succesfull deploy). */ contractAddress: string; /** * Transaction hash of contract deploy. */ transactionHash: string; /** * Wallet address of deployer. */ deployerAddress: string; /** * Chain on which the smart contract was deployed. */ chain: EvmChain | SubstrateChain; /** * Constructor which should only be called via Nft class. * @param uuid Unique identifier of the NFT collection. * @param data Data to populate the collection with. */ constructor(uuid: string, data?: Partial<NftCollection>); /** * @param {IMintNftData} params - NFT mint parameters * @returns {INftActionResponse} - success status and transaction hash of the mint */ mint(params: IMintNftData): Promise<INftActionResponse>; /** * Mints new nfts directly to an existing nft. * @warn This method is only available for nestable collections. * @param parentCollectionUuid UUID of the collection we want to nest mint to. * @param parentNftId ID of the nft in the collection we want to nest mint to. * @param quantity Amount of nfts we want to mint. * @returns Call status. */ nestMint(parentCollectionUuid: string, parentNftId: number, quantity: number): Promise<INftActionResponse>; /** * Burns a nft. * @warn Can only burn NFTs if the collection is revokable. * @param tokenId Token ID of the NFT we want to burn. * @returns Success status and transaction hash. */ burn(tokenId: string): Promise<INftActionResponse>; /** * Transfers ownership of this collection. * @warn Once ownership is transferred you cannot call mint methods anymore since you are the * owner and you need to the smart contracts call directly on chain. * @param address Address to which the ownership will be transferred. * @returns Collection data. */ transferOwnership(address: string): Promise<NftCollection>; /** * Gets list of transactions that occurred on this collection through Apillon. * @param params Filters. * @returns {ITransaction[]} List of transactions. */ listTransactions(params?: ITransactionFilters): Promise<IApillonList<ITransaction>>; protected serializeFilter(key: string, value: any): any; } //# sourceMappingURL=nft-collection.d.ts.map