@mainframe/transport-web3
v0.1.1
Published
Web3 transport
Downloads
7
Keywords
Readme
transport-web3
Web3 transport for browser as a RxJS Subject
.
Installation
yarn add @mainframe/transport-web3
Usage
import web3Transport from '@mainframe/transport-web3'
const transport = web3Transport('http://localhost:8500')
transport.subcribe(console.log)
transport.next({ jsonrpc: '2.0', id: 1, method: 'web3_clientVersion' })
API
web3Transport()
Arguments
url?: string
: optional HTTP endpoint. When not provided,window.web3.currentProvider
will be used if available.
Returns Rx.Subject<Object>
License
MIT