[SDK] Add a vault event polling helper
Maintainers usually reply within 2 days
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
- Domain
- backend-api-design, databases
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
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 lintandpnpm typecheckpass
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drydocs/meridian
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
[Docs] Add a supported wallet capability matrixPossibly taken @Joeljosef7 claimed this 3 days ago. Opendocs frontend Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drydocs/meridian#1349 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Test] Add cross-language conformance vectors for vault mathPossibly taken @VeronicDev claimed this 3 days ago. Opencontracts medium sdk Stellar Wave testing
drydocs/meridian#1444 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Security] Extend CSP and security headers to landing and docs routesPossibly taken @anietie234 claimed this 3 days ago. Openapi frontend medium security Stellar Wave
drydocs/meridian#1443 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Docs] Establish ADRs and backfill architecture decisionsPossibly taken @Sammydz456 claimed this 3 days ago. Opendocs medium Stellar Wave
drydocs/meridian#1442 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in drydocs/meridian
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
External sources always come back in English: `lc` isn't passed to `/api/v3/external_sources`Possibly taken @Anurag1428 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openfoodfacts/openfoodfacts-explorer#2264 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudflare/workers-sdk#17139 ·
Maintainers usually reply within 1 day
-
area: editor P3 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
halisonworks/mod-codeling#290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
colinhacks/zod#6776 ·
Maintainers usually reply within 1 day