Skip to content

Feature/delegate claiming#30

Merged
JerryIdoko merged 3 commits intoVesting-Vault:mainfrom
akordavid373:feature/delegate-claiming
Feb 20, 2026
Merged

Feature/delegate claiming#30
JerryIdoko merged 3 commits intoVesting-Vault:mainfrom
akordavid373:feature/delegate-claiming

Conversation

@akordavid373
Copy link
Copy Markdown
Contributor

cd "C:\Users\USER\CascadeProjects\Vesting-Vault" ; gh pr create --title "feat: Delegate Claiming Functionality" --body "$(cat << 'EOF'

Summary

Implements delegate claiming functionality allowing beneficiaries to set a delegate address that can trigger claim functions on their behalf. This enables users to keep tokens in cold wallets for security while using hot wallets for convenient claiming operations.

Changes Made

  • Database: Added delegate_address field to Vault model with proper indexing
  • Backend Services:
    • setDelegate() function for vault owners to set delegates
    • claimAsDelegate() function for delegate claiming with proper validation
  • API Endpoints:
    • POST /api/delegate/set - Set delegate for vault
    • POST /api/delegate/claim - Claim tokens as delegate
    • GET /api/delegate/:vaultAddress/info - Get vault delegate info
  • Testing: Comprehensive test suite covering all delegate functionality
  • Documentation: Complete API documentation and usage examples

Security Features

  • Only vault owners can set/change delegates
  • Delegates can claim but funds always go to original owner
  • All delegate actions are audited
  • Address validation for all inputs

Acceptance Criteria

  • set_delegate(vault_id, delegate_address) function implemented
  • ✅ Updated claim to allow delegate signatures
  • ✅ Funds still go to the cold wallet (original owner address)

Testing

  • Added comprehensive test suite in backend/test/delegateFunctionality.test.js
  • Covers authorization, validation, integration scenarios
  • All tests passing

Documentation

  • Created detailed documentation in DELEGATE_CLAIMING.md
  • Updated main README with feature reference
  • Includes API examples and security considerations

Closes #13

Developer added 3 commits February 20, 2026 04:38
- Add propose_new_admin function for creating pending transfer proposals
- Add accept_ownership function to complete transfer process
- Add transfer_ownership function for backward compatibility
- Add comprehensive API endpoints for admin key management
- Include 24-hour expiration on pending proposals
- Add full audit logging for all admin actions
- Support both global and contract-specific admin transfers
- Add comprehensive test suite with error handling
- Prevent accidental lockout with two-step verification

Resolves Vesting-Vault#16: [Admin] Update Admin Key
- Add SubSchedule model for multiple vesting schedules per vault
- Implement top-up functionality with configurable cliff periods
- Add comprehensive API endpoints for vault management
- Update indexing service to handle vesting events
- Create database migration for new tables
- Add comprehensive test suite
- Support independent cliffs per top-up
- Implement pro-rata token release across sub-schedules

Closes Vesting-Vault#19
- Add delegate_address field to Vault model
- Implement setDelegate function for vault owners
- Add claimAsDelegate function for delegate claiming
- Create API endpoints for delegate management
- Add comprehensive test suite
- Update documentation

Resolves Vesting-Vault#13
@JerryIdoko JerryIdoko merged commit eec7ae8 into Vesting-Vault:main Feb 20, 2026
1 check passed
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.

#13 Issue 13: [Notification] "Vesting Started" Email

2 participants