Guest User

Untitled

a guest
Nov 25th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. daemon=1
  2. rpcallowip=0.0.0.0/0
  3. rpcuser=xxxxxxxx
  4. rpcpassword=xxxxxxxxx
  5. server=1
  6. rest=1
  7. zmqpubhashblock=tcp://*:28332
  8. zmqpubhashtx=tcp://*:28332
  9. zmqpubrawblock=tcp://*:28332
  10. zmqpubrawtx=tcp://*:28332
  11. rpcworkqueue=100
  12.  
  13. const socket = ZMQ.socket('sub')
  14. socket.connect('tcp://myserverip:28332')
  15.  
  16. socket.on('message', (channel, data) => {
  17. console.log(channel.toString())
  18. })
  19.  
  20. socket.subscribe('rawtx')
  21.  
  22. socket.subscribe('rawblock')
  23.  
  24. socket.subscribe('rawblock')
  25. socket.subscribe('rawtx')
Add Comment
Please, Sign In to add comment