Description — what to implement and the why/impact.
Astroid API dispatches webhooks to external agent endpoints for transaction status changes and risk alerts. To ensure secure and reliable event delivery, external receivers need cryptographic verification signatures (HMAC-SHA256), and the platform needs a reliable delivery retry mechanism with exponential backoff.
Context & Requirements — background, constraints, design references, edge cases;
- Located in
src/modules/webhooks.
- Generate HMAC signature headers (
X-Astroid-Signature) for outgoing webhooks using a shared secret.
- Implement a BullMQ worker processor for webhook delivery with configurable backoff strategies (e.g., 5s, 30s, 5m, 1h).
- Handle endpoint timeout and non-2xx responses gracefully.
Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch and a suggested approach
- Likely touch files under
src/modules/webhooks/ (controllers, services, workers).
- Use Node.js built-in
crypto module for HMAC generation.
Testing & Validation — how the contributor should prove it works
- Run
npm test and ensure all tests pass successfully.
- Add unit tests verifying signature headers match expected cryptographic outputs.
Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium
Description — what to implement and the why/impact.
Astroid API dispatches webhooks to external agent endpoints for transaction status changes and risk alerts. To ensure secure and reliable event delivery, external receivers need cryptographic verification signatures (HMAC-SHA256), and the platform needs a reliable delivery retry mechanism with exponential backoff.
Context & Requirements — background, constraints, design references, edge cases;
src/modules/webhooks.X-Astroid-Signature) for outgoing webhooks using a shared secret.Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch and a suggested approach
src/modules/webhooks/(controllers, services, workers).cryptomodule for HMAC generation.Testing & Validation — how the contributor should prove it works
npm testand ensure all tests pass successfully.Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium