Built-in methods to help fetch data from our indexer. These methods aim to make it as easy as possible to get blockchain data.
If the data you want to get is more specific also check out our GraphQL schema instead.

Source Configuration

You can set network and in some cases default contract configuration using the SDK's mbjs.config method. Read about config global variables on: Config SDK method​

Usage Options

The default export methods return a wrapped result object with error and data properties. For example const { error, data } = myApiMethod() will provide any network errors inside of error in the event of failure, and the expected result in data on success.
If you prefer to catch errors, you can import the method from @mintbase-js/data/lib/unwrap instead. e.g. import { ownedTokens } from '@mintbase-js/data/lib/unwrap which will re-throw in the event of an error.

API Methods

method name
ownerId: string,contractAddress: string, pagination: {limit: number, offset:number}
get all nfts from a single store
ownerId: string,{limit: number, offset:number}
get all tokens/nfts from a owner
tokenId: string, contractAddress: string
get token data by id of certain contract
metadataId: string
get token listings from metadata id
metadataId: string, ownedBy: string
get token by status on metadataId, and owner
tokenId: string, contractAddress: string
get token owner by token id and certain contract
tokenId: string, contractAddress: string, pagination?: {limit: number, offset:number}
get token provenance by token id and certain contract
metadataId: string, pagination?: {limit: number, offset:number}
get token owners by metadata id
ownerId: string
get stores owned by owner id
get near price in usd
`contractAddress: string
`contractAddress: string
string[], showOnlyListed?: boolean, pagination?: {limit: number, offset:number}`
metadataId: string
get metadata by metadataId
While we will continue to provide public and our new mb_views schema objects, we will also begin to introduce helper methods here that can be used to query data without having to write any graphql.
For now, reference our existing graphql docs and be sure to check back here soon for updates concerning our data layer API.
Last modified 10h ago