npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

eth-toolbox

v0.2.3

Published

Ethereum Toolbox

Downloads

21

Readme

eth-toolbox Build Status License: MIT npm

Simple Ethereum toolbox

Table of Contents

Get Started

npm install --save eth-toolbox

Usages

Create Keystore

const ks = await ethToolbox.createKeystore(entropy, password)

Inputs

  • entropy: Random number
  • password: Password to decode keystore

Return value

Return serialize keystore

Decode Keystore

const ks = await ethToolbox.decodeKeystore(keystore, password);

Inputs

  • keystore: Deserialize keystore
  • password: Password to decode keystore

Return value

ks = {
  address,
  privateKey,
}

Send Ether

const tsx = await ethToolbox.sendEther(address, amount, keystore, password);

Inputs

  • address: Ethereum address
  • amount: Amount
  • keystore: Deserialize keystore
  • password: Password to decode keystore

Return value

tsx = {
  from, // Eth address
  to, // Eth address
  value, // Amount
  date, // Date of the transaction
  dether: {
    detherContract, // Boolean
    receive, // Boolean
  },
  etherscan: { // Etherscan link
    kovan,
    ropsten,
    ether,
  },
}

Get All Transactions

const allTsx = await ethToolbox.getAllTsx(address, network, etherScanKey, providerUrl);

Inputs

  • address: Ethereum address
  • network: Network number
  • etherScanKey: API key etherscan
  • providerUrl: Provider URL
Return value
allTsx = [
  {
    etherscan, // Etherscan link
    value, // Amount
    to, // Eth address
    from, // Eth address
    date, // Date of the transaction
    timeStamp, // TimeStamp
    error, // Boolean
    dether: {
      receive, // Boolean
      myEther, // Boolean
    },
  },
  ...
]

Get Balance

const balance = await ethToolbox.getEthBalance(address, providerUrl);

Inputs

  • address: Ethereum address
  • providerUrl: Provider URL

Return value

Return ether amount in address

Account Amount

const amount = await ethToolbox.accountAmount(address, providerUrl);

Inputs

  • address: Ethereum address
  • providerUrl: Provider URL

Return value

{
  usd: {
    price: 338.73,
    balance: 11.70036773046875,
    total: 3963.26556134168,
  },
  eur: {
    price: 284.53,
    balance: 11.70036773046875,
    total: 3329.1056303502733,
  },
  cny: {
    price: 2269.82,
    balance: 11.70036773046875,
    total: 26557.72868197258,
  },
  krw: {
    price: 386628.54,
    balance: 11.70036773046875,
    total: 4523696.093094246,
  },
  jpy: {
    price: 38280.56,
    balance: 11.70036773046875,
    total: 447896.6289282728,
  }
}

Get Seed

const seed = await ethToolbox.getSeed(keystore, password);

Inputs

  • keystore: Deserialize keystore
  • password: Password to decode keystore

Return value

Return seed

Extra tools

Create Vault

const ks = ethToolbox.utils.createVault({ password, seedPhrase, hdPathString });

Inputs

  • password: New password
  • seedPhrase: Seed phrase (12 words)
  • hdPathString

Return value

New serialized keystore

Deserialize keystore

const dsKeystore = ethToolbox.utils.deserializeKeystore(serializedKeystore);

Inputs

  • serializedKeystore: Serialized keystore

Return value

Deserialize keystore

Generate Random Seed

const seed = ethToolbox.utils.generateRandomSeed(entropy);

Inputs

  • entropy

Return value

Random phrase of 12 words

is Address

const test = ethToolbox.utils.isAddr(ethAddr);

Inputs

  • ethAddr: Ethereum address

Return value

Return true if ethAddr is a Etherem address valid

Add 0x

const formated = ethToolbox.utils.add0x(ethAddr);

Inputs

  • ethAddr: Ethereum address

Return value

Formated address

Get Signed web3

const web3 = ethToolbox.utils.getSignedWeb3(privateKey, address)

Inputs

  • privateKey: Private key
  • addressy: Ethereum address

Return value

New Web3 instance

Install

// use npm
npm install --save eth-toolbox

// use yarn
yarn add eth-toolbox

Example

git clone https://github.com/dethertech/eth-toolbox.git
yarn
yarn run example

Dev

git clone https://github.com/dethertech/eth-toolbox.git
cd eth-toolbox
yarn

Test

npm test

Build doc

# Install ESDoc
yarn

# Run ESDoc.
yarn run:doc

Dependencies

Dev Dependencies

Bugs

When you find issues, please report them:

License

Donation