
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
watch-eth is a robust library for watching Ethereum events.
Applications sometimes make critical decisions based on Ethereum events.
It's therefore important that these applications have a way to watch for events that won't fail.
You can install watch-eth via npm:
npm install --save watch-eth
Start by creating an EventWatcher instance for your contract:
const { EventWatcher } = require('watch-eth')
const watcher = new EventWatcher({
address: '0xc8a5ba5868a5e9849962167b2f99b2040cee2031',
abi: [{"anonymous":false,"inputs":[{"indexed":false,"name":"_value","type":"uint256"}],"name":"TestEvent","type":"event"}],
finalityDepth: 12 // optional
pollInterval: 10000 // optional
})
Now you can subscribe or unsubscribe to an event:
const listener = () => {
console.log('Detected TestEvent!')
}
watcher.subscribe('TestEvent', listener)
// Stuff
watcher.unsubscribe('TestEvent', listener)
watch-eth is designed to be modular, meaning most of the components can be replaced with custom logic.
For example, if you want to use ethers for connecting to Ethereum instead of web3, you can simply replace DefaultEthProvider with a custom class.
watch-eth will only relay an Ethereum event if it satisfies the following conditions:
FAQs
Robust library for listening to Ethereum events
We found that watch-eth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.