Retrieves information about a specific ERC1155 non-fungible token (NFT).
import { getNFT } from "thirdweb/extensions/erc1155";const nft = await getNFT({ contract, tokenId: 1n,});
function getNFT( options: BaseTransactionOptions<GetNFTParams>,): Promise<NFT>;
The options for retrieving the NFT.
let options: BaseTransactionOptions<GetNFTParams>;
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.