@oona/vlo / host / signSignalLink
Function: signSignalLink()
signSignalLink(
secret,link):string
Defined in: sdk/ts/sdk/src/host/links.ts:53
Mints the token for a link: v1.<expiresAtMs>.<hmac-sha256 hex>. The host's POST /v1/runs/{id}/links/{name} route does this for you; call it directly to mint links out of band with the same secret (linkSecret).
Parameters
secret
string
link
Returns
string
Example
ts
const token = signSignalLink(secret, {
runId: "run_1",
name: "approve",
expiresAtMs: Date.now() + DEFAULT_LINK_TTL_MS,
});
verifySignalLink(secret, token, "run_1", "approve", Date.now()); // true