getNFTs

Retrieves an array of NFTs ("ERC1155") based on the provided options.

Example

import { getNFTs } from "thirdweb/extensions/erc1155";
const nfts = await getNFTs({
contract,
start: 0,
count: 10,
});
function getNFTs(
): Promise<Array<NFT>>;

Parameters

The options for retrieving the NFTs.

Type

Returns

let returnType:
| {
id: bigint;
metadata: NFTMetadata;
owner: string | null;
tokenURI: string;
type: "ERC721";
}
| {
id: bigint;
metadata: NFTMetadata;
owner: string | null;
supply: bigint;
tokenURI: string;
type: "ERC1155";
};

A promise that resolves to an array of NFTs.