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/ishan27g/vclock
package main
import "github.com/Ishan27gOrg/vClock"
// VectorClock : provides interface to implement vector clock
type VectorClock interface {
// SendEvent returns the current vector clock after first updating self clock and then
// updating the individual clocks for corresponding addresses
SendEvent(id string, addresses []string) vClock.EventClock
// Get returns the current vector clock
Get(id string) vClock.EventClock
// ReceiveEvent updates the current vector clock using element wise maximum with the passed vector clock
ReceiveEvent(id string, v vClock.EventClock)
Clear(id string)
print()
}
// Events : provides interface to merge and order events based on vector clocks
type Events interface {
// MergeEvents merges the current event clocks with received event clocks, new events are added to current list
MergeEvents(es ...vClock.Event)
// MergeEvent takes an eventId & clock and merges with existing clock, new events are added to current list
MergeEvent(e vClock.Event)
// GetCurrentEvents returns the events currently saved. Not in order
GetCurrentEvents() []vClock.Event
// GetEventsOrder returns the eventIds ordered according to vector clock for the events
GetEventsOrder() (ids []string)
}
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.