Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
eth-provider
Advanced tools
Seamlessly connect to HTTP, WebSocket, IPC and Injected RPC transports in Node and the Browser!
eth_pollSubscriptions
method for HTTP subscriptions (supported by Frame)npm install eth-provider --save
const provider = require('eth-provider')
const web3 = new Web3(provider())
const provider = require('eth-provider')
const web3 = new Web3(provider('wss://rinkeby.infura.io/ws'))
['injected', 'wss://rinkeby.infura.io/ws']
will first try to discover injected providers and if unsuccessful connect to the Infura endpointconst provider = require('eth-provider')
const web3 = new Web3(provider(['injected', 'wss://rinkeby.infura.io/ws']))
'direct'
preset, or by passing custom IPC pathsconst provider = require('eth-provider')
const web3 = new Web3(provider('direct'))
injected
- Discover providers injected by environment, usually by the browser or a browser extension
['injected']
frame
- Connect to Frame running on the user's device
['ws://127.0.0.1:1248', 'http://127.0.0.1:1248']
direct
- Connect to local Ethereum nodes running on the user's device
['ws://127.0.0.1:8546', 'http://127.0.0.1:8545']
[/* Default IPC paths for platform */, 'ws://127.0.0.1:8546', 'http://127.0.0.1:8545']
infura
- Connect to Mainnet Infura
['wss://mainnet.infura.io/ws', 'https://mainnet.infura.io/upS1XaBx0l4b9ntUUVQv']
infuraRinkeby
- Connect to Rinkeby Infura
['wss://rinkeby.infura.io/ws', 'https://rinkeby.infura.io/upS1XaBx0l4b9ntUUVQv']
If you do not pass any targets, eth-provider will use default targets ['injected', 'frame']
in the Browser and ['frame', 'direct']
in Node and Electron.
FAQs
A Universal Ethereum Provider
The npm package eth-provider receives a total of 7,006 weekly downloads. As such, eth-provider popularity was classified as popular.
We found that eth-provider demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.