Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
web3-provider-engine
Advanced tools
Web3 ProviderEngine is a tool for composing your own [web3 providers](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3).
Web3 ProviderEngine is a tool for composing your own web3 providers.
Status: WIP - expect breaking changes and strange behaviour
Built to be modular - works via a stack of 'sub-providers' which are like normal web3 providers but only handle a subset of rpc methods,
specified via subProvider.methods = ['eth_call', 'etc...']
.
The subproviders can emit new rpc requests in order to handle their own; e.g. eth_call
may trigger eth_getAccountBalance
, eth_getCode
, and others.
The provider engine also handles caching of rpc request results.
var engine = new ProviderEngine()
var web3 = new Web3(engine)
// static - e.g.: web3_clientVersion
engine.addSource(new DefaultStatic())
// filters - e.g.: eth_newBlockFilter
engine.addSource(new FilterSubprovider({
rootProvider: engine,
}))
// vm - e.g.: eth_call
engine.addSource(new VmSubprovider({
rootProvider: engine,
}))
// id mgmt - e.g.: eth_signTransaction
engine.addSource(new LightWalletSubprovider({
rootProvider: engine,
}))
// data source - e.g.: eth_getBalance
engine.addSource(new RpcSubprovider({
rpcUrl: 'https://rpc.metamask.io/',
}))
// start polling for blocks
engine.start()
The Ethereum JSON RPC was not designed to have one node service many clients. However a smaller, lighter subset of the JSON RPC can be used to provide the blockchain data an Ethereum 'zero-client' node would need to function. We handle as many types of requests locally as possible, and just let data lookups fallback to some data source ( hosted rpc, blockchain api, etc ). Categorically, we don’t want / can’t have the following types of RPC calls go to the network:
FAQs
A JavaScript library for composing Ethereum provider objects using middleware modules
The npm package web3-provider-engine receives a total of 62,312 weekly downloads. As such, web3-provider-engine popularity was classified as popular.
We found that web3-provider-engine demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.