Skip to content

Added on-chain Stellar group ownership and owner-validated room update endpoint#161

Open
EmeditWeb wants to merge 1 commit into
Lumina-eX:mainfrom
EmeditWeb:onchain-group-ownership
Open

Added on-chain Stellar group ownership and owner-validated room update endpoint#161
EmeditWeb wants to merge 1 commit into
Lumina-eX:mainfrom
EmeditWeb:onchain-group-ownership

Conversation

@EmeditWeb
Copy link
Copy Markdown

Close #39

PR: Implement On-Chain Group Ownership

Summary

This change ties group ownership to a Stellar wallet address and enforces that only the wallet owner can update group metadata.

What changed

  • Persisted owner_wallet on rooms during group creation
  • Added PATCH /api/rooms/[roomId] endpoint to update room metadata
  • Validates update requests by:
    • requiring walletAddress and signature
    • verifying the signature against a one-time nonce
    • checking that the wallet address matches the room owner
  • Included owner_wallet in on-chain metadata hash verification
  • Added DB migration to add owner_wallet column to public.rooms

Testing

  1. Apply migration: run scripts/012_add_room_owner_wallet.sql in Supabase
  2. Create a group with a connected Stellar wallet
  3. Confirm the new room record includes owner_wallet
  4. Request a nonce via /api/auth/nonce, sign it with the owner wallet, then call PATCH /api/rooms/<roomId> with walletAddress, signature, and updated metadata
  5. Confirm updates succeed only when the correct owner wallet and signature are provided, and fail otherwise

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@EmeditWeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@SudiptaPaul-31
Copy link
Copy Markdown
Collaborator

@EmeditWeb Resolve merge conflicts

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.

Implement On-Chain Group Ownership

2 participants