
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@metamask/nonce-tracker
Advanced tools
@metamask/nonce-tracker
How metamask calculates nonces
const NonceTracker = require('@metamask/nonce-tracker');
const nonceTracker = new NonceTracker(config);
nonceLock = nonceTracker.getNonceLock('0xselectedEthereumAddress');
nonce = nonceLock.nextNonce;
opts
Object {Object}
Returns Promise<Object> with the key releaseLock (the gloabl mutex)
address
highestLocallyConfirmed
number A hex string of the highest nonce on a confirmed transaction.nextNetworkNonce
number The next nonce suggested by the eth_getTransactionCount method.highestSuggested
number The maximum between the other two, the number returned.this will return an object with the nextNonce
nonceDetails
, and the releaseLock
Note: releaseLock must be called after adding a signed tx to pending transactions (or discarding).
address
{string} the hex string for the address whose nonce we are calculatingReturns Promise<NonceDetails>
yarn test
FAQs
Transaction nonce calculation used in MetaMask.
The npm package @metamask/nonce-tracker receives a total of 50,025 weekly downloads. As such, @metamask/nonce-tracker popularity was classified as popular.
We found that @metamask/nonce-tracker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.