Socket
Socket
Sign inDemoInstall

@haloplatform/simple-sign-system

Package Overview
Dependencies
322
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @haloplatform/simple-sign-system

This allows the signing of a transaction and data via a simple npm module. Also allows recovery of signed data. Requires web3 1.x.


Version published
Weekly downloads
9
increased by800%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

npm scoped

simple-sign-system

This allows the signing of a transaction and data via a simple npm module. Also allows recovery of signed data. Requires web3 1.x.

REQUIREMENT = Web3js 1.x. Does not work with Web3 0.x.x!!!

Usage

Install:

  • npm npm install @haloplatform/simple-sign-system
  • yarn yarn add @haloplatform/simple-sign-system

Import & Use:

const sss = require('@haloplatform/simple-sign-system);
const sss = new SimpleSignSystem();

sss.signTx(tx, privateKey, web3).then((tx) => {
    console.log(tx.serialized);
});

sss.signAndSend(tx, privateKey, web3, true).then((result) => {
    console.log(result.transactionHash);
});

Some Docs

Available functions:

  • signTx: signs a transaction to use via web3.sendSignedTransaction
  • signAndSend: signs a transaction an uses passed web3 to send it. (web3 must already be setup with account info and provider);
  • send: sends a signed transaction.
  • signData: signs data the same as our feather client and extension.
  • recoverData: recovers data signed by this system or our feather client / extension.

This is experimental code, use at your own risk.

FAQs

Last updated on 17 Dec 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc