0.0.1 • Published 1 year ago

@ecosis/nomics v0.0.1

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

@ecosis/nomics

ecosis reward-system plugin for Nomics and Lisk

Usage

Dedicated

import { Nomics } from "@ecosis/nomics";

const nomics = await new Nomics({
  node: this.config.node,
  port: this.config.port,
  name: this.config.name,
  rewardPeriod: this.config.period, // 7*24*60*60*1000, // A Week
  secret: ''
})

await this.nomics.reward()

Nomics and Lisk injection

More coming soon

// src/app/plugins.ts

import { Application } from 'lisk-sdk';
import { NomicsPlugin } from "@ecosis/nomics";

// @ts-expect-error Unused variable error happens here until at least one module is registered
export const registerPlugins = (app: Application): void => {
  app.registerPlugin(NomicsPlugin);
};