DareNFT Protocol
API Reference
Get Collection Info

Get Collection Info

Request

In order to get collection info, SDK provides you with a getCollectionInfo endpoint to do so

try {
  const bnbContract = nft2Client.getNFT2Contract(56);
 
  const collection = await bnbContract.getCollectionInfo(
    "0x..."  // collection address
  );
 
  console.log(collection)
} catch (e) {
  console.error(e);
}

Parameters

  • chainId: Which chain to get from. Multi Chain only
  • collectionAddress (string): Collection contract address.
  • isFullInfo (boolean): more infos like image, totalNfts, totalOwners. Optional

Response

{
  name: string;
  symbol: string;
  imageUrl: string;
  contractAddress: string;
  ownerAddress: string;
  creatorAddress: string;
  chainId: number;
  type: number;
  deployedAt: Date;
  totalNfts: number;
  totalOwners: number;
  kind: number;
  defaultRoyalty: number;
}