🟒 BASE MAINNET · LIVE · CHAIN 8453
LUMINA Β· OPERATEβ—‰ AGENT SUPERVISOR
BASE MAINNET
/APP/AGENT/WEBHOOKS

Push events to your bot β€” no polling.

Lumina POSTs a signed payload (X-Lumina-Signature = HMAC-SHA256) within seconds of the on-chain event. Verify it with the secret shown once at creation.

SETUP Β· TWO WAYS
A
Quick test β€” no code
5 min Β· just to see events arriving
  1. Open webhook.site in a new tab β€” it gives you a unique public URL.
  2. Copy that URL (looks like https://webhook.site/<uuid>) and paste it in the form below β†’ pick events (or leave empty = all) β†’ Register.
  3. Copy the secret the modal shows β€” it's shown once.
  4. Trigger an event with your agent (buy a policy, redeem a bond…) β†’ within seconds you'll see the POST arrive in webhook.site with headers + body.
⚠ Public bin β€” anyone with the URL sees the events. Use only to learn the format.
B
Connect your bot
Real integration Β· verifies signature
  1. Add a POST endpoint on a server you control. Read the body raw (not parsed) and verify the HMAC.
  2. // Node / Express receiver (~20 lines)
    import crypto from 'crypto'
    import express from 'express'
    
    const SECRET = process.env.LUMINA_WEBHOOK_SECRET // the one shown once at registration
    
    const app = express()
    app.post('/lumina-hook',
      express.raw({ type: 'application/json' }), // raw body needed for HMAC verify
      (req, res) => {
        const sig = req.header('X-Lumina-Signature')
        const expected = crypto
          .createHmac('sha256', SECRET)
          .update(req.body)
          .digest('hex')
        if (sig !== expected) return res.sendStatus(401) // forged β†’ ignore
    
        const event = req.header('X-Lumina-Event')
        const payload = JSON.parse(req.body.toString())
        // ...react to the event (e.g. on policy_triggered β†’ redeem the bond)...
    
        res.sendStatus(200) // reply within 10s or we retry 3Γ— with backoff
      },
    )
    app.listen(3000)
  3. For local dev: ngrok http 3000 β†’ use the https URL it prints.
  4. Serverless works too: Vercel Edge Function Β· Cloudflare Worker Β· AWS Lambda.
  5. Paste your URL in the form below β†’ Register β†’ store the secret in LUMINA_WEBHOOK_SECRET on your server.
↩ Reply 2xx within 10s. 5xx / timeout β†’ we retry 3Γ— (30s Β· 60s Β· 120s). 4xx β†’ no retry.
Your endpoint receives these headers:
X-Lumina-Event Β Β  policy_purchased Β· policy_triggered Β· bond_minted Β· bond_redeemed Β· listing_created Β· listing_purchased
X-Lumina-Signature Β  HMAC-SHA256(body, your-secret) β†’ hex
X-Lumina-Delivery Β Β Β  unique id β€” use it to dedupe retries (idempotency)
β“˜ Connect the wallet your agent uses.