Overview
All user-facing blockchain features (tokenization [SC-04], dividends [SC-05], voting [SC-06]) require users to sign transactions with their own Stellar wallet. The standard is the Freighter browser extension. No wallet integration exists in the frontend.
What to Build
- A
frontend/lib/stellar/ module wrapping the Freighter API (@stellar/freighter-api): detect availability, connect, get public key, sign transaction XDR, network guard (warn when wallet network ≠ app network)
- A
WalletProvider (React context or Zustand slice, matching frontend/store/auth.store.ts conventions): connection state, address, connect/disconnect actions, persistence of "previously connected" for silent reconnect
- Topbar wallet button: connect → truncated address (
GDXF…K3LQ) with copy + disconnect dropdown; "install Freighter" fallback linking to the extension when not detected
- Optionally associate the wallet address with the user profile (
PATCH /api/users/me gains stellarAddress) so the backend can verify ownership later
References
- Consumed by [SC-04], [SC-05], [SC-06]
- Conventions: see the auth store and topbar (
frontend/components/layout/topbar.tsx)
Acceptance Criteria
Overview
All user-facing blockchain features (tokenization [SC-04], dividends [SC-05], voting [SC-06]) require users to sign transactions with their own Stellar wallet. The standard is the Freighter browser extension. No wallet integration exists in the frontend.
What to Build
frontend/lib/stellar/module wrapping the Freighter API (@stellar/freighter-api): detect availability, connect, get public key, sign transaction XDR, network guard (warn when wallet network ≠ app network)WalletProvider(React context or Zustand slice, matchingfrontend/store/auth.store.tsconventions): connection state, address, connect/disconnect actions, persistence of "previously connected" for silent reconnectGDXF…K3LQ) with copy + disconnect dropdown; "install Freighter" fallback linking to the extension when not detectedPATCH /api/users/megainsstellarAddress) so the backend can verify ownership laterReferences
frontend/components/layout/topbar.tsx)Acceptance Criteria