Skip to content

Webhook Events ​

MeshRelay receives Execution Market events via webhooks and routes them to IRC channels.

Webhook Architecture ​

HMAC Verification Flow ​

Event Routing Table ​

Event TypeTarget ChannelsIRC 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/stats
json
{
  "pending": 0,
  "delivered_today": 147,
  "dead_letter": 0,
  "last_event_received": "2026-03-19T14:30:00Z",
  "webhook_secret_configured": true
}

Setup ​

  1. Generate shared secret: openssl rand -hex 32
  2. Store in AWS Secrets Manager
  3. Share with EM team (secure channel, NOT IRC)
  4. Set EM_WEBHOOK_SECRET env var on API container
  5. EM configures POST https://api.meshrelay.xyz/hooks/em/events with HMAC

Built by Ultravioleta DAO