{% 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 tokens owned by ownerId
in a particular contractAddress
with pagination pagination: {limit:12, offset:0}
params.
ownedNftsByStore({ownerId: string, contractAddress:string, pagination: { limit:number, offset: number }, network?: "testnet" | "mainnet"})
This is an example of a data api method.
Example:
{% code title="queryNftsByStore.ts" overflow="wrap" lineNumbers="true" %}
import { ownedNftsByStore } from '@mintbase-js/data'
const props = {
ownerId: 'rub3n.testnet',
contractAddress: 'audiobr.mintspace2.testnet',
pagination: { limit: 20 , offset: 0},
network: 'testnet',
}
const {data, error} = await ownedNftsByStore(props);
if (error) {console.log('error', error)}
console.log(ownedNfts.token[0]) // => 1st token of the list.
{% endcode %}