CLI
The arkiv-triggers command and every environment variable it reads.
Commands
| Command | What it does |
|---|---|
npx arkiv-triggers | Run a worker configured from the environment, then ./.env |
npx arkiv-triggers new-key | Print a fresh wallet to use as WORKER_KEY, and its address |
npx arkiv-triggers --help | Show the settings |
Once installed, the same command is also arkiv-triggers-worker.
Environment
| Variable | Required | Secret | Meaning |
|---|---|---|---|
WORKER_KEY | Yes | Yes | The worker's wallet key (0x + 64 hex). Must hold test GLM |
ARKIV_ACCESS_KEY | Recommended | Yes | Arkiv access key. Without it the worker warns and uses the anonymous budget |
WORKER_MODE | No | No | any (default) or own |
TG_TOKEN | No | Yes | Telegram bot token: enables the Telegram action and the /start reply |
OPERATOR | No | No | Your main wallet, to link the worker |
OPERATOR_SIG | With OPERATOR | No | Your signature linking it |
ARKIV_RPC_URL | No | No | Override the Tiramisu HTTPS endpoint |
ARKIV_WS_URL | No | No | Override the Tiramisu WebSocket endpoint |
PORT | No | No | Serve GET /healthz on this port |
Values already in the environment win over .env.
Startup checks
The worker exits with a clear message when WORKER_KEY is missing or malformed, WORKER_MODE is not
any or own, OPERATOR is not an address, only one of OPERATOR and OPERATOR_SIG is set, or the
wallet has no GLM.
/healthz
200 while the worker's last processed block keeps moving; 503 once it has been stuck for 2 minutes.
The body is JSON: ok, worker, version, rules, fired, failed, skipped, lastBlock, heartbeat.
Signals
SIGINT or SIGTERM finishes actions in flight and exits 0; a second signal exits at once.