Get Asset

Get a digital asset by its ID.

Overview

This method returns on-chain and off-chain NFT metadata for compressed or standard NFTs.

getAsset() function supported in Shyft SDK for easy access.

Example

Fox #7777 (FFF)

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();

Last updated