Installation
yarn add @kyve/query
Usage
Note: The KYVE-Query class extends ArDB. For detailed information
please refer to the documentation.
Querying
Basic Query
To query KYVE data, create a new Query and pass in the poolID. The default limit is
10 transactions. Call .next() to get to the next page. The default order is latest -> oldest transactions.
import { Query } from "@kyve/query";
const poolID = 0;
const query = new Query(poolID);
const txs = query.find();
const nextTxs = query.next();
Setting custom limits
To set a custom limit you can add a .limit() statement.
const txs = query.limit(50).find();
Other filters
For other filters please refer to the ArDB documentation.