Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/eblume/proto
proto
gives Go operations like Map
, Reduce
, Filter
, De/Multiplex
, etc.
without sacrificing idiomatic harmony or speed. It also introduces a convenience
type for these functions, Proto
, which is a stand-in for the empty interface
(interface{}), which is used to box values being sent to these operations.
Please see documentation.{txt,html} for the automatically generated documentation - or better yet, just run:
godoc github.com/eblume/proto | less
That's probably a better idea since there's a decent chance the documentation might be lagging behind the current code base, since it has to be run manually (at this moment).
You can also take a look at the *_test.go files for an even better look in to how to use Proto. I will make one disclaimer, which is that code written with Proto has some unavoidable boilerplate in the form of casting to/from the Proto type - this boilerplate is annoying but is much less obvious and significant with larger code bases that use Proto-style channels in chains.
Double every integer in a slice:
inputs := []Proto{0, 1, 2, 3, 4, 5, 6}
sent := Send(inputs)
doubler := func(a Proto) Proto {
return a.(int) * 2
}
mapped := Map(doubler, sent)
doubled := Gather(mapped)
Double every integer, chained:
doubled := Gather(Map(func(a Proto) Proto {
return a.(int) * 2
}, Send([]Proto{0, 1, 2, 3, 4, 5, 6})))
Please see COPYING for more details on the licensing of this software.
FAQs
Unknown package
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.