Skip to content

Add webhook notifications for new blocks #5

@Bortlesboat

Description

@Bortlesboat

Summary

Allow users to register webhook URLs that get called when specific events occur (new block, large mempool tx, fee spike).

Proposed API

POST /api/v1/webhooks
{
  "url": "https://myapp.com/callback",
  "events": ["new_block", "fee_spike"],
  "secret": "optional-hmac-secret"
}

Events

  • new_block — fires on each new block with height, hash, tx count
  • fee_spike — fires when recommended fee jumps >50% in 10 minutes
  • large_tx — fires for mempool txs above configurable size threshold

Acceptance criteria

  • Webhook registration endpoint (authed)
  • Background worker that checks events and POSTs to registered URLs
  • HMAC signature on webhook payload for verification
  • Retry logic (3 attempts with backoff)
  • Tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions