[SDK] Add a vault event polling helper

Open
#1,365 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@Mona-i is already working on this.

Since Nov 20, 2026.

  • #1419 by @Mona-i — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with packages/stellar-sdk-helpers/admin-history.ts to understand the existing event paging, then inspect packages/contracts/vault/src/lib.rs for emitted event topics. Add coverage for known and unknown events, an empty range, and an RPC failure; verify bounded ledger ranges and page sizes, then run pnpm lint and pnpm typecheck.

Written by the indexing model from the issue text.

Description

enhancement medium sdk Stellar Wave

Summary

The SDK has no helper for reading vault events. A client that wants to show recent deposits, withdrawals, or admin actions must build Soroban event filters and decode topics itself.

Motivation

A polling helper gives the web app and future integrations one typed way to read recent activity. It also centralizes pagination, cursor handling, and event decoding, which is easy to get wrong per caller.

Proposed Solution

Add a helper that reads contract events for a vault over a ledger range, decodes the known topics, and returns typed records for deposit, withdraw, pause, adapter change, migration, and fee events. Support a cursor or start ledger and a bounded page size. Unknown topics should be returned as raw records rather than dropped. Cover a known event, an unknown event, an empty range, and an RPC failure with tests.

Scope

Field Value
Area SDK
Protocol affected Both
Network testnet and mainnet
Breaking change? No

Alternatives Considered

An indexer would provide richer history but adds an operational service the repository does not currently run. Direct event polling matches the existing RPC-only architecture.

Acceptance Criteria

  • The helper returns typed records for the documented vault events
  • Unknown topics are preserved as raw records
  • The ledger range and page size are bounded
  • RPC failures return a typed error
  • Tests cover known, unknown, empty, and failure cases
  • pnpm lint and pnpm typecheck pass

Additional Context

Vault events are emitted from packages/contracts/vault/src/lib.rs. The existing admin history scan is packages/stellar-sdk-helpers/src/admin-history.ts and is a useful reference for paging.

Dominant language
TypeScript
Stars
17
Forks
129
Avg merge
3d 13h
Merged PRs (30d)
54

Getting set up

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 drydocs/meridian

All issues in drydocs/meridian

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.