Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Hongbomiao.com | 159 | a day ago | 49 | mit | TypeScript | |||||
Personal cutting-edge technology lab | ||||||||||
Eth Provider | 158 | 11 | 33 | 2 months ago | 51 | October 27, 2022 | 9 | gpl-3.0 | JavaScript | |
A Universal Ethereum Provider Client | ||||||||||
Ethers Multicall | 126 | 17 | a year ago | 10 | April 08, 2022 | 16 | mit | TypeScript | ||
Make multiple Ethereum network requests in a single HTTP query. ethcall for ethers v5. | ||||||||||
Eth | 60 | 8 years ago | gpl-2.0 | C | ||||||
extreme throughput http daemon | ||||||||||
Coinbase.commerce | 40 | a year ago | 11 | May 16, 2021 | 1 | other | C# | |||
:moneybag: A .NET/C# implementation of the Coinbase Commerce API. | ||||||||||
Web3scala | 19 | 5 years ago | 1 | apache-2.0 | Scala | |||||
Scala library for integration with Ethereum clients | ||||||||||
Tlsnutils | 12 | 6 years ago | mit | JavaScript | ||||||
Solidity Library for parsing and verifying TLS-N proofs. | ||||||||||
Jeth | 10 | 1 | 7 years ago | 2 | July 09, 2016 | mit | Ruby | |||
Ethereum JSON RPC client. | ||||||||||
Kaleido Examples | 9 | 10 months ago | 4 | Java | ||||||
A collection of examples for connecting to a Kaleido node with Basic Auth | ||||||||||
0x Api Swap | 7 | 6 months ago | mit | TypeScript | ||||||
A library targeting for 0x DeFi aggregator API. |
Seamlessly connect to HTTP, WebSocket, IPC and Injected RPC transports in Node and the Browser!
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://sepolia.infura.io/ws/v3/${INFURA_ID}))
['injected', 'wss://sepolia.infura.io/ws/v3/${INFURA_ID}']
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://sepolia.infura.io/ws/v3/${INFURA_ID}']))
'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/v3/${infuraId}', 'https://mainnet.infura.io/v3/${infuraId}']
alchemy
- Connect to Mainnet Alchemy
['wss://eth-mainnet.ws.alchemyapi.io/v2/${alchemyId}', 'https://eth-mainnet.alchemyapi.io/v2/${alchemyId}']
View all possible presets here
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.
When creating the provider you can also pass an options object
infuraId
- Your projects Infura IDalchemyId
- Your projects Alchemy IDorigin
- Used when connecting from outside of a browser env to declare the identity of your connection to interfaces like Frame (this currently doesn't work with HTTP connections)provider('infura', { infuraId: '123abc' })
or provider({ origin: 'DappName', infuraId: '123abc' })
The origin setting will only be applied when a dapp is connecting to from outside of a browser env.