Socket
Socket
Sign inDemoInstall

web3-stream-provider

Package Overview
Dependencies
8
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    web3-stream-provider

Utility for creating an Ethereum web3 provider that forwards payloads through a stream.


Version published
Weekly downloads
254
decreased by-22.56%
Maintainers
1
Install size
183 kB
Created
Weekly downloads
 

Readme

Source

web3-stream-provider

Utility for creating an Ethereum web3 provider that forwards payloads through a stream. Only works for async payloads.

For connecting to a remote eth rpc handler

const StreamProvider = require('web3-stream-provider')

var streamProvider = new StreamProvider()
var web3 = new Web3(streamProvider)

streamProvider.pipe(remoteRpcHandler).pipe(streamProvider)

For handling incoming rpc payloads

const handleRequestsFromStream = require('web3-stream-provider/handler')

handleRequestsFromStream(remoteStream, provider, logger)

function logger(err, request, response){
  console.log(arguments)
}

Keywords

FAQs

Last updated on 26 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc