You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A read-only surface over chain state, so the front end does not reimplement contract decoding:
an advance's status
the repayment position for an address
whether a given nullifier has already been spent
Plus a health endpoint, CORS configured for the deployed front-end origin, and a /config that reports the contract addresses the API is actually pointed at.
Why /config matters more than it looks
Sterun caught a whole class of "which network is this talking to?" confusion this way — a worktree .env written before a redeploy still named the old contract pair, and a run that silently used it would have proven nothing. Making the API state its own wiring turns a silent mismatch into a visible one.
CORS is also the one thing that cannot be tested before the front end is deployed, and on Sterun it was left at localhost until after the deploy, which would have refused every authenticated request from the real origin.
Done when
Every route answers against live testnet, and a test asserts /config's addresses match docs/deployments.md exactly.
Working agreement
One issue, one owner. 2. Branch per issue, named above — not the GitHub-suggested one. 3. MCP Stellar Raven for any Stellar/Soroban fact that gets written down. 4. Merge through PR review by Axel (PM); no self-merge. If an ACC has not arrived within two days on something already verified, merge and say so in the PR. 5. Deploys need evidence: contract address or tx hash on stellar.expert, recorded in docs/deployments.md. 6. Secrets live in .env, gitignored, chmod 600 — never printed, never committed, never pasted into an issue or PR. Only public G… and C… addresses appear anywhere. 7. Issues, commits and PRs in English.
Scope: instawards/Forepay Instawards SOW.pdf. Timeline assumes 2026-10-09 → 2026-11-08; tell Axel if the real window differs.
@Lin1er, the front end needs these from #16. #58 (#21, Repayment) reads them through fe/src/lib/api/client.ts. Until the routes exist it answers from fixtures, so this is the only thing between #21 and real figures.
GET /advances?borrower=<G…>: every advance for that wallet, newest first, shaped as AdvanceSummary in fe/src/lib/api/types.ts. Amounts (stroops) and timestamps (seconds) go as strings.
Each advance needs its nullifier (32 bytes, hex) and the disbursement txHash.repay(from, nullifier, amount) takes the nullifier, and the UI links the receipt.
GET /transactions?borrower=<G…>: every advance and repayment, newest first, shaped as LedgerTransaction.
A transaction kind "trustline" (with an empty nullifier), for the "USDC allowed in wallet" row on 3b.
What does status: "failed" mean? Did the transaction never reach the ledger (nothing charged), or fail on it (fee spent)? The failed row's wording depends on it.
If any shape is easier another way, say so: the types and client.ts are the only places that change.
Activity
feat(#16): API skeleton: /health, /ready, /config, exact-origin CORS
feat(#16): API skeleton: /health, /ready, /config, exact-origin CORS
feat(#16): API skeleton: /health, /ready, /config, exact-origin CORS (#…
test(#23): rehearsal re-run after landing #4, #5 and #16 — still 7/7 …
Nabil-Aufa commentedon Oct 16, 2026
@Lin1er, the front end needs these from #16. #58 (#21, Repayment) reads them through
fe/src/lib/api/client.ts. Until the routes exist it answers from fixtures, so this is the only thing between #21 and real figures.GET /advances?borrower=<G…>: every advance for that wallet, newest first, shaped asAdvanceSummaryinfe/src/lib/api/types.ts. Amounts (stroops) and timestamps (seconds) go as strings.nullifier(32 bytes, hex) and the disbursementtxHash.repay(from, nullifier, amount)takes the nullifier, and the UI links the receipt.GET /transactions?borrower=<G…>: every advance and repayment, newest first, shaped asLedgerTransaction."trustline"(with an emptynullifier), for the "USDC allowed in wallet" row on 3b.status: "failed"mean? Did the transaction never reach the ledger (nothing charged), or fail on it (fee spent)? The failed row's wording depends on it.If any shape is easier another way, say so: the types and
client.tsare the only places that change.feat(#20): contract client, API types and money formatting shared with …
test(#21): end to end repayment against the stubbed RPC and API
docs(#21): e2e answers the #16 API too
test(#21): end to end repayment against the stubbed RPC and API
docs(#21): e2e answers the #16 API too
fix(#21): a repayment in flight survives a failed read, waits for the…
6 remaining items
docs(#21): e2e answers the #16 API too
fix(#21): a repayment in flight survives a failed read, waits for the…
feat(#20): contract client, API types and money formatting shared with …
#20 Prove revenue, see the offer with its derivation, accept (#57)
test(#21): end to end repayment against the stubbed RPC and API
docs(#21): e2e answers the #16 API too
fix(#21): a repayment in flight survives a failed read, waits for the…
#21 Repayment and history, read from the ledger (#58)
feat(#16): /advances and /transactions, from Horizon and the contract (…
feat(#70): build Repayment and History before the first advance as drawn
fix(#70): word a failed row as #16 defines it, with its receipt
Lin1er commentedon Oct 20, 2026
Done, closing. Both "Done when" points:
Every route answers against live testnet. Served from
mainathttps://api-forepay.jameshub.fun, and checked today:GET /healthGET /readyGET /config"recorded": trueGET /advances?borrower=G…GET /transactions?borrower=G…The relay routes are Proof relay: carry the proof and bind it to a Stellar address #17's, merged in #17 Proof relay: POST /proofs, bound to the borrower inside the signed claim #73. The deploy evidence is in
docs/deployments.md, "Backend API the front end needs #16 / Proof relay: carry the proof and bind it to a Stellar address #17".A test asserts
/configmatchesdocs/deployments.mdexactly. It is two tests that chain:be/src/network.test.ts, "network.ts equals the record in docs/deployments.md, exactly";be/src/api/app.test.ts, "with no overrides, /config reports exactly the recorded addresses".Merged in #66 after Axel's review.
Front end: responsive layout from the section 08 rules (#70) (#71)
fix(#16): read request_advance with #94's leading source, and tag AdM…