
Loading...

Loading...
Capability · Worker ops
The Docker-free operator surface: read live protocol config, inspect any worker's on-chain status, see its suspension & slashing exposure, and classify a job - the same reads the desktop Action Center and the lightnode worker CLI use. Write ops (settle, clearStuck, withdraw, deregister) sign with your own key.
import { WorkerOperator } from "lightnode-sdk";
const op = new WorkerOperator("mainnet", { publicClient, walletClient });
await op.config(); // live AIConfig: stake floor, timeouts, slash bps
await op.status(); // registered, stake, claimable, below-floor
await op.clearStuck(jobIds); // recover acked-but-stuck jobs that block exit
await op.unstickAndDeregister(jobIds); // clear + settle + withdraw + exitScaffold a runnable operator console with npx lightnode add worker-operator.