signWebhook
function signWebhook( secret, id, timestamp, body): Promise<string>;Defined in: src/sinks/webhook.ts:106
Sign one message: v1, + base64(HMAC-SHA256(key, ${id}.${timestamp}.${body})).
timestamp is unix seconds.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
secret |
string |
id |
string |
timestamp |
number |
body |
string |
Returns
Section titled “Returns”Promise<string>
Example
Section titled “Example”import { signWebhook } from "@xtandard/audit/sinks/webhook";
const signature = await signWebhook("whsec_…", "evt_…", 1_720_000_000, body); // "v1,…"