import type { ThirdwebClient } from "../../client/client.js"; import type { FileOrBufferOrString } from "../../storage/upload/types.js"; import type { Prettify } from "../type-utils.js"; /** * Represents the input data for creating an NFT (Non-Fungible Token). */ export type NFTInput = Prettify<{ name?: string; description?: string; image?: FileOrBufferOrString; animation_url?: FileOrBufferOrString; external_url?: FileOrBufferOrString; background_color?: string; properties?: Record | Array>; } & Record>; export type NFTMetadata = { uri: string; name?: string; description?: string; image?: string; animation_url?: string; external_url?: string; background_color?: string; properties?: Record | Array>; attributes?: Record | Array>; image_url?: string; } & Record; export type NFT = { metadata: NFTMetadata; owner: string | null; id: bigint; tokenURI: string; type: "ERC721"; tokenAddress: string; chainId: number; } | { metadata: NFTMetadata; owner: string | null; id: bigint; tokenURI: string; type: "ERC1155"; supply: bigint; tokenAddress: string; chainId: number; }; /** * @internal */ export type ParseNFTOptions = { tokenId: bigint; tokenUri: string; type: "ERC721"; owner?: string | null; tokenAddress: string; chainId: number; } | { tokenId: bigint; tokenUri: string; type: "ERC1155"; owner?: string | null; supply: bigint; tokenAddress: string; chainId: number; }; /** * Parses the NFT metadata and options to create an NFT object. * @param base - The base NFT metadata. * @param options - The options for parsing the NFT. * @returns The parsed NFT object. * @internal */ export declare function parseNFT(base: NFTMetadata, options: ParseNFTOptions): NFT; /** * Parses an NFT URI. * @param options - The options for parsing an NFT URI. * @param options.client - The Thirdweb client. * @param options.uri - The NFT URI to parse. * @returns A promise that resolves to the NFT URI, or null if the URI could not be parsed. * * @example * ```ts * import { parseNftUri } from "thirdweb/utils/ens"; * const nftUri = await parseNftUri({ * client, * uri: "eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063", * }); * * console.log(nftUri); // ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/ * ``` * * @extension ENS * */ export declare function parseNftUri(options: { client: ThirdwebClient; uri: string; }): Promise; //# sourceMappingURL=parseNft.d.ts.map