@mechamittens/eth-json-rpc-alchemy
v0.0.1
Published
json-rpc-engine middleware for Alchemy's endpoints
Downloads
4
Keywords
Readme
eth-json-rpc-alchemy
json-rpc-engine
middleware for Alchemy's REST endpoints, based off eth-json-rpc-infura
.
usage as provider
const createAlchemyProvider = require('eth-json-rpc-alchemy/src/createProvider')
const Ethjs = require('ethjs')
const provider = createAlchemyProvider({ network: 'mainnet', projectId: 'example' })
const eth = new Ethjs(provider)
usage as middleware
const createAlchemyMiddleware = require('eth-json-rpc-alchemy')
const RpcEngine = require('json-rpc-engine')
const engine = new RpcEngine()
engine.push(createAlchemyMiddleware({ network: 'ropsten', projectId: 'example' }))