@hostwebhook/node 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @hostwebhook/node
2
2
 
3
- Official Node.js SDK for [HostWebhook](https://hostwebhook.com) — verify webhook signatures and send webhooks through the platform.
3
+ > **Early Access** — This SDK is in early access. The API may change between versions. We'd love your feedback — [report an issue](https://www.hostwebhook.com/#issues) if you run into anything.
4
+
5
+ Official Node.js SDK for [HostWebhook](https://www.hostwebhook.com) — verify webhook signatures and send webhooks through the platform.
4
6
 
5
7
  ## Install
6
8
 
@@ -162,6 +164,18 @@ X-HostWebhook-Signature: t=<timestamp_ms>,v1=<hmac_hex>
162
164
 
163
165
  HMAC computed as: `HMAC-SHA256(secret, "${timestamp}.${rawBody}")`
164
166
 
167
+ ## Support
168
+
169
+ Found a bug or have a feature request? [Report an issue](https://www.hostwebhook.com/#issues) on our website.
170
+
171
+ ## Privacy
172
+
173
+ Your webhook data is yours. HostWebhook is built with privacy as a core principle:
174
+
175
+ - **Your payloads stay between you and your endpoints** — we never sell, share, or use your data for training.
176
+ - **Encryption in transit** — all traffic between the SDK, the platform, and your endpoints is sent over TLS.
177
+ - **Minimal data retention** — event payloads are stored only for delivery and debugging, and are automatically purged based on your plan's retention window.
178
+
165
179
  ## License
166
180
 
167
181
  MIT
package/dist/index.js CHANGED
@@ -231,8 +231,9 @@ var HostWebhook = class {
231
231
  ...options?.headers
232
232
  };
233
233
  if (this.signingSecret) {
234
- const sig = (0, import_crypto2.createHmac)("sha256", this.signingSecret).update(body).digest("hex");
235
- headers["X-Webhook-Signature"] = `sha256=${sig}`;
234
+ const timestamp = Math.floor(Date.now() / 1e3);
235
+ const sig = (0, import_crypto2.createHmac)("sha256", this.signingSecret).update(`${timestamp}.${body}`).digest("hex");
236
+ headers["X-HostWebhook-Signature"] = `t=${timestamp},v1=${sig}`;
236
237
  }
237
238
  const url = `${this.baseUrl}/api/in/${this.token}`;
238
239
  const controller = new AbortController();
package/dist/index.mjs CHANGED
@@ -197,8 +197,9 @@ var HostWebhook = class {
197
197
  ...options?.headers
198
198
  };
199
199
  if (this.signingSecret) {
200
- const sig = createHmac2("sha256", this.signingSecret).update(body).digest("hex");
201
- headers["X-Webhook-Signature"] = `sha256=${sig}`;
200
+ const timestamp = Math.floor(Date.now() / 1e3);
201
+ const sig = createHmac2("sha256", this.signingSecret).update(`${timestamp}.${body}`).digest("hex");
202
+ headers["X-HostWebhook-Signature"] = `t=${timestamp},v1=${sig}`;
202
203
  }
203
204
  const url = `${this.baseUrl}/api/in/${this.token}`;
204
205
  const controller = new AbortController();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Official HostWebhook SDK — verify signatures, parse headers, and send webhooks",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",