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( options: BaseTransactionOptions<{ includeOwner?: boolean; tokenId: bigint; }>,): Promise<NFT>;
The options for retrieving the NFT.
let options: BaseTransactionOptions<{ includeOwner?: boolean; tokenId: bigint;}>;
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 the NFT object.