Utilities for handling Ethereum keys
Go to file
Alex Beregszaszi 77425013a5 Add simple tests 2016-02-23 19:39:24 +00:00
test Add simple tests 2016-02-23 19:39:24 +00:00
.gitignore First version 2016-02-23 19:39:21 +00:00
LICENSE First version 2016-02-23 19:39:21 +00:00
README.md First version 2016-02-23 19:39:21 +00:00
index.js First version 2016-02-23 19:39:21 +00:00
package.json Add simple tests 2016-02-23 19:39:24 +00:00

README.md

ethereumjs-wallet

A lightweight wallet implementation. At the moment it supports key creation and conversion between various formats.

It is complemented by the following packages:

Motivations are:

  • be lightweight
  • work in a browser
  • use a single, maintained version of crypto library
  • support import/export between various wallet formats

Features not supported:

  • signing transactions
  • managing storage (neither in node.js or the browser)

API

Constructors:

  • fromPrivateKey - create an instance based on a raw key
  • fromV1 - import a wallet (Version 1 of the Ethereum wallet format)
  • fromV3 - import a wallet (Version 3 of the Ethereum wallet format)
  • fromEthSale - import an Ethereum Pre Sale wallet

Instance methods:

  • getPrivateKey - return the private key
  • getPublicKey - return the public key
  • getAddress - return the address
  • toV3 - return the wallet as a JSON string (Version 3 of the Ethereum wallet format)

All of the above instance methods return a Buffer or JSON. Use the String suffixed versions for a string output, such as getPrivateKeyString.