SDK to decode NFT data from Symbol Blockchain
The quality of this implementation is very experimental level at this time, so there is a high possibility that it will not work properly.
npm i symbol-nft-decoder
import { comsa } from "symbol-nft-decoder";
(async () => {
const mosaicIdHex: string = "YOUR_COMSA_NFT_MOSAIC_ID";
const comsaNft = await comsa.resolve(mosaicIdHex);
if (comsaNft === undefined) {
console.error("Some error!");
return;
}
if (comsaNft.dataUrl === undefined) {
console.error("The mosaic is not COMSA NFT!");
return;
}
const dataUrl = comsaNft.dataUrl; // Now, you can use this data for NFT viewer.
})();
import { nemberArt } from "symbol-nft-decoder";
(async () => {
const mosaicIdHex: string = "YOUR_NEMber_Art_NFT_MOSAIC_ID";
const nemberArtNft = await nemberArt.resolve(mosaicIdHex);
if (nemberArtNft === undefined) {
console.error("Some error!");
return;
}
if (nemberArtNft.ipfsUrl === undefined) {
console.error("The mosaic is not NEMber Art NFT!");
return;
}
const ipfsUrl = nemberArtNft.dataUrl; // Now, you can use this URL for NFT viewer.
})();
import { nftDrive } from "symbol-nft-decoder";
(async () => {
const mosaicIdHex: string = "YOUR_NFT_DRIVE_MOSAIC_ID";
const nftDrive = await nftDrive.resolve(mosaicIdHex);
if (nftDrive === undefined) {
console.error("Some error!");
return;
}
if (nftDrive.ipfsUrl === undefined) {
console.error("The mosaic is not NFT Drive NFT!");
return;
}
const dataUrl = nftDrive.dataUrl; // Now, you can use this data for NFT viewer.
})();
The following article is very helpful. Thank you very much.