Summary
Handle Circle webhooks for wallet/transaction lifecycle events. Circle is the source of truth for Circle-originated transactions — once this lands, on-chain RPC polling (#38) is only needed for externally-initiated mints.
Scope
- Route: `POST /webhooks/circle`
- Verify signature per Circle's signing scheme (defer to `circle:use-developer-controlled-wallets` for the exact header name + algorithm — do not inline).
- Whitelist source IPs if Circle publishes them.
- Match payload `transactionId` → `BlockchainTransaction.circleTransactionId`.
- Dispatch per event type (handler pattern):
- Inbound USDC deposit → trigger pending ticket-mint (if tied to a ticket purchase)
- Outbound transfer confirmed → mark payout `completed`, email organizer
- Contract execution confirmed → update domain record (ticket status, check-in, etc.)
- Contract execution failed → surface to dead-letter queue + alert
- Always respond 200 OK immediately, process async via Bull queue.
- Log every raw webhook payload for audit (24h retention minimum).
Acceptance criteria
Depends on
Summary
Handle Circle webhooks for wallet/transaction lifecycle events. Circle is the source of truth for Circle-originated transactions — once this lands, on-chain RPC polling (#38) is only needed for externally-initiated mints.
Scope
Acceptance criteria
Depends on