Context
The product vision replaces centralized factors with programmable escrow on Stellar (Soroban). The REST API will orchestrate contracts; this issue adds a server-side client wrapper and configuration so contract calls are isolated, testable, and environment-driven.
Complexity & points
High — 200 points
Contributor workflow
- Apply on Drips before opening a PR: Claim this issue through the Drips platform before you open a pull request. Unsolicited PRs from unassigned contributors may be closed without review.
- ETA required: Your application must include an ETA for when you will open the first draft PR.
- Draft PR within 24 hours: If a draft PR is not linked on this issue within 24 hours of assignment, maintainers may unassign you so someone else can take the issue.
Goals
- Add a module under e.g.
src/services/stellar/soroban/ that:
- Reads
ESCROW_CONTRACT_ID and RPC settings from env.
- Exposes typed functions for the minimal contract surface you need for wave 1 (e.g.
fundEscrow, releaseEscrow, or read-only getEscrowState—align to your actual contract).
- Returns structured errors when misconfigured (missing contract id, wrong network).
- Keep Soroban logic out of Express route handlers; routes call a thin service.
Out of scope
- Deploying the contract (document link to contract repo if external).
- Full end-to-end investment → escrow in one PR unless already small—prefer wrapper + one integration call site behind a feature flag.
Dependencies / versions
- If
soroban-client or additional Stellar packages are required, justify compatibility with existing stellar-sdk and Node 22 in the PR.
Acceptance criteria
PR submission requirements
Context
The product vision replaces centralized factors with programmable escrow on Stellar (Soroban). The REST API will orchestrate contracts; this issue adds a server-side client wrapper and configuration so contract calls are isolated, testable, and environment-driven.
Complexity & points
High — 200 points
Contributor workflow
Goals
src/services/stellar/soroban/that:ESCROW_CONTRACT_IDand RPC settings from env.fundEscrow,releaseEscrow, or read-onlygetEscrowState—align to your actual contract).Out of scope
Dependencies / versions
soroban-clientor additional Stellar packages are required, justify compatibility with existingstellar-sdkand Node 22 in the PR.Acceptance criteria
npm run type-checkpasses; tests pass.PR submission requirements
Closes #11.