Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@haechi-labs/henesis-sdk

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haechi-labs/henesis-sdk

SDK to build handler of Henesis

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

henesis-sdk

SDK to build handler of Henesis

TypeScript License: MIT

import { Ethereum } from "@haechi-labs/henesis-sdk";

exports.handler = (web3, event: Ethereum.Event, blockMeta: Ethereum.BlockMeta, userMeta: Ethereum.UserMeta) => {
    // do something awesome !
    return result;
}

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 8.12 or higher is required. Also you need to install ts-node package >= v7.0.1 is required

Installation is done using the npm install command:

$ npm install --save @haechi-labs/henesis-sdk

Features

  • provide henesis user-defined function event interface

Quick Start

Create your package and initialize npm.

$ mkdir awesome-function && cd awesome-function && npm init

Install the henesis-sdk package:

$ npm i --save @haechi-labs/henesis-sdk

Write your own function code:

import { Ethereum } from "@haechi-labs/henesis-sdk"

exports.handler = (web3, event: Ethereum.Event, blockMeta: Ethereum.BlockMeta, userMeta: Ethereum.UserMeta) => {
    const { index, payload } = event;
    const { name, data, transaction } = payload;
    
    if (transaction.gasUsed >= 10000) {
     	return {
            index: index,
            msg: "gas used over 10000"
     	};   
    }
}

License

MIT

Keywords

FAQs

Package last updated on 03 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc