Pre-flight checks
Priority
P0 — the current API exposes user-selected identity and simulated money-like state.
Problem
/api/wallet/balance, /transactions, and /purchase accept the wallet identity through a user query parameter or fall back to anon-placeholder. Package purchase mutates database credits using a simulated XLM balance, while Stripe and PayPal adapters return fabricated success responses when configured. This must not be reachable in a market deployment.
Proposed solution
- Require JWT authentication and derive the wallet from the authenticated principal for all private wallet data/mutations.
- Remove the
user query parameter and anonymous fallback.
- Put simulated credits, balances, and payment adapters behind an explicit development/test-only boundary that fails closed in staging/production.
- Until the Market V1 economy ADR is approved, either expose verified on-chain/indexed balances or disable the unsupported credit-package flow with an explicit capability response.
- Record auditable, idempotent ledger references for any future balance mutation.
Acceptance criteria
Non-goals
- Selecting the final settlement asset or payout policy; that belongs to the economy ADR.
- Adding another mock provider.
Pre-flight checks
Priority
P0 — the current API exposes user-selected identity and simulated money-like state.
Problem
/api/wallet/balance,/transactions, and/purchaseaccept the wallet identity through auserquery parameter or fall back toanon-placeholder. Package purchase mutates database credits using a simulated XLM balance, while Stripe and PayPal adapters return fabricated success responses when configured. This must not be reachable in a market deployment.Proposed solution
userquery parameter and anonymous fallback.Acceptance criteria
401.Non-goals