6ca8778985 | ||
---|---|---|
.gitignore | ||
LICENSE | ||
README.md | ||
index.js | ||
package.json |
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:
- ethereumjs-tx to sign transactions
- ethereumjs-icap to manipulate ICAP addresses
- store.js to use browser storage
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 keyfromV1
- 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 keygetPublicKey
- return the public keygetAddress
- return the addresstoV3
- 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
.