特定の NFT の metadata を取得する
Moralis NFT APIを使用して、Chiliz Chain上の特定のトークンのNFTメタデータ(画像URL、名前、属性)を取得します。
NFTメタデータとは?
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);
}Tatumで行う方法
thirdwebで行う方法
Noditで行う方法
最終更新
役に立ちましたか?