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.
@celastrina/timer
Advanced tools
Celastrina Add-On for Time Triggers in Azure Functions.
Creating your first Timer Function:
const {LOG_LEVEL, CelastrinaError, Configuration} = require(“@celastrina/core”);
const {TickEvent, TimerFunction, TimerAddOn} = require(“@celastrina/timer”);
class MyFirstFunction extends TimerFunction {
constructor(config) {
super(config);
}
async onTick(event) {
// Successful tick event!
event.context.log("Welcome!", LOG_LEVEL.INFO);
// To reject the event
//event.reject(CelastrinaError.newError("Something Happened!"));
// To abort the event, set TimerAddOn.abortOnReject=true, or invoke event.abort();
}
async onReject(event) {
// Rejected tick event.
// Rejections do not throw exceptions unless TimerAddOn.abortOnReject=true.
}
async onAbort(event) {
// Aborted event. Typically when an exception happens or TimerAddOn.abortOnReject=true.
// TimerFunction will throw the exception after this method is called.
}
}
const _config = new Configuration(“MyFirstFunction”);
const _timerconfig = new TimerAddOn();
_config.addOn(_timerconfig);
module.exports = new MyFirstFunction (_config);
You will need to make a few updates to your function.json. You’ll need to add an “entryPoint” attribute with the value “execute” and ensure your binding is named “tick”.
{
“entryPoint”: “execute”,
"bindings": [
{
"name": "tick",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 */5 * * * *"
}
]
}
For more information please visit @celastrina/timer wiki on Github.
FAQs
Timer Function Package for Celastrina
We found that @celastrina/timer 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.