@kyve/query
v0.0.0-alpha.48
Published
``` yarn add @kyve/query ```
Downloads
111
Keywords
Readme
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);
// finding latest transactions
const txs = query.find();
// receiveing the next 10 results
const nextTxs = query.next();
Setting custom limits
To set a custom limit you can add a .limit()
statement.
// finding 50 latest transactions
const txs = query.limit(50).find();
Other filters
For other filters please refer to the ArDB documentation.