This method returns on-chain and off-chain NFT metadata for compressed or standard NFTs.
const url = `https://rpc.shyft.to/?api_key={api_key}`
const getAsset = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'rpc-id',
method: 'getAsset',
params: {
id: '36BFiA6EnZnMD2MoTVurZEN11ERbhcKjbcTNS5cDUb1N'
},
}),
});
const { result } = await response.json();
console.log("Asset: ", result);
};
getAsset();