Still a work in progress, feel free to log any issues
A light weight Ethereum RPC interface written in ES6. RPC calls return a promise/stream.
npm install ethjs
import Eth from 'ethjs';
const client = new Eth('<httpProviderUrl>');
RPC methods exposed on client and follow function signature of RPC spec
client.getCoinbase()
.then(address => console.log(address), err => console.error(err));
Create contracts and generate an JS contract interface using the ABI.
const contract = client.contracts.create(abi, {
from: '<fromAddress>',
data: contractCode,
gas: 1000000,
}).subscribe(res => console.log(res), err => console.error(err));
Contract functions can then be called
contract.aFunctionName(10, 'an argument').subscribe(res => console.log(res), err => console.error(err));
Events can be subscribed to
contract.AnEvent().subscribe(res => console.log(res), err => console.error(err));
Feel free to create issues or pull requests!