- 
                Notifications
    You must be signed in to change notification settings 
- Fork 29
feat: add delegated signer support for Solana smart wallets #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add delegated signer support for Solana smart wallets #1364
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: [email protected] <[email protected]>
    | Original prompt from [email protected] | 
| 🤖 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: [email protected] <[email protected]>
…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: [email protected] <[email protected]>
…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: [email protected] <[email protected]>
Description
This PR adds support for delegated signers during Solana smart wallet creation, as requested by [email protected]. 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: [email protected]
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.