getNFTsForCollection
/** Get list of NFTs for the specified contract address
* @param {string} contractAddress address of the contract to get the list of NFTs
* @returns {Promise<object>} List of NFTs with metadata
*/
async getNFTsForCollection({ contractAddress }) {
if (!contractAddress || !utils.isAddress(contractAddress)) {
throw new Error(
errorLogger({
location: ERROR_LOG.location.SDK_getNFTsForCollection,
message: ERROR_LOG.message.invalid_contract_address,
}),
);
}
const apiUrl = `${this.#apiPath}/nfts/${contractAddress}/tokens`;
const { data } = await this.#httpClient.get(apiUrl);
return data;
}
Method currently returns maximum 100 items.
Last modified 1mo ago
Copy link