npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fluxpointstudios/iris

v1.0.4

Published

<div align="center"> <h1 align="center">Iris Cardano DEX Indexer</h1> </div>

Readme

What is Iris?

Iris is a Cardano DEX data aggregator, which indexes all DEX related data such as the following :

  • Swaps
  • Deposits
  • Withdraws
  • Zaps
  • Order cancellations of the above
  • Liquidity Pools
  • Liquidity Pool states
  • Pooled assets
  • Order books
  • Order book orders & cancellations For all of this data, Iris also supplies a uniform API & websocket feed.

Requirements

  • MySQL database for storing indexed DEX operations
  • Ogmios instance for indexing Cardano transactions

Setup

  1. Build the project.
npm run build
  1. Copy the .env.example file to .env
  2. Set up a new MySQL database & supply the connection info in the created .env file.
  3. Set up an Ogmios instance & supply the connection info in the created .env file.

Running

Indexer

Run just the Iris indexer.

npm run indexer

API

Run just the Iris API.

npm run api

Tests

Run the automated tests.

npm run test

Notes

  • Liquidity pools often change addresses on-chain, however Iris will automatically update the liquidity pool to the updated address. This also applies to order addresses.
  • Some assets have registered metadata for their logos, ticker, etc. You can supply a GITHUB_ACCESS_TOKEN in the .env file so this metadata can be fetched from the Cardano Token Registry.
  • You may see some errors thrown in the error logs related to database inserting - This is done to prevent race-cases duplicating data in the database & should not cause any issues.
  • Orderbook DEXs still need some validating & testing.

Components

Indexers (/src/indexers/)

Indexers simply take in a raw transaction from Ogmios, format it, and sends it over all the DEX analyzers.

Analyzers (/src/dex/)

Each DEX has its own analyzer, which filters out related transactions & operations like swaps, deposits, etc. Depending on the type of DEX, they inherit the BaseAnalyzer of their type: AMM, Order Book, Hybrid. Hybrid analyzers are strictly used for DEXs that support both liquidity pools & order books, such as MuesliSwap. Currently supported DEXs:

  • Minswap (v1 & v2)
  • SundaeSwap (v1 & v3)
  • WingRiders (v1 & v2)
  • Spectrum
  • Splash
  • TeddySwap
  • VyFinance
  • MuesliSwap (hybrid)
  • SaturnSwap (AMM facade)

Handlers (/src/handlers/)

For each DEX type (AMM, Order Book, Hybrid), there is a corresponding handler. Handlers take in found DEX operations, and handle linking the operation to a liquidity pool or order book. Then, the fully built operation is pushed over the websocket.

API (/src/api/)

Iris contains many API controllers & endpoint resources to handle REST API calls. Each entity type has its own resource file to correctly format the entity for JSON and websocket responses. To mitigate the data sent over the websocket feed, the attributes for the entities use a shorthand name. You dont have to worry about this using the SDK as the entities are rebuilt client side. You can find API endpoint documentation in the openapi.yaml file here docs/openapi.yaml or by visiting the OpenAPI spec.

Expanding Iris

After each operation creation or update, an event is pushed out to all event listeners supplied to Iris at boot time. With that, you can supply your own listeners & act on specific events that have occured within Iris.

Iris supports custom indexers and event listeners. Below is an example snippet on how you can supply your own logic with Iris as a subproject :

const app: IndexerApplication = new IndexerApplication(
    new CustomCacheService(),
    [
        new CustomIndexer(),
    ],
);

app.withEventListeners([
    new CustomEventListener(app),
]);

await app.start()
    .then(() => {
        logInfo('Indexer started');
    })
    .catch((reason) => {
        logError(`Indexer failed to start : ${reason}`);
    });

Iris also supports you supplying your own API controllers :

const app: ApiApplication = new ApiApplication(
    [
        new CustomController('/custom'),
    ]
);

Iris also has a TypeScript SDK, which you can install & easily interact with the Iris API or websocket.

Websocket Feed

Iris provides a real-time websocket feed for DEX related operations. Event types you can listen for are provided in src/events.types.ts. These events are sent over the feed are minified, however are 're-humanified' through the Iris SDK.

Default port for the websocket feed is 8080, and can be overwritten through the OPERATION_WEBSOCKET_PORT variable specified in the .env file.