0.2.1 • Published 6 months ago

open-jsonrpc-provider v0.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

open-jsonrpc-provider

A provider can be used in javascript projects

Features

  1. Implement EIP-1193
  2. Compatible with send, call, request, sendAsync standard ✅
  3. Support HTTP ✅
  4. Support WebSocket ✅
  5. Support middleware
  6. 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 and esm

Other Implementations