Files
bridge/cmd
zeekay d3516cbfc7 feat(cmd/bridge): Lux RPC same-origin proxy + auto-expire pending deposits
Three additive operator features from origin/whispers/bridgev2 that
land cleanly on main without needing the rest of the branch.

cmd/bridge/rpc_proxy.go (101 LOC):
  Lux RPC same-origin proxy. Lets the bridge UI hit lux.* JSON-RPC
  endpoints through the bridge's own origin so the browser doesn't
  need to manage CORS or separate connection state. Optional —
  registered only when --lux-rpc-urls is configured.

cmd/bridge/deposit_watcher.go (+103 LOC):
  Adds auto-expire for user_deposit_pending swaps that never receive
  funds. Closes the final hardening-matrix gap — every other pipeline
  stage already has a terminal escape, but user_deposit_pending used
  to grow without bound. Zero expireAfter preserves the legacy
  "keep pending forever" behaviour.

cmd/bridge/deposit_watcher_test.go (183 LOC):
  Covers the expire path: deposits older than expireAfter transition
  to cancelled; sub-expireAfter deposits are untouched; explicit
  zero-duration keeps the legacy behaviour.

Tests: full cmd/bridge suite (3.8s) green.

NOT included in this PR (deliberately scoped out):
  - cmd/bridge/bchain_poller.go — depends on internal/bchain LP-333
    (lands with PR z/mchain-btc-pool first)
  - cmd/bridge/mpc_pool_test.go + mpc_token_resolve_test.go — exercise
    buildMPCPool / resolveMPCToken which are inside main.go on the
    source branch; need the main.go pool-split + token-resolve commits
    to land together
  - cmd/bridge/metrics_test.go + rpc_proxy_test.go — reference
    SigningDriver internal fields and API SetXxx setters not present
    on main's thinned daemon (PR #402); tests are stale-shaped
  - cmd/bridge/e2e_test.go + lp333_test.go — depend on the LP-333 +
    cosigners surfaces that land in earlier focused PRs first

This is the third focused slice of the whispers/bridgev2 integration.
2026-05-28 20:18:59 -07:00
..