@pimlico/webhook
Advanced tools
Comparing version 0.0.0-main.20241203T135701 to 0.0.0-main.20241203T141749
{ | ||
"name": "@pimlico/webhook", | ||
"version": "0.0.0-main.20241203T135701", | ||
"version": "0.0.0-main.20241203T141749", | ||
"author": "Pimlico", | ||
@@ -5,0 +5,0 @@ "main": "./_cjs/index.js", |
@@ -13,11 +13,2 @@ # @pimlico/webhook | ||
```typescript | ||
import { pimlicoWebhookVerifier } from "@pimlico/webhook" | ||
const verifyWebhook = pimlicoWebhookVerifier(process.env.PIMLICO_API_KEY) | ||
const body = await verifyWebhook( | ||
req.headers as Record<string, string>, | ||
Buffer.from(JSON.stringify(req.body)) | ||
) | ||
``` | ||
Check out the [example](./../../examples/webhook/api/approve.ts) repo for more details. |
6958
14