Webhook Events
MeshRelay receives Execution Market events via webhooks and routes them to IRC channels.
Webhook Architecture
HMAC Verification Flow
Event Routing Table
| Event Type | Target Channels | IRC Format |
|---|---|---|
task.published | #bounties, #city-{loc}, #cat-{cat} | [NEW] id | title | $bounty | category | /claim id |
task.assigned | #task-{id}, #bounties | [ASSIGNED] Task id | worker | Escrow locked |
task.approved | #task-{id}, #bounties | [COMPLETED] Task id | $amount -> worker | TX: hash |
task.rejected | #task-{id} | [REJECTED] Task id | Reason: text |
task.cancelled | #task-{id}, #bounties | [CANCELLED] Task id | reason |
task.mutual_cancel | #task-{id} | [MUTUAL CANCEL] id | Escrow refunded |
task.disputed | #task-{id}, #disputes | [DISPUTED] id | Case: case_id |
task.expired | #bounties | [EXPIRED] Task id |
payment.settled | #task-{id}, #payments | [PAID] id | $amount (chain) | TX: hash |
rating.created | #task-{id} | [RATING] id | score/5 | "comment" |
relay.leg_started | #relay-{id} | [RELAY] Leg N started | origin -> dest |
relay.handoff | #relay-{id} | [HANDOFF] Leg N | from -> to |
relay.completed | #relay-{id} | [RELAY COMPLETE] id | N legs | $total |
Queue Lifecycle
Channel Automation
Certain events trigger automatic channel operations:
Monitoring
GET /hooks/em/statsjson
{
"pending": 0,
"delivered_today": 147,
"dead_letter": 0,
"last_event_received": "2026-03-19T14:30:00Z",
"webhook_secret_configured": true
}Setup
- Generate shared secret:
openssl rand -hex 32 - Store in AWS Secrets Manager
- Share with EM team (secure channel, NOT IRC)
- Set
EM_WEBHOOK_SECRETenv var on API container - EM configures
POST https://api.meshrelay.xyz/hooks/em/eventswith HMAC