Retrieves information about a specific ERC721 non-fungible token (NFT).
import { getNFT } from "thirdweb/extensions/erc721";const nft = await getNFT({ contract, tokenId: 1n,});
function getNFT( includeOwner?: boolean; tokenByIndex?: boolean; tokenId: bigint; useIndexer?: boolean; }>,
The options for retrieving the NFT.
includeOwner?: boolean; tokenByIndex?: boolean; tokenId: bigint; useIndexer?: boolean;}>;
let returnType: | { chainId: number; id: bigint; owner: string | null; tokenAddress: string; tokenURI: string; type: "ERC721"; } | { chainId: number; id: bigint; owner: string | null; supply: bigint; tokenAddress: string; tokenURI: string; type: "ERC1155"; };
A promise that resolves to the NFT object.