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

@greymass/eosio-key-encryption

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greymass/eosio-key-encryption

EOSIO private key en/decryption library

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

EOSIO Key Encryption / EEP-8

Specification and reference implementation of EOSIO Key Encryption (EEP-8).

Installation

The eosio-key-encryption package is distributed as a module on npm.

yarn add eosio-key-encryption
# or
npm install --save eosio-key-encryption

Usage

import {decrypt, encrypt} from 'eosio-key-encryption'

const wif = '5JiAW9u8f2bwV2KcQRRt7WYMQnEdXwSxSDX2hnM2EccuX8eAXcP'
const password = [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100] // utf-8 "hello world"

encrypt(wif, password).then((encrypted) => {
    console.log(JSON.stringify(encrypted)) // "SEC_K1_8xacaDNEJyzqu1RG4dG7sBwo9QCA24EePExWLPPTBWVDiMo6BpAw7DHq"
})

decrypt('SEC_K1_8xacaDNEJyzqu1RG4dG7sBwo9QCA24EePExWLPPTBWVDiMo6BpAw7DHq', password).then((key) => {
    console.log(key.toWif()) // 5JiAW9u8f2bwV2KcQRRt7WYMQnEdXwSxSDX2hnM2EccuX8eAXcP
})

Developing

You need Make, node.js and yarn installed.

Clone the repository and run make to checkout all dependencies and build the project. See the Makefile for other useful targets. Before submitting a pull request make sure to run make lint.


Made with ☕️ & ❤️ by Greymass, if you find this useful please consider supporting us.

FAQs

Package last updated on 17 Feb 2021

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