ethereum-rpc-promise

2.1.3 • Public • Published

ethereum-rpc-promise

npm package

NPM version Dependency Status Known Vulnerabilities Downloads

A modern promise based node.js library for communicating with Ethereum daemon.

Install

npm install --save ethereum-rpc-promise

Usage

Start ethereum daemon with rpc support:

./geth --rpc

Connect to daemon endpoint and send rpc commands:

const EthereumRpc = require('ethereum-rpc-promise');
 
let eth = new EthereumRpc('http://localhost:8545');
 
// call named wrappers
eth.web3_sha3('0x12345678').then(result) => {
  console.log(result);
});
 
// or call raw commands
eth.call('web3_sha3', '0x12345678').then(result) => {
  console.log(result);
});
 

Documentation

Ethereum Wiki

Readme

Keywords

Package Sidebar

Install

npm i ethereum-rpc-promise

Weekly Downloads

1

Version

2.1.3

License

MIT

Unpacked Size

5.73 kB

Total Files

6

Last publish

Collaborators

  • lovevialik