Returns a list of token items (metadata) which match the contract id and passed filters.
Example:
{% code title="getAttributes.ts" overflow="wrap" lineNumbers="true" %}
import { attributesByContract } from "@mintbase-js/data";
const { data, error } = await attributesByContract(
'some-nfts.contract.near',
'mainnet'
);
if (error) {
console.log("error", error);
}
console.log(data);
/* => "{
eyes: [
{ name: 'green', count: 30 } // 30 tokens with green eyes
{ name: 'blue', count: 3 } // 3 tokens with green eyes
],
face: [
{ name: 'funny', count: 5 } // 5 funny faces
]
}"
*/
{% endcode %}