Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oboe = require('oboe')
- var net = require('net');
- var client = net.createConnection("/tmp/geth.ipc");
- client.on("connect", function() {
- oboe(client)
- // called each time a full json object is parsed
- .done(function(newHead){
- console.log(newHead);
- console.log();
- });
- client.write('{"id": 1, "method": "eth_subscribe", "params": ["newHeads"]}');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement