tokenById

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.

Returns token data by contractAddress.

tokenById({ tokenId: string | number, contractAddress: string, network?: "testnet" | "mainnet"})

This is an example of a data api method.

Example:

queryNftsByStore.ts

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

const props =  {
  tokenId: '1',
  contractAddress: 'foo.testnet',
  network: 'testnet'
}

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

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


console.log(data.tokenData[0]) // => token metadata

Last updated