Description
The backend Stellar wallet linking API is fully implemented but there is no frontend UI to connect, disconnect, or display a linked wallet. This issue builds the wallet connect UI in the settings page using the @stellar/stellar-sdk for in-browser signing.
Background
- Backend:
POST /api/v1/users/me/wallet/challenge, POST /api/v1/users/me/wallet/verify, DELETE /api/v1/users/me/wallet, GET /api/v1/users/me/wallet
- Flow: call challenge endpoint, sign challenge with Stellar secret key, submit signature to verify
@stellar/stellar-sdk must be installed in the frontend
Implementation Guide
Install @stellar/stellar-sdk in the frontend.
Create frontend/components/wallet/wallet-connect-card.tsx: if no wallet linked show "Connect Stellar Wallet" button opening modal; if linked show truncated address GABCD...WXYZ with copy button, Stellar explorer link, and Disconnect button.
Create frontend/components/wallet/wallet-connect-modal.tsx: secret key input with security warning, Sign and Connect button that: calls challenge endpoint, signs with Keypair.fromSecret(key).sign(Buffer.from(challenge)), calls verify with base64 signature, then immediately clears key from state.
Validate input with StrKey.isValidEd25519SecretSeed() before any API call.
Acceptance Criteria
Complexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org
Description
The backend Stellar wallet linking API is fully implemented but there is no frontend UI to connect, disconnect, or display a linked wallet. This issue builds the wallet connect UI in the settings page using the
@stellar/stellar-sdkfor in-browser signing.Background
POST /api/v1/users/me/wallet/challenge,POST /api/v1/users/me/wallet/verify,DELETE /api/v1/users/me/wallet,GET /api/v1/users/me/wallet@stellar/stellar-sdkmust be installed in the frontendImplementation Guide
Install
@stellar/stellar-sdkin the frontend.Create
frontend/components/wallet/wallet-connect-card.tsx: if no wallet linked show "Connect Stellar Wallet" button opening modal; if linked show truncated addressGABCD...WXYZwith copy button, Stellar explorer link, and Disconnect button.Create
frontend/components/wallet/wallet-connect-modal.tsx: secret key input with security warning, Sign and Connect button that: calls challenge endpoint, signs withKeypair.fromSecret(key).sign(Buffer.from(challenge)), calls verify with base64 signature, then immediately clears key from state.Validate input with
StrKey.isValidEd25519SecretSeed()before any API call.Acceptance Criteria
@stellar/stellar-sdkinstalled in frontendComplexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org