Overview
Delegated access allows your server to perform wallet operations (signing messages and transactions) on behalf of users with their permission. This is useful for automating workflows while maintaining security through user-approved delegation. This guide covers the server-side implementation using the Node EVM SDK. For conceptual background on delegated access and the delegation workflow, see Delegated Access Overview.Prerequisites
Before implementing delegated access, you need:- A Dynamic environment with embedded wallets (MPC) enabled
- Server API key from the Dynamic dashboard
- Access to delegated shares, wallet API etc. via Delegated Access
How Delegation Works
- User approves delegation request in your application (client-side)
- Dynamic sends delegation credentials to your webhook endpoint:
walletId
: The user’s wallet IDwalletApiKey
: Temporary API key for this walletkeyShare
: Server key share for signing operations
- Your server stores these credentials securely
- Your server uses these credentials to perform signing operations
Creating the Delegated Client
First, create a delegated EVM wallet client using your server API key:Configuration Options
Signing Messages
Use the delegated client to sign messages on behalf of users. You’ll need the delegation credentials received from your webhook.Basic Message Signing
Signing Transactions
Sign EVM transactions using delegated access. The transaction must be a valid ViemTransactionSerializable
object.
Basic Transaction Signing
Complete Transaction Flow
Security Considerations
Credential Storage
- Never log or expose delegation credentials (wallet API key, key share)
- Store credentials encrypted at rest in your database
- Use secure environment variables for server API keys
- Implement credential rotation policies