Lấy metadata của NFT
Truy xuất metadata NFT (URL hình ảnh, tên, thuộc tính) cho một token cụ thể trên Chiliz Chain bằng Moralis NFT API.
Metadata NFT là gì?
Cách thực hiện với Moralis
import Moralis from 'moralis';
try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});
const response = await Moralis.EvmApi.nft.getNFTMetadata({
"chain": "0x15b38", // This is for Chiliz Chain Mainnet.
// For Spicy Testnet, use "0x15b32".
"format": "decimal",
"normalizeMetadata": true,
"mediaItems": false,
"address": "0xYourNFTContractAddress",
"tokenId": "1"
});
console.log(response.raw);
} catch (e) {
console.error(e);
}Cách thực hiện với Tatum
Cách thực hiện với thirdweb
Cách thực hiện với Nodit
Cập nhật lần cuối
Nội dung này có hữu ích không?