v2.24.0
What's Changed
🚀 New Feature: ServerWallet - Next-Generation Secure Backend Wallets
We're excited to introduce ServerWallet, a powerful new wallet implementation that replaces the deprecated EngineWallet. ServerWallet provides vault-based secure wallet management with advanced execution options and seamless integration with the thirdweb dashboard's Transactions feature.
Key Features
- 🔒 Vault-Based Security: Enhanced security through server-side wallet management
- ⚡ Multiple Execution Modes: Support for Auto, ERC-4337, EIP-7702, EOA, and zkSync native AA execution
- 🎯 Smart Execution Strategy: Auto mode intelligently selects the optimal execution method based on your configuration
- 🔧 Flexible Configuration: Simple label-based wallet creation with optional execution customization
- 📊 Dashboard Integration: Full compatibility with thirdweb dashboard's Transactions tab (Engine v3)
Getting Started
// Basic usage with auto execution mode
var serverWallet = await ServerWallet.Create(
client: client,
label: "MyWallet"
);
// Advanced usage with custom execution options
var serverWallet = await ServerWallet.Create(
client: client,
label: "MyWallet",
executionOptions: new ERC4337ExecutionOptions(chainId: 84532, signerAddress: "0x...")
);
Available Execution Options
AutoExecutionOptions
(Default): Automatically determines the best execution strategyERC4337ExecutionOptions
: Smart contract wallet execution with Account AbstractionEIP7702ExecutionOptions
: Temporary EOA delegation to smart contractsEOAExecutionOptions
: Direct externally owned account execution
Full IThirdwebWallet Compatibility
ServerWallet implements the complete IThirdwebWallet
interface, supporting:
- Signing: Personal sign, typed data v4, transaction signing
- Transactions: Send, execute, and track transactions
- Transfers: Simple token and ETH transfers
- Message Signing: Support for various message formats
Usage Examples
// Get wallet address
var address = await serverWallet.GetAddress();
// Sign messages
var signature = await serverWallet.PersonalSign("Hello, Thirdweb!");
// Sign typed data
var typedDataSignature = await serverWallet.SignTypedDataV4(jsonTypedData);
// Execute transactions
var receipt = await serverWallet.Transfer(
chainId: 84532,
toAddress: "0x...",
weiAmount: 1000000000000000000 // 1 ETH
);
// Force specific execution mode
var smartWallet = await ServerWallet.Create(
client: client,
label: "MyWallet",
executionOptions: new ERC4337ExecutionOptions(chainId: 84532, signerAddress: address)
);
🚨 Breaking Changes & Migration
EngineWallet Deprecation
EngineWallet
is now deprecated and will be removed in a future version. Please migrate to ServerWallet
for continued support and new features.
Migration Guide:
// Old EngineWallet approach
var engineWallet = EngineWallet.Create(
client: client,
engineUrl: "https://your-engine-url",
authToken: "your-auth-token",
walletAddress: "0x..."
);
// New ServerWallet approach
var serverWallet = await ServerWallet.Create(
client: client,
label: "YourWalletLabel"
);
Key Differences
- Label-based: ServerWallet uses labels instead of direct address specification
- Cloud Integration: Built for thirdweb dashboard integration (Engine v3)
- Enhanced Security: Improved vault-based architecture
- Advanced Execution: Multiple execution strategies with intelligent auto-selection