Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

@TaprootFreak TaprootFreak commented Dec 9, 2025

Summary

  • Implement SafeAccount entity for multi-account custody management
  • Add SafeAccountAccess entity for READ/WRITE permission management
  • Create SafeAccountService with legacy mode support (no data migration needed)
  • Add SafeAccountController with CRUD endpoints
  • Add access guards for permission-based endpoint protection
  • Extend User, CustodyBalance, and CustodyOrder entities with SafeAccount relations

Features

  • Multiple SafeAccounts per UserData
  • Shared access with READ (view, deposit) and WRITE (withdraw, swap, send) permissions
  • Legacy mode: Users without SafeAccounts see aggregated CUSTODY users as one "virtual Safe"
  • No breaking changes for existing users

Related

Test plan

  • Create a new SafeAccount via POST /safe-account
  • List SafeAccounts via GET /safe-account
  • Update SafeAccount via PUT /safe-account/:id
  • Verify legacy mode for users without SafeAccounts
  • Test access guards for READ/WRITE permissions

- Add SafeAccount and SafeAccountAccess entities
- Add SafeAccountService with legacy mode fallback
- Add SafeAccountController with CRUD endpoints
- Add SafeAccountReadGuard and SafeAccountWriteGuard
- Extend User, CustodyBalance, CustodyOrder with safeAccount relations
- Add database migration for new tables
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.

2 participants