@mintbase-js/data
Last updated
Last updated
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.
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
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.
check our GraphQl Fetch Method
ex:
method name | params | description |
---|---|---|
| get all nfts from a single store | |
| get all tokens/nfts from a owner | |
| get token data by id of certain contract | |
| get token listings from metadata id | |
| get token by status on metadataId, and owner | |
| get token owner by token id and certain contract | |
| get token provenance by token id and certain contract | |
| get token owners by metadata id | |
| get stores owned by owner id | |
- | get near price in usd | |
| check if store name already exists | |
`contractAddress: string | string[]` | |
`contractAddress: string | string[], showOnlyListed?: boolean, pagination?: {limit: number, offset:number}` | |
| get metadata by metadataId | |
| get tokens of a certain contract and filters | |
| get attributes of a certain contract | |
| get attribute rarity of a certain contract, attribute type and attribute value |
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.