parseNftUri

Parses an NFT URI.

Example

import { parseNftUri } from "thirdweb/utils/ens";
const nftUri = await parseNftUri({
client,
uri: "eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063",
});
console.log(nftUri); // ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/
function parseNftUri(options: {
client: ThirdwebClient;
uri: string;
}): Promise<string | null>;

Parameters

The options for parsing an NFT URI.

Type

let options: { client: ThirdwebClient; uri: string };

Returns

let returnType: Promise<string | null>;

A promise that resolves to the NFT URI, or null if the URI could not be parsed.