Learn
NETWORK
Gateway

Gateway

The gateway indexes and serves data, making it accessible to users.

Indexing

The gateway indexes all transaction metadata to ensure all transactions on Irys are easily searchable and accessible. It continuously monitors Irys for new blocks, indexing them as they propagate. When a user posts a transaction to Irys, the gateway detects it and adds it to its local database.

During indexing, the gateway extracts transactions from each block and indexes the associated metadata. For bundles, all transactions inside are indexed. If a manifest is detected, it is indexed as well. This creates a virtual directory structure that replicates the original folder organization, allowing users to access data via URLs like https://gateway.irys.xyz/:manifestId/:fileName.

Querying

Transaction metadata is queryable via GraphQL or REST APIs, enabling users to create custom queries, such as searching for specific tags or addresses.

Irys supports custom metadata tags for each upload, allowing users to build complex data models that are fully queryable through GraphQL.

Serving Data

When a user requests data from the Irys Gateway, the gateway checks the following sources in order:

  1. Gateway local cache
  2. Irys optimistic cache
  3. Irys miners

Downloading

To download data from the gateway, use the transaction ID created during upload. The gateway URL is https://gateway.irys.xyz, and the URL format for downloading data is https://gateway.irys.xyz/:transactionId.

For example: https://gateway.irys.xyz/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA.