What you build
A signed webhook receiver that listens forpeg.depeg.start and triggers your existing kill-switch.
1. Subscribe to the event
2. Verify the signature
Every delivery setsAlterscope-Signature: t=<unix>,v1=<hex> (the v1 MAC is HMAC-SHA256 of <t>.<raw_body>). Recompute, compare v1 in constant time, and reject stale timestamps (~5 min) or anything that doesn’t match. A legacy X-Alterscope-Signature (raw-body hex) is dual-sent during the 60-day transition.
3. Sample payload
4. Troubleshooting
- Missed events: webhooks retry with exponential backoff for 24 hours, then DLQ. Use the replay recipe to recover.
- Duplicate deliveries: receivers should be idempotent on
data.as_of_block + asset_id. - Signature failures: confirm body is the raw bytes, not the JSON-decoded object.