Get Assets By Authority

Get standard and compressed NFTs for an authority address

Overview

This method returns a list of assets (standard and compressed NFTs) given an authority address.

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

Example

const url = `https://rpc.shyft.to/?api_key={api_key}`

const getAssetsByAuthority = async () => {
    const response = await fetch(url, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 'rpc-id',
        method: 'getAssetsByAuthority',
        params: {
          authorityAddress: '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW',
          page: 1, // Starts at 1
          limit: 1000
        },
      }),
    });
    const { result } = await response.json();
    console.log("Assets by Authority Address: ", result.items);
};
getAssetsByAuthority();

Last updated