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.
ataraxia-services
Advanced tools
Services with RPC and events for Ataraxia.
This project provides a service layer on top of a Ataraxia network and allows nodes to easily register services and to call methods and receive events on services on other nodes.
npm install ataraxia-services
const Services = require('ataraxia-services');
const net = ... // setup network with at least one transport
const services = new Services(net);
// Listen for services
services.on('available', service => console.log(service.id, 'is now available'));
services.on('unavailable', service => console.log(service.id, 'is no longer available'));
// Register services
const handle = services.register('service-id', {
hello() {
return 'Hello world';
}
});
// Emit events
handle.emitEvent('hello', { data: 'goes-here' });
// Interact with services
const service = services.get('service-id');
service.hello()
.then(result => console.log('service said', result))
.catch(handleErrorCorrectlyHere);
service.on('hello', data => console.log('got', data));
Services are simple objects:
services.register('service-id', {
hello(what='world') {
return 'Hello ' + what;
},
property: 1234
});
The only special part of services is that the metadata
property is
automatically distributed througout the network.
services.register('service-with-metadata', {
metadata: {
type: 'cookie-factory'
},
cookiesMade: 0,
makeCookie() {
return ++this.cookiesMade;
}
});
The metadata can be access on any node:
const service = services.get('service-with-metadata');
if(service) {
console.log(service.metadata.type);
}
FAQs
Services with RPC and events over Ataraxia mesh network
The npm package ataraxia-services receives a total of 7 weekly downloads. As such, ataraxia-services popularity was classified as not popular.
We found that ataraxia-services 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.
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.