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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aleph-indexer/indexer-example

v1.0.43

Published

This README provides an overview of a simple indexer built using the Aleph Indexer Framework. The example indexer demonstrates the process of indexing transactions, logs, and instructions from multiple blockchains, including

Downloads

22

Readme

Aleph Indexer Example

This README provides an overview of a simple indexer built using the Aleph Indexer Framework. The example indexer demonstrates the process of indexing transactions, logs, and instructions from multiple blockchains, including

  • Ethereum
  • Solana
  • and Binance Smart Chain (BSC).

The primary purpose of this example is to showcase the functionality of the Aleph Indexer Framework.

Overview

The indexer is designed to listen for events on supported blockchains and process them according to the specified filtering and indexing logic. In this example, the indexing operations only log the processed data. However, you can easily extend the indexer to store the indexed data in a database or perform more complex processing to meet your project's specific requirements.

Main Domain

The MainDomain class is responsible for account discovery. It returns a list of accounts to be indexed for each supported blockchain. This class extends the IndexerMainDomain from the Aleph Indexer Framework and implements the IndexerMainDomainWithDiscovery interface.

Account Discovery

The discoverAccounts function in the MainDomain class returns an array of AccountIndexerConfigWithMeta objects, containing the blockchain ID, account address, meta information, and indexing configuration for each supported blockchain.

Stats Calculation

The IndexerMainDomainWithStats interface extends the capabilities of the MainDomain class by introducing methods for calculating and retrieving statistics about indexed accounts on supported blockchains. By implementing this interface, the main domain can update, retrieve, and transform time-series stats for specified accounts, as well as obtain global stats for those accounts.

An stub example can be found here: Stats Calculation

Worker Domain

The WorkerDomain class implements the filtering and indexing logic for transactions, logs, and instructions on each supported blockchain. This class extends the IndexerWorkerDomain from the Aleph Indexer Framework and implements the interfaces for Ethereum, Solana, and BSC indexer worker domains.

Filtering

The WorkerDomain class contains filtering functions for transactions, logs, and instructions on each supported blockchain. In this example, all transactions, logs, and instructions are allowed to pass through the filters.

Indexing

The WorkerDomain class contains indexing functions for transactions, logs, and instructions on each supported blockchain. In this example, the indexing functions only log the processed data, but you can extend the functionality to store the data in a database or perform additional processing.

Getting Started

To start using this example indexer, follow these steps:

  • Clone the repository and install dependencies.
  • Configure the environment variables according to the Aleph Indexer Framework documentation.
  • Run the indexer using the provided scripts in the package.json file.

With these steps, you'll have a fully functional indexer that demonstrates the capabilities of the Aleph Indexer Framework. Customize the filtering and indexing logic or extend the functionality to fit your specific project requirements.