Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
burner-provider
Advanced tools
Ephemeral key pair web3 provider
Here is an example React app that uses the burner-provider!
npm install burner-provider
Pass BurnerProvider
into Web() to initialize:
import BurnerProvider from 'burner-provider';
import Web3 from 'web3';
var web3 = new Web3(new BurnerProvider('http://localhost:8545'));
You can get your address with:
let accounts = await web3.eth.getAccounts()
Now your transactions will automatically sign and send:
var tx = {
to: this.state.to,
from: this.state.accounts[0],
value: this.state.value,
data: '0x00'
}
web3.eth.sendTransaction(tx).then((receipt)=>{
console.log("receipt",receipt)
this.setState({receipt:receipt})
});
You also can access the private key directly with:
localStorage.getItem('metaPrivateKey')
Optional Parameters:
var web3 = new Web3(new BurnerProvider({
rpcUrl: 'http://localhost:8545',
namespace: 'YourCoolUrl'
}));
Websockets work too:
var web3 = new Web3(new BurnerProvider('wss://mainnet.infura.io/ws'));
Full CLI Example:
index.js
:
var Web3 = require("web3")
var BurnerProvider = require("burner-provider")
var web3 = new Web3(new BurnerProvider('https://mainnet.infura.io'));
const message = "three six nine the goose drank wine"
web3.eth.getAccounts((err,accounts)=>{
console.log("accounts:",accounts)
web3.eth.sign(message,accounts[0],(err,sig)=>{
console.log("sig",sig)
let recovered = web3.eth.accounts.recover(message,sig)
console.log("recovered",recovered)
console.log("valid:",recovered===accounts[0])
web3.currentProvider.stop()
})
})
npm install web3 burner-provider
node index.js
FAQs
Ephemeral key pair web3 provider
The npm package burner-provider receives a total of 265 weekly downloads. As such, burner-provider popularity was classified as not popular.
We found that burner-provider 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.