
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@relaycorp/awala-endpoint-internet
Advanced tools
JS library to make it easier for a server-side app to exchange messages with the Awala Internet Endpoint
@relaycorp/awala-endpoint-internet
High-level JS library to process Awala Internet Endpoint-compatible CloudEvents.
To convert an incoming service message wrapped in a CloudEvent
, simply call makeIncomingServiceMessage
.
For example, the following Fastify route accepts CloudEvents in binary mode and the converts them to service messages:
import { CloudEventV1, HTTP } from 'cloudevents';
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
export async function registerEventReceiver(server: FastifyInstance): Promise<void> {
// Accept any content type
server.removeAllContentTypeParsers();
server.addContentTypeParser('*', { parseAs: 'buffer' }, (_req, payload, next) => {
next(null, payload);
});
server.post('/', async (request, reply) => {
let event: CloudEventV1<Buffer>;
try {
event = HTTP.toEvent({ headers: request.headers, body: request.body });
} catch (err) {
// Malformed CloudEvent
return reply.status(400).send({ reason: err.message });
}
const message = makeIncomingServiceMessage(event);
request.log.info({ parcelId: message.parcelId }, 'Incoming service message');
return reply.status(204).send();
});
}
To convert an outgoing service message to a CloudEvent
, simply call makeOutgoingCloudEvent
.
For example:
import { makeOutgoingCloudEvent, OutgoingServiceMessage } from '@relaycorp/awala-endpoint-internet';
const outgoingServiceMessage: OutgoingServiceMessage = {
recipientId: '<Insert Awala endpoint id of recipient>',
contentType: 'application/vnd.your-company.your-service.Greeting',
data: Buffer.from('Hello, world!'),
};
const outgoingEvent = makeOutgoingCloudEvent(outgoingServiceMessage);
Finally, send the outgoingEvent
to the Awala Internet Endpoint using your cloudevents emitter. For example:
import { httpTransport, emitterFor } from 'cloudevents';
const emit = emitterFor(httpTransport('https://cloudevents-broker.com'));
emit(event);
See API documentation.
FAQs
JS library to make it easier for a server-side app to exchange messages with the Awala Internet Endpoint
We found that @relaycorp/awala-endpoint-internet demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.