feat: add delegated signer support for Solana smart wallets#1364
feat: add delegated signer support for Solana smart wallets#1364devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Conversation
- Add conditional delegatedSigners field to WalletArgsFor<C> type for Solana chains only
- Update CreateWalletParams type to support delegated signers for Solana smart wallets
- Implement validation logic in WalletFactory for delegated signers:
- Maximum 10 signers limit
- Valid Solana address format (external-wallet:{address})
- Prevent admin signer duplication
- Solana smart wallet type requirement
- Add delegated signer support to wallet creation and getOrCreateWallet methods
- Update type imports to use correct generated types from types.gen.ts
- Add type casting for API compatibility and TypeScript compilation
- Ensure type safety prevents delegated signers on non-Solana chains
This implementation allows Solana smart wallets to be created with delegated signers
during the initial wallet creation process, integrating with the 2025-06-09 API endpoint.
Co-Authored-By: devlyn@paella.dev <devlyn@paella.dev>
Original prompt from devlyn@paella.dev |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
- Remove validateDelegatedSigners and isValidSolanaAddress methods - Align validation with standalone addDelegatedSigner method - Backend handles all validation logic during API calls - Maintain Solana chain requirement check only Co-Authored-By: devlyn@paella.dev <devlyn@paella.dev>
…ated signer functionality - Remove unnecessary 'as any' casts from EVM signature creation - Keep minimal type casts only where required for delegated signer config access - Maintain core delegated signer functionality for Solana smart wallets - All builds, tests, and lint checks pass Co-Authored-By: devlyn@paella.dev <devlyn@paella.dev>
…urn type - Transform string[] to DelegatedSigner[] format using map function - Fix TypeScript compilation errors in quickstart-devkit app - Maintain existing UI functionality while adapting to simplified API Co-Authored-By: devlyn@paella.dev <devlyn@paella.dev>
Description
This PR adds support for delegated signers during Solana smart wallet creation, as requested by devlyn@paella.dev. The implementation allows specifying up to 10 delegated signers when creating a Solana smart wallet, with validation to ensure proper address format and prevent duplicates.
Key changes:
delegatedSignersfield toWalletArgsFor<C>type (Solana chains only)CreateWalletParamsto support delegated signers for Solana smart walletsWalletFactory:external-wallet:{address})V2025) to non-versioned typessolana-smart-wallet,evm-smart-wallet, etc.)API usage example:
Link to Devin run: https://app.devin.ai/sessions/7a17e0dfa8824c829193fd92de31126a
Requested by: devlyn@paella.dev
Test plan
pnpm test:vitest)pnpm build:libs)pnpm lint)Critical areas for review:
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)as anytype casting for API compatibilitylinkedUservsowner, wallet type strings)Package updates
No new packages added. Updated existing type definitions and validation logic within the wallets package.