eth-toolbox
Simple Ethereum toolbox
Table of Contents
- Get Started
- Usages
- Extra tools
- Install
- Example
- Dev
- Test
- Build doc
- Dependencies
- Dev Dependencies
- Bugs
- License
- Donation
Get Started
npm install --save eth-toolbox
Usages
Create Keystore
const ks = await ethToolbox
Inputs
entropy
: Random numberpassword
: Password to decode keystore
Return value
Return serialize keystore
Decode Keystore
const ks = await ethToolbox;
Inputs
keystore
: Deserialize keystorepassword
: Password to decode keystore
Return value
ks = address privateKey
Send Ether
const tsx = await ethToolbox;
Inputs
address
: Ethereum addressamount
: Amountkeystore
: Deserialize keystorepassword
: 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;
Inputs
address
: Ethereum addressnetwork
: Network numberetherScanKey
: API key etherscanproviderUrl
: 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;
Inputs
address
: Ethereum addressproviderUrl
: Provider URL
Return value
Return ether amount in address
Account Amount
const amount = await ethToolbox;
Inputs
address
: Ethereum addressproviderUrl
: Provider URL
Return value
usd: price: 33873 balance: 1170036773046875 total: 396326556134168 eur: price: 28453 balance: 1170036773046875 total: 33291056303502733 cny: price: 226982 balance: 1170036773046875 total: 2655772868197258 krw: price: 38662854 balance: 1170036773046875 total: 4523696093094246 jpy: price: 3828056 balance: 1170036773046875 total: 4478966289282728
Get Seed
const seed = await ethToolbox;
Inputs
keystore
: Deserialize keystorepassword
: Password to decode keystore
Return value
Return seed
Extra tools
Create Vault
const ks = ethToolboxutils;
Inputs
password
: New passwordseedPhrase
: Seed phrase (12 words)hdPathString
Return value
New serialized keystore
Deserialize keystore
const dsKeystore = ethToolboxutils;
Inputs
serializedKeystore
: Serialized keystore
Return value
Deserialize keystore
Generate Random Seed
const seed = ethToolboxutils;
Inputs
entropy
Return value
Random phrase of 12 words
is Address
const test = ethToolboxutils;
Inputs
ethAddr
: Ethereum address
Return value
Return true if ethAddr is a Etherem address valid
Add 0x
const formated = ethToolboxutils;
Inputs
ethAddr
: Ethereum address
Return value
Formated address
Get Signed web3
const web3 = ethToolboxutils
Inputs
privateKey
: Private keyaddressy
: 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
- babel-cli
- babel-core
- babel-eslint
- babel-polyfill
- babel-preset-latest
- chai
- chai-as-promised
- esdoc
- esdoc-standard-plugin
- eslint
- eslint-config-airbnb-base
- eslint-plugin-import
- mocha
Bugs
When you find issues, please report them: