@starcoin/stc-json-rpc
v0.2.4
Published
json-rpc-engine middleware for Starcoin's endpoints
Downloads
3
Readme
stc-json-rpc
json-rpc-engine
middleware for starcoin's REST endpoints.
usage as provider
const createInfuraProvider = require('stc-json-rpc/src/createProvider')
const Ethjs = require('ethjs')
const provider = createInfuraProvider({ network: 'main', projectId: 'example' })
const eth = new Ethjs(provider)
usage as middleware
const createInfuraMiddleware = require('stc-json-rpc')
const RpcEngine = require('json-rpc-engine')
const engine = new RpcEngine()
engine.push(createInfuraMiddleware({ network: 'barnard', projectId: 'example' }))
Running Tests
yarn test