f-o-a-m / purescript-web3

a purescript library for the web3 api
Apache License 2.0
127 stars 24 forks source link

Add the possibility to stream events #29

Closed kejace closed 6 years ago

kejace commented 6 years ago

An integration with https://github.com/blinky3713/purescript-monadic-streams or https://github.com/purescript-contrib/purescript-machines is likely the solution.

cmditch commented 6 years ago

This is relevant. I know it's how events are handled in web3.js 1.0

https://github.com/paritytech/parity/wiki/JSONRPC-Eth-Pub-Sub-Module https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB https://github.com/MetaMask/provider-engine/issues/189

Since metamask ultimately connects to services like Infura, and Infura has yet to add websocket support, it's questionable whether or not the eth_subscribe will be supported anytime soon for metamask users.

From my discussions with @kumavis, they plan on just creating a shim for the time being - as well as Metamask's move to stop injecting web3.js and just inject a provider instance.

martyall commented 6 years ago

this was implemented in #42