Skip to content

Soroban escrow client wrapper and env-driven configuration #11

@Jayrodri088

Description

@Jayrodri088

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 getEscrowStatealign 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

  • Unit tests mock RPC / contract responses; CI does not hit public RPC unless explicitly allowed.
  • Clear README or PR notes: env vars, testnet vs mainnet.
  • npm run type-check passes; tests pass.

PR submission requirements

  • CI: All GitHub Actions workflow runs for this PR must pass (green) before merge; failing checks block merge.
  • PR description must include: Closes #11.
  • PR links to contract source or interface spec (Wasm ID, ABI, or generated bindings).
  • Call out any security assumptions (trusted admin, oracle, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programfeatureNew capabilityhardLarge scope / complex

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions