auth0/ethereum-crypto

Name: ethereum-crypto

Owner: Auth0

Description: npm module to do general purpose ethereum crypto ops

Created: 2016-11-21 13:01:42.0

Updated: 2018-01-16 08:47:06.0

Pushed: 2018-01-15 12:10:06.0

Homepage: null

Size: 7

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ethereum crypto module

Installation

For the mobile device run (it requires Docker to work):

owserify.sh

The resultant single js file will be saved in bundle.js file in the same directory

To install the module globally for node.js run:

install eth-crypto  -g
Usage
t EthCrypto = require('eth-crypto');
ethCrypto = new EthCrypto();

Every method returns a promise with the result.

Signing message
rypto.signMessage(message,encryptedV3KeyPair,password)
n(function(signature) {
//do something with the signature
atch(function handleError(error) {
//your error handling goes here

Creating a new account
rypto.ethCrypto.createAccount(password)
n(function(encryptedV3KeyPair) {
do something with the key pair
atch(function handleError(error) {
//your error handling goes here

Validate signature
rypto.ethCrypto.validateSignature(message,signature,address);
n(function(result) {
(result) {
console.log("Bugger.");
else {
console.log("Yupee!");

atch(function handleError(error) {
//your error handling goes here

Dependencies

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.