
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
bnc-notify
Advanced tools
A JavaScript library for real time notifications for Ethereum transaction state changes.
npm install bnc-notify
import Notify from 'bnc-notify'
import Web3 from 'web3'
const web3 = new Web3(window.ethereum)
const options = {
dappId: 'Your dappId here',
networkId: 1
}
// initialize notify
const notify = Notify(options)
// get users' account address
const accounts = await window.ethereum.enable()
// send a transaction
web3.eth
.sendTransaction({
from: accounts[0],
to: '0x792ec62e6840bFcCEa00c669521F678CE1236705',
value: '100000'
})
// listen for transaction hash
.on('transactionHash', hash => {
// pass the hash to notify.hash function for transaction updates and notifications
const { emitter } = notify.hash(hash)
// use emitter to listen to transaction events
emitter.on('txSent', console.log)
emitter.on('txPool', console.log)
emitter.on('txConfirmed', console.log)
emitter.on('txSpeedUp', console.log)
emitter.on('txCancel', console.log)
emitter.on('txFailed', console.log)
emitter.on('txStuck', console.log)
emitter.on('all', console.log)
})
For detailed documentation head to docs.blocknative.com
FAQs
Show web3 users realtime transaction notifications
The npm package bnc-notify receives a total of 411 weekly downloads. As such, bnc-notify popularity was classified as not popular.
We found that bnc-notify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.