eth2-keystore-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Ethereum Keystore

Utility to extract private key from Ethereum KeyStore file

Module Usage

import EthereumKeyStore from 'eth2-keystore-js';

fs.readFile(filePath, 'utf8', async (err: ErrnoException, data: string) => {
    if (err) {
        reject(err);
    } else {
        const keyStore = new EthereumKeyStore(JSON.parse(data));
        
        const privateKey = await keyStore.getPrivateKey('<keystorePassword>');
    }
});

Dependencies

  • scrypt-js - The scrypt password-base key derivation function
  • ethereumjs-wallet - A lightweight wallet implementation
  • typescript - TypeScript is a language for application-scale JavaScript

Readme

Keywords

Package Sidebar

Install

npm i eth2-keystore-js

Weekly Downloads

106

Version

1.0.8

License

MIT

Unpacked Size

20.9 kB

Total Files

6

Last publish

Collaborators

  • guy_muroch