Get NFTs List

Returns a list of NFTs that the account owns.

import 'dotenv/config';
import { DataService } from '@kanalabs/mirai';

(async () => {

      // Define the accountAddress and chainId
   const accountAddress = '';
   const chainId = 80001;
   const dataApiKey = process.env.DATASERVICE_API_KEY || '' as string;
   
   // initializating DataService...
   const dataService = new DataService();

   // Retrieve nfts list using the specified accountAddress and chainId with your api key
   const response = await dataService.getNftsList(accountAddress, chainId, dataApiKey);
   
   // Log the nfts list response
   console.log('response', response);
})()

Last updated