privy-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Privy webhooks (auth and embedded-wallet infrastructure, delivered via Svix). Use when setting up Privy webhook handlers, debugging…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Privy Webhooks
Privy delivers webhooks through Svix, which implements Standard
Webhooks. Every delivery is an HTTP POST with a JSON body and three signature headers:
svix-id, svix-timestamp, and svix-signature. The event name is the top-level type field,
and the event's own fields (user, wallet_id, ...) sit beside it. There is no data wrapper.
When to Use This Skill
- How do I receive Privy webhooks?
- How do I verify Privy webhook signatures (
svix-signature)? - How do I handle
user.created,user.wallet_createdortransaction.confirmedevents? - How do I react to
wallet.funds_depositedorwallet_action.swap.succeeded? - Why is my Privy webhook signature verification failing, or rejecting Hookdeck retries?
Verification (core)
Signed content is {svix-id}.{svix-timestamp}.{raw body}. Svix signs it with HMAC-SHA256 using
the base64-decoded secret (the part after whsec_), base64-encodes the result, and sends one or
more space-separated v1,<signature> entries. Use the official svix library, which compares in
constant time. Read the svix-* headers, and when svix-id is absent fall back to the webhook-*
headers (webhook-id, webhook-timestamp, webhook-signature).
import { Webhook } from 'svix'; // svix 2.x is ESM-only
const prefix = req.headers['svix-id'] ? 'svix' : 'webhook';
const id = req.headers[`${prefix}-id`];
const timestamp = req.headers[`${prefix}-timestamp`];
const signature = req.headers[`${prefix}-signature`];
// rawBody: the raw Buffer/string, never re-serialized JSON
new Webhook(process.env.PRIVY_WEBHOOK_SECRET).verify(rawBody, {
'svix-id': id, 'svix-timestamp': timestamp, 'svix-signature': signature,
'webhook-id': id, 'webhook-timestamp': timestamp, 'webhook-signature': signature,
}); // throws on a bad signature or a timestamp outside the window
const event = JSON.parse(rawBody.toString('utf8')); // parse only after verify passes
from svix.webhooks import Webhook, WebhookVerificationError
wh = Webhook(os.environ["PRIVY_WEBHOOK_SECRET"]) # "whsec_..."
wh.verify(raw_body, {"svix-id": id, "svix-timestamp": ts, "svix-signature": sig,
"webhook-id": id, "webhook-timestamp": ts, "webhook-signature": sig})
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
The secret is on the endpoint's page under Configuration > Webhooks in the Privy Dashboard.
Privy's docs don't print its format, but Svix secrets start with whsec_. Keep the full value in
PRIVY_WEBHOOK_SECRET (Privy's own samples name it PRIVY_WEBHOOK_SIGNING_SECRET). Handlers
fail closed: with the variable unset they return 500 instead of accepting anything. They also
return 500 for a secret that doesn't start with whsec_, because the svix library always
base64-decodes the secret. Missing
headers or a bad signature return 400.
Privy's @privy-io/node SDK also offers privy.webhooks().verify, but it needs the app ID and app
secret as well. The generic svix library above needs only the signing secret and works in every
language.
Hookdeck retries and replays hit the 5-minute window
The svix and standardwebhooks libraries always enforce a fixed 5-minute timestamp window, and
it can't be configured. Hookdeck retries and replays resend the original svix-timestamp, so
the library rejects any retry or replay that happens more than 5 minutes after the original
delivery. If you verify behind Hookdeck (or replay old events), use the manual verifier in
references/verification.md, where the window can be dropped or
widened. Deduplicate on the payload's event_id instead of relying on the timestamp. Funds
events have no event_id, so use idempotency_key for them, and user_op_hash plus caip2 for
user_operation.completed. svix-id identifies a redelivery of the same webhook.
Common Event Types
71 events are documented (the list may not be exhaustive). The name is type in the JSON body.
The examples handle these:
| Event | Triggered When |
|---|---|
privy.test |
"Test webhook" is clicked in the dashboard |
user.created |
A user is created in your app |
user.authenticated |
A user logs in |
user.linked_account |
A user links a new login method (also user.unlinked_account) |
user.wallet_created |
An embedded or smart wallet is created for a user |
user.deleted |
A user is deleted |
mfa.enabled |
A user enables MFA (also mfa.disabled) |
wallet.funds_deposited |
Funds are deposited into an embedded wallet (also wallet.funds_withdrawn) |
wallet.private_key_export |
A user exports their private key |
transaction.broadcasted |
A transaction is submitted and awaiting confirmation |
transaction.confirmed |
A transaction is confirmed on-chain |
transaction.failed |
A transacti |
Установить privy-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл privy-webhooks?
Receive and verify Privy webhooks (auth and embedded-wallet infrastructure, delivered via Svix). Use when setting up Privy webhook handlers, debugging svix-signature verification, or handling events like user.created, user.wallet_created, transaction.confirmed, and wallet.funds_deposited.
Как установить скилл privy-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл privy-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