@kyve/query
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-alpha.48 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @kyve/query

Weekly Downloads

4

Version

0.0.0-alpha.48

License

MIT

Unpacked Size

10.9 kB

Total Files

6

Last publish

Collaborators

  • troykessler
  • johnletey
  • fabianriewe