Returns the native addon, running the slsa wget flow (verify +
download) first when the binary is missing on disk.
With no arguments, the caller's source file is captured via
util.getCallSites() and the enclosing package.json is discovered
by walking up directories. Pass { from: import.meta.url } when the
caller is not inside the consuming package.
T defaults to unknown; supply the addon's type at the call site
to avoid narrowing each access.
// inside the consuming package, e.g. packages/my-addon/src/index.ts import { requireAddon } from"node-addon-slsa";
Returns the native addon, running the
slsa wgetflow (verify + download) first when the binary is missing on disk.With no arguments, the caller's source file is captured via
util.getCallSites()and the enclosingpackage.jsonis discovered by walking up directories. Pass{ from: import.meta.url }when the caller is not inside the consuming package.Tdefaults tounknown; supply the addon's type at the call site to avoid narrowing each access.