Skip to content

ThriveCoin/thc-eth-tools-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thc-eth-tools-js

thc-eth-tools-js is a simple cross platform cli tool for ethereum network.

Currently supported features are:

  • export key content from keystore file

Installing

For usage as library run:

npm install @thrivecoin/thc-eth-tools --save-prod

For usage as cli tool run:

npm install @thrivecoin/thc-eth-tools --global

Usage

CLI usage:

thc-eth-tools <command>

Commands:
  thc-eth-tools export-keystore  exports public and private key from v3 keystore
                                 file

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]


thc-eth-tools export-keystore
Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -f, --file     keystore file                               [string] [required]

Code usage:

const thcTools = require('thc-eth-tools')

const content = fs.readFileSync('my_keystore', { encoding: 'utf-8' })
const pwd = '123456'
const key = await thcTools.exportKeys(content, pwd)
console.log('address', key.address)
console.log('privkey', key.privkey)
console.log('pubkey', key.pubkey)

Additional detailed examples can be found in examples folder.

Testing

npm run test

Authors

About

Useful cli tools for ethereum network

Resources

License

Stars

Watchers

Forks

Packages

No packages published