ownedTokens

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 tokens owned by ownerId with limit and offset pagination.

ownedTokens(ownerId: string, { limit, offset }: Pagination, network?: "testnet" | "mainnet")

This is an example of a data api method.

Example:

queryTokens.ts
import { ownedTokens } from '@mintbase-js/data'


const props = {
  ownerId: 'mb_alice.near';
  pagination: { limit: 20 };
  network?:  'mainnet';
}

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

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

console.log(ownedTokens.length) // => 2

Last updated