🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@kyve/query

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kyve/query

``` yarn add @kyve/query ```

latest
Source
npmnpm
Version
0.0.0-alpha.48
Version published
Weekly downloads
55
-94.92%
Maintainers
2
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 07 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts