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.
a node RPC library based on socket.io
const server = require('arpc/server')(2333)
server.createService('test', {
a: [() => {
return 233
}]
})
(async function(){
const client = require('arpc/client')
let obj = client('ws://127.0.0.1:2333', 'test')
console.log(await obj.a[0]())
//output: 233
})()
require('arpc/client')
client(socketOrUrl, name, obj = null, path = '/rpc')
socketOrUrl: Socket | string
obj: any
object for the calling from the serverpath: string
the path for socket.io (invalided if you passed a socket at the first parameter). this can be a secret token for rpc connection: Promise
a object which can call the remote object with a prochain way (see examples)require('arpc/server')
server(ioOrPort, path = '/rpc')
ioOrPort: Server | number
path: string
the same as the client api: RPC
the rpc objectrequire('arpc')
new RPC()
connected(conn, name = 'server')
call this when sockets connected
conn: Socket
name: string
the service we request the other sidecreateService(name, obj, onConnect, onDisconnect)
name: string
the name of the service we createobj: any
the object we provide for the remote callingonConnected: (object: Promise) => undefined
(optional) the function which will be called when a client connectsonDisconnect: (socket: Socket, reason: string) => undefined
(optional) the function which will be called when a client disconnectsgetServer(obj = null)
creates a remote object from the server
obj: any
the object we provide for the remote calling: Promise
the remote object from the serverMIT
FAQs
Unknown package
The npm package arpc receives a total of 393 weekly downloads. As such, arpc popularity was classified as not popular.
We found that arpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
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.