Skip to content

feat: real‑time webhook notifications for Tx / event updates #3

@qvkare

Description

@qvkare

Problem

Users have to poll transactions_getStatus; this is slow and wastes RPC calls.

Background

Alchemy Notify and similar services push JSON payloads to a user‑supplied URL on new blocks, tx confirmations, or specific events.

Proposed Solution

  1. webhookRegister(url, eventFilter) – returns hookId.
  2. webhookDelete(hookId) – deregister.
  3. Internal dispatcher (src/webhook/dispatcher.ts) with Express POST /notify.
  4. Supports: txConfirmed, erc20Transfer(address), newBlock.

Acceptance Criteria

  • End‑to‑end test: create hook → transfer USDC → receive POST in <30 s.
  • Hooks survive server restart (use LiteFS or JSON DB).
  • Rate‑limit to 5 events / sec per hook.

Labels

enhancement feature:webhook

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions