prividium-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Prividium (ZKsync) webhooks, which follow the Standard Webhooks specification. Use when setting up a Prividium event webhook or address…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Prividium Webhooks
Prividium is ZKsync's private, permissioned chain product. Its webhook service sends a signed HTTPS request to your endpoint when on-chain activity matches a subscription: an event webhook watches one contract and one topic0, an address webhook watches one or more addresses. Webhooks are created in the admin UI or through /api/v1/event-webhook and /api/v1/address-webhook on your deployment's permissions API, so the sender's host differs per deployment. Signatures follow Standard Webhooks, so each delivery carries webhook-id, webhook-timestamp and webhook-signature headers.
When to Use This Skill
- How do I receive Prividium webhooks?
- How do I verify a Prividium webhook signature (
webhook-signature)? - Where do I find my Prividium signing key (
whsec_...), and why can't I read it again? - How do I accept several signatures while a Prividium signing key is being rotated?
- How do I deduplicate Prividium event webhook and address webhook deliveries?
- Why is my Prividium webhook verification failing, or failing only on retries and replays?
Verification (core)
| Header | Value |
|---|---|
webhook-id |
Unique per event, stable across retries. Your idempotency key |
webhook-timestamp |
Unix seconds |
webhook-signature |
One or more space-separated v1,<base64> entries (several during key rotation) |
Signed content is {webhook-id}.{webhook-timestamp}.{raw body}, HMAC-SHA256, base64 output. The key is the base64-decoded part of the whsec_... secret after the prefix. Compare against every v1, entry; ignore other versions. If webhook-id is absent, read svix-id, svix-timestamp and svix-signature instead. The examples use the standardwebhooks library (npm and PyPI):
const { Webhook } = require('standardwebhooks');
// rawBody: exact request body (Buffer or string), NOT re-serialised JSON
function verifyPrividium(rawBody, headers, secret = process.env.PRIVIDIUM_WEBHOOK_SECRET) {
const p = headers['webhook-id'] ? 'webhook' : 'svix'; // fall back to the svix-* names
new Webhook(secret).verify(rawBody, {
'webhook-id': headers[`${p}-id`],
'webhook-timestamp': headers[`${p}-timestamp`],
'webhook-signature': headers[`${p}-signature`],
}, { jsonParse: false }); // throws on a bad signature or stale timestamp → respond 401
}
The library always enforces a fixed 5-minute timestamp window, which matches Prividium's recommendation (±5 minutes). Hookdeck retries and replays resend the original webhook-timestamp, so the library rejects them once they are more than 5 minutes old. If you receive through Hookdeck and need late retries to pass, use the manual verifier in references/verification.md, which can drop or widen the window. In Express, read the body with express.raw({ type: '*/*' }) so any content type verifies, and parse JSON only after the check.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Event Types and Payload
Prividium's documentation does not list event type names or print the request body, so this skill doesn't invent any. What the docs do define:
- The two webhook resource types (see references/overview.md). One webhook is one subscription, so which webhook fired is a property of the endpoint (use a distinct URL per webhook), not of a header.
- Event webhooks can set
decode_events: trueto include decoded event data in deliveries. - Verify first, then parse the body defensively. The examples log whatever arrives and don't reject a verified body that isn't JSON.
Check a real delivery from your deployment (for example in the Hookdeck CLI's web UI) before writing business logic against its fields.
Delivery Semantics
Prividium states that webhook-id is stable across retries and should be your idempotency key: persist it before applying side effects and treat a repeat as a duplicate. Prividium's docs don't describe the retry schedule, a response deadline or ordering, so don't depend on any (the vendor's local-webhooks Docker defaults are 10 attempts with backoff from 30 seconds to 30 minutes; see references/overview.md). A failed verification should get a 4xx (400 for missing headers, 401 for a bad signature) and no processing. The webhook service can suspend a webhook after repeated delivery failures or an HTTP 410 Gone; resume it with Activate in the admin UI once the endpoint is healthy.
Environment Variables
PRIVIDIUM_WEBHOOK_SECRET=whsec_xxxxx # full `signing_key` value from the create response; handlers fail closed (500) without it
# During a rotation you may list old and new keys: whsec_old,whsec_new
Local Development
Установить prividium-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл prividium-webhooks?
Receive and verify Prividium (ZKsync) webhooks, which follow the Standard Webhooks specification. Use when setting up a Prividium event webhook or address webhook endpoint, storing the whsec_ signing key, debugging webhook-id / webhook-timestamp / webhook-signature verification, handling key rotation with several v1 signatures, or deduplicating deliveries on webhook-id.
Как установить скилл prividium-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prividium-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic