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

@eosrio/hyperion-plugin-core

v0.1.0

Published

A core library for developing plugins for Hyperion - a scalable Full History API Solution for Antelope-based blockchains

Readme

Hyperion Plugin Core

A core library for developing plugins for Hyperion - a scalable Full History API Solution for EOSIO-based blockchains.

Description

Hyperion Plugin Core provides the base classes and interfaces needed to develop custom plugins for the Hyperion History API. This package allows developers to extend Hyperion's functionality by creating plugins that can process blockchain actions, deltas, and stream events.

Installation

npm install @eosrio/hyperion-plugin-core

Requirements

  • Node.js 16+
  • Fastify 5.4.0+ (peer dependency)

Usage

Creating a Basic Plugin

import { HyperionPlugin, HyperionAction, HyperionDelta } from '@eosrio/hyperion-plugin-core';
import { FastifyInstance } from 'fastify';

class MyCustomPlugin extends HyperionPlugin {
  constructor(config?: any) {
    super(config);

    // Set plugin properties
    this.internalPluginName = 'my-custom-plugin';
    this.indexerPlugin = true;  // Set to true if this plugin processes indexer data
    this.apiPlugin = true;      // Set to true if this plugin adds API routes

    // Register action handlers
    this.actionHandlers.push({
      action: 'transfer',
      contract: 'eosio.token',
      handler: this.handleTransfer.bind(this)
    });

    // Register delta handlers
    this.deltaHandlers.push({
      table: 'accounts',
      contract: 'eosio.token',
      handler: this.handleAccountDelta.bind(this)
    });
  }

  // Implement required abstract method
  addRoutes(server: FastifyInstance): void {
    server.get('/my-plugin/data', async (request, reply) => {
      // Handle API request
      return { success: true, data: 'Your plugin data' };
    });
  }

  // Custom action handler
  async handleTransfer(action: HyperionAction): Promise<void> {
    // Process transfer action
    console.log(`Transfer: ${action.act.data.from} -> ${action.act.data.to}`);
  }

  // Custom delta handler
  async handleAccountDelta(delta: HyperionDelta): Promise<void> {
    // Process account delta
    console.log(`Account delta for ${delta.scope}`);
  }
}

export default MyCustomPlugin;

Plugin Initialization

In your Hyperion configuration, you would reference your plugin:

{
  "plugins": [
    {
      "name": "my-custom-plugin",
      "args": {
        "option1": "value1",
        "option2": "value2"
      }
    }
  ]
}

API Reference

HyperionPlugin (Abstract Class)

The base class for all Hyperion plugins.

Properties

  • internalPluginName: String identifier for the plugin
  • indexerPlugin: Boolean flag indicating if the plugin processes indexer data
  • apiPlugin: Boolean flag indicating if the plugin adds API routes
  • actionHandlers: Array of action handlers
  • deltaHandlers: Array of delta handlers
  • streamHandlers: Array of stream event handlers
  • dynamicContracts: Array of contract names to dynamically track
  • hasApiRoutes: Boolean flag indicating if the plugin has API routes
  • baseConfig: Configuration object passed to the plugin
  • chainName: Name of the blockchain

Methods

  • constructor(config?: any): Initialize the plugin with optional configuration
  • abstract addRoutes(server: FastifyInstance): void: Add API routes to the Fastify server
  • initOnce(): Called once during plugin initialization
  • initHandlerMap(): Initialize and return a handler map

Interfaces

  • HyperionActionHandler: Interface for handling blockchain actions
  • HyperionDeltaHandler: Interface for handling table deltas
  • HyperionStreamHandler: Interface for handling stream events
  • HyperionAction: Interface representing a blockchain action
  • HyperionDelta: Interface representing a table delta

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

For Maintainers

Publishing the Package

To publish a new version of the package to npm:

  1. Update the version in package.json
  2. Update the CHANGELOG.md with the changes
  3. Run the publish script:
npm run publish

This will automatically build the package and publish it to npm with public access.

About

Developed and maintained by EOS Rio.