JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 150814
  • Score
    100M100P100Q27199F
  • License MIT

Utilities for handling Ethereum keys

Package Exports

  • ethereumjs-wallet
  • ethereumjs-wallet/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ethereumjs-wallet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.