Expose min_balance_xlm and estimated_fees on stream create preflight
## Description
**Help users and wallets** avoid `op_underfunded` and **min reserve** surprises: add
pre-flight or GET that returns required XLM and per-tx fee estimates
for a proposed stream, including any Soroban and escrow overhead. This is
backend truth; the Figma side has a separate design issue in StreamPay-Frontend.
## Requirements and context
- **Plain** `amounts` in stroops and human-readable; **rounding** policy repeated.
-
Cite which Horizon/RPC calls back the numbers (and cache policy).
-
Tests with fixture responses; no live network in unit tests.
-
Rate limit: these can be high volume; add cache and limits.
-
Security: no PII; only for authenticated user’s accounts or public estimate only if safe.
## Suggested execution
1. `git checkout -b feature/preflight-reserve-estimates`
-
Add GET /streams/estimate or POST with dry-run.
-
PR with OpenAPI and example response for two assets.
-
Cross-link to contracts for exact lock amounts.
-
Timeframe: 96h; extend for multi-hop paths.
- Run the full test suite; add or update tests until the agreed coverage bar is met.
- Cover edge cases listed in this issue; document any intentional exclusions with brief rationale in the PR.
- Include relevant test output (e.g. test runner summary) or a link to a passing CI run in the pull request.
- Add security notes for auth, keys, PII, chain settlement, or money movement (assumptions verified, out-of-scope items).
Example commit message
feat(stellar): add reserve and fee estimate preflight for stream and escrow planning
Guidelines
- Target: at least 95% coverage on new or meaningfully changed code (per the repo’s standard tooling).
- Documentation: update contributor-facing or API documentation where a reviewer would be blocked without it.
- Timeframe: 96 hours to ready-for-review (surface blockers early).
Expose
min_balance_xlmandestimated_feeson stream create preflightpre-flight or GET that returns required XLM and per-tx fee estimates
for a proposed stream, including any Soroban and escrow overhead. This is
backend truth; the Figma side has a separate design issue in
StreamPay-Frontend.Cite which Horizon/RPC calls back the numbers (and cache policy).
Tests with fixture responses; no live network in unit tests.
Rate limit: these can be high volume; add cache and limits.
Security: no PII; only for authenticated user’s accounts or public estimate only if safe.
Add
GET /streams/estimateorPOSTwith dry-run.PR with OpenAPI and example response for two assets.
Cross-link to contracts for exact lock amounts.
Timeframe: 96h; extend for multi-hop paths.
Example commit message
feat(stellar): add reserve and fee estimate preflight for stream and escrow planningGuidelines