PaymentWatcher should support WebSocket subscriptions

Open
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api, backend

Research direction

Start with the PaymentWatcher implementation and review dependency #21 for the available WebSocket support. Trace the existing 12-second polling behavior and determine how transport selection should preserve the current API; done means WebSocket log subscriptions work when available and HTTP-only connections still use polling.

Written by the indexing model from the issue text.

Description

enhancement

Problem

Payment watcher uses polling every 12 seconds. With WebSocket, could use eth_subscribe for instant notifications.

Recommendation

  • When WebSocket RPC is available, use log subscriptions
  • Fall back to polling for HTTP-only connections
  • Maintain same API regardless of transport

Benefits

  • Instant payment notifications
  • Reduced RPC usage
  • Lower latency for payment-triggered actions

Priority

Feature request (depends on #21 WebSocket support)

Dominant language
TypeScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lambdaclass/eth-agent

All issues in lambdaclass/eth-agent

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.