Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Checks for valid structure of ethereum web3-secret-storage/ethersale keyfiles

License

Notifications You must be signed in to change notification settings

luclu/ethereum-keyfile-recognizer

Repository files navigation

ethereum-keyfile-recognizer

Build Status Coverage Status Code Climate npm version dependencies Status

Checks for structural sanity (key-names and value-types) of json-keyfiles.

Currently recognized keyfiles:

Installation

npm install --save ethereum-keyfile-recognizer

Usage

var fs = require('fs');
var recognizer = require('ethereum-keyfile-recognizer');

fs.readFile('keyfile.json', (err, data) => {
    var json = JSON.parse(data);
    var result = recognizer(json);
    /** result
     *               [ 'web3', 3 ]   web3 (v3) keyfile
     *  [ 'ethersale', undefined ]   Ethersale keyfile
     *                        null   no valid  keyfile
     */
}));

Development

To build and run the tests:

$ npm install
$ npm test

Contributions

Contributions welcome - see CONTRIBUTING.md

License

MIT - see LICENSE.md

About

Checks for valid structure of ethereum web3-secret-storage/ethersale keyfiles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published