You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## [2.1.2] - 2025-01-27
4
+
5
+
### Added Changes
6
+
7
+
-**viemLocalAccount Support**: Added support for passing a `LocalAccount` (from viem) directly to the Transaction Kit via the `viemLocalAccount` parameter in `delegatedEoa` mode. This allows users to bypass `privateKeyToAccount` conversion when they already have a `LocalAccount` object. The `viemLocalAccount` parameter works equivalently to `privateKey` and provides the same functionality - users can provide either `privateKey` or `viemLocalAccount`, but not both.
**Note**: In delegated EOA mode, you don't need to provide a `provider` as the private key is used directlyto create the account.
449
+
**Note**: In delegated EOA mode, you don't need to provide a `provider`. You can provide either a `privateKey` or a `viemLocalAccount` (a `LocalAccount` from viem) directly, but not both. The `viemLocalAccount` option is useful when you already have a `LocalAccount` object and want to bypass the `privateKey` conversion.
// Get transaction hash from userOp hash (available in both modes)
@@ -574,11 +575,11 @@ When calling `delegateSmartAccountToEoa({ delegateImmediately: false })`, the me
574
575
575
576
## 🔒 Security Considerations
576
577
577
-
### Private Key Handling in Delegated EOA Mode
578
+
### Private Key and Owner Account Handling in Delegated EOA Mode
578
579
579
-
When using `walletMode: 'delegatedEoa'`, you must provide a private key. Here are important security considerations:
580
+
When using `walletMode: 'delegatedEoa'`, you must provide either a `privateKey` or a `viemLocalAccount` (LocalAccount from viem). Here are important security considerations:
580
581
581
-
**⚠️ Never expose private keys in client-side code or logs!**
582
+
**⚠️ Never expose private keys or owner accounts in client-side code or logs!**
582
583
583
584
```typescript
584
585
// ❌ BAD: Hardcoded private key
@@ -593,7 +594,7 @@ const kit = TransactionKit({
593
594
walletMode: 'delegatedEoa',
594
595
});
595
596
596
-
// ✅ GOOD: Use secure key management
597
+
// ✅ GOOD: Use secure key management (works with both privateKey and viemLocalAccount)
597
598
const kit =TransactionKit({
598
599
privateKey: awaitgetSecurePrivateKey(), // From secure storage
0 commit comments