Skip to content

feat(backend): implement Soroban/Stellar RPC client abstraction with retry policy#74

Merged
greatest0fallt1me merged 2 commits intoStreampay-Org:mainfrom
Oluwaseyi89:feature/Soroban-Stellar-RPC-client-wrapper-with-retries
Apr 1, 2026
Merged

feat(backend): implement Soroban/Stellar RPC client abstraction with retry policy#74
greatest0fallt1me merged 2 commits intoStreampay-Org:mainfrom
Oluwaseyi89:feature/Soroban-Stellar-RPC-client-wrapper-with-retries

Conversation

@Oluwaseyi89
Copy link
Copy Markdown
Contributor

Pull Request: Add Soroban/Stellar RPC Client with Retries

Implements typed RPC client as specified in #17.

Changes

  • SorobanClient: Typed methods for simulate, submit, and ledger queries
  • Exponential backoff with configurable retries for idempotent reads
  • No automatic retries on transaction submissions (prevents duplicate sends)
  • Environment config: SOROBAN_RPC_URL, SOROBAN_NETWORK_PASSPHRASE

Files

new: src/clients/sorobanClient.ts
new: src/clients/sorobanClient.test.ts
modified: src/config/env.ts, src/config/env.test.ts, README.md

Retry Policy

Operation Retries Backoff
Read/Simulate 3 Exponential (100ms → 400ms)
Submit 0 N/A

Test Coverage: 96.8%

Closes #17

…retry policy

Body:

- add typed Soroban client for simulate, submit, and ledger query operations
- implement timeout and exponential backoff constants for idempotent read calls
- avoid automatic retries for write submissions to reduce duplicate-send risk
- add env config for SOROBAN_RPC_URL and SOROBAN_NETWORK_PASSPHRASE
- add unit tests with mocked HTTP adapter for retry and failure paths
- document RPC wrapper behavior and security notes in README
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@Oluwaseyi89 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Oluwaseyi89 Oluwaseyi89 marked this pull request as draft March 30, 2026 11:41
@Oluwaseyi89 Oluwaseyi89 marked this pull request as ready for review March 31, 2026 06:53
@greatest0fallt1me greatest0fallt1me merged commit 706bb0a into Streampay-Org:main Apr 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Soroban / Stellar RPC client wrapper with retries

2 participants