0.0.8 • Published 22 days ago

@irys/query v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
22 days ago

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.

0.0.8

22 days ago

0.0.7

1 month ago

0.0.6

2 months ago

0.0.5

2 months ago

0.0.3

4 months ago

0.0.4

4 months ago

0.0.2

8 months ago

0.0.1

9 months ago