你好,想要通过集合的符号获取该集合中所有的NFT,请问是否有可提供数据的API?
你好,想要通过集合的符号获取该集合中所有的NFT,请问是否有可提供数据的API?
https://docs.metaplex.com/programs/token-metadata/certified-collections 可能是您正在寻找的内容。但该标准不适用于旧版 Solana NFT。 要上传“集合”,人们必须上传整个集合的铸币地址列表...
import { Metadata } from "@metaplex-foundation/mpl-token-metadata";
import { Connection } from "@solana/web3.js";
const connectionMetaplex = new Connection(
"https://api.metaplex.solana.com",
"confirmed"
);
const walletAddress = "6vRx1iVZo3xfrBHdpvuwArL2jucVj9j9nLpd2VUTTGMG"
const nftsmetadata = await Metadata.findDataByOwner(connectionMetaplex, walletAddress);
console.log(nftsmetadata);
"dependencies": {
"@metaplex-foundation/mpl-core": "^0.0.5",
"@metaplex-foundation/mpl-token-metadata": "^1.2.5",
"@project-serum/anchor": "^0.22.1",
"@solana/buffer-layout": "^4.0.0",
"@solana/spl-token": "^0.2.0",
"@solana/web3.js": "^1.36.0"
}