Skip to content

Instantly share code, notes, and snippets.

View awhit012's full-sized avatar

Alex White awhit012

View GitHub Profile
@xavierlepretre
xavierlepretre / rxifyWeb3.js
Last active September 12, 2019 22:29
Convert `web3.eth` asynchronous calls into Rx observables.
const Rx = require('rx');
module.exports = {
rxify: function (web3) {
// List synchronous functions masquerading as values.
var syncGetters = {
db: [],
eth: [ "accounts", "blockNumber", "coinbase", "gasPrice", "hashrate",
"mining", "protocolVersion", "syncing" ],
net: [ "listening", "peerCount" ],