Skip to content

fix: require signed proof-of-ownership for Stellar wallet linking (#32) - #182

Open
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/32-stellar-wallet-proof-of-ownership
Open

fix: require signed proof-of-ownership for Stellar wallet linking (#32)#182
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/32-stellar-wallet-proof-of-ownership

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 20, 2026

Copy link
Copy Markdown

Fixes #32.

  • Add signMessage wrapper in wallet.ts using Freighter's signMessage API for proof-of-ownership
  • Rewrite WalletContext connect flow to sign a nonce+domain-bound challenge before linking; backend receives signature, nonce, and message for verification
  • Reconcile localStorage against AuthUser.stellarAddress on mount — backend is authoritative; stale local values are corrected, not trusted
  • Require explicit user confirmation when reconnecting with a different Freighter account than the backend-recorded address (never silent override)
  • Graceful fallback to unsigned link if backend doesn't support signed flow yet
  • Document required backend contract for challenge verification in code comments

TypeScript compiles cleanly with npx tsc --noEmit.

…rgeFi#32)

- Add signMessage wrapper in wallet.ts using Freighter's signMessage API
- Rewrite WalletContext connect flow to sign a nonce+domain-bound challenge
  before linking; backend receives signature, nonce, and message for verification
- Reconcile localStorage against AuthUser.stellarAddress on mount — backend
  is authoritative; stale local values are corrected, not trusted
- Require explicit user confirmation when reconnecting with a different
  Freighter account than the backend-recorded address (never silent override)
- Graceful fallback to unsigned link if backend doesn't support signed flow yet
- Document required backend contract for challenge verification in code comments

TypeScript compiles cleanly with npx tsc --noEmit.
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require signed proof-of-ownership for Stellar wallet address linking

1 participant