Initialize Indexer
To query the blockchain, you need to use the indexer
. The indexer is a server that connects to the blockchain and indexes the data into a database for querying faster and easier.
import { Indexer } from "crossbell.js";
Usage
import { Indexer } from 'crossbell.js'
const indexer = new Indexer()
Methods
There are many methods on the indexer
class. For example:
// get the characters owned by an address
const result = await indexer.getCharacters('0x1234567890123456789012345678901234567890')
console.log(result.list)
The doc is still under construction, but you can find the full list of API here (opens in a new tab).