DareNFT Protocol
API Reference
Get Protocol's Special Metadata of NFT

Get NFT Protocol Metadata on Data Registry

Request

In order to get protocol's special metadata of NFT on a data registry, SDK provides you with a getNFTProtocolMetaData endpoint to do so

try {
  const bnbDataRegistry = nft2Client.getNFT2DataRegistry(56);
 
  const nftMetaDatas = await bnbDataRegistry.getNFTProtocolMetaData(
    "0x...",  // collection address
    "123",    // token ID
    "0x...",  // provider address
  );
 
  console.log(nftMetaDatas)
} catch (e) {
  console.error(e);
}

Parameters

  • chainId: Which chain to get from. Multi Chain only
  • collectionAddress (string): Collection contract address.
  • tokenId (string): NFT token ID.

Response

{
  metadatas: {
    key: string;
    value: any;
  }[];
  dynamicDatas: {
    name: string;
    description: string;
    image: srting;
    attributes: Array<any>;
    tokenUri: string;
    tokenUriGateway: string;
  };
}