Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@irys/query

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@irys/query

Irys query package

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by6.37%
Maintainers
2
Weekly downloads
 
Created
Source

Irys Query package

Irys query package

The Irys query package enables users to search Irys and Arweave through an intuitive JavaScript package.

It is easily implemented in a few lines of code.

The query package is for searching transaction metadata on Irys and Arweave and Arweave block information. Once you've found transactions, use the transaction ID to download the associated data.

Installation

You can install via npm:

npm install @irys/query

and yarn:

yarn add @irys/query

Imports

Import the Irys query package with:

import Query from "@irys/query";

Creating a Query object

Start by instantiating a new Query object, this is a shared instance you can reuse each time you want to execute a new query:

const myQuery = new Query();

Then execute a query by chaining together a series of functions that collaboratively narrow down the results returned:

const results = await myQuery
	.search("irys:transactions")
	.tags([{ name: "Content-Type", values: ["image/png", "image/gif"] }])
	.token("matic")
	.fromTimestamp(new Date("2022-07-01"))
	.toTimestamp(new Date("2023-07-03"))
	.sort("ASC")
	.limit(20);

Query locations

Using the Query class users can search:

  • Irys transactions
  • Arweave transactions
  • Arweave blocks

Further reading

Consult our documentation for sample code demonstrating each query type.

FAQs

Package last updated on 21 Aug 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc