snurra-socket

1.0.0 • Public • Published

snurra-socket

A wrapper around the ws npm module that adds JSON-parsing stream interface.

Example usage

Below is an example that subscribes to all the transactions happening on the Stellar network. Stellar API endpoint documentation

= require 'highland'
socket = require('./index')()
 
_(socket('message')).each console.log
 
socket('connect').write 'ws://live.stellar.org:9001'
 
socket('send').write
  "command" : "subscribe"
  "streams" :  [ "transactions" ]
 

Readme

Keywords

none

Package Sidebar

Install

npm i snurra-socket

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mpj