Skip to content

Latest commit

 

History

History
53 lines (22 loc) · 967 Bytes

File metadata and controls

53 lines (22 loc) · 967 Bytes

tokenByStatus

{% hint style="warning" %}

This is a work in progress, please reach out to us on Telegram for support.

For the most reliable data, reference our existing graphql docs.

{% endhint %}

Returns number of tokens by metadataId and statuses: burned, unburned, listed.

tokenById({metadataId: string, ownedBy?: string, network?: "testnet" | "mainnet"})

This is an example of a data api method.

Example:

{% code title="queryNftsByStore.ts" overflow="wrap" lineNumbers="true" %}

import { tokensByStatus } from  '@mintbase-js/data'

const props = {
  metadataId: 'dogeflower.mintbase1.near%3A5ef2d9b0651172d90dc173af0726b5fc',
  ownedBy: 'maxknivets.near',
  network: 'mainnet'
}

const { data, error } = await tokensByStatus(props);

if (error) {console.log('error', error)}

console.log(data.listedTokens) // => 1

{% endcode %}