open-jsonrpc-provider
v0.2.1
Published
A JSON-RPC provider can be used in both browser and node.js environment.
Downloads
71
Readme
open-jsonrpc-provider
A provider can be used in javascript projects
Features
- Implement EIP-1193 ✅
- Compatible with
send
,call
,request
,sendAsync
standard ✅ - Support HTTP ✅
- Support WebSocket ✅
- Support middleware
- Support proxy mode ✅
Guides
Install
npm install open-jsonrpc-provider
How to use
const { HttpProvider } = require('open-jsonrpc-provider');
const provider = new HttpProvider({
url: 'http://localhost:8545',
});
provider.request({
method: 'eth_blockNumber',
params: []
}).then(console.log);
TODO
- [ ] Support both browser and nodejs
- [ ] Provide two module standard:
commonjs
andesm