@dynamic-labs/ethereum-aa 4.88.2 → 4.88.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/ZeroDevConnector.cjs +45 -41
- package/src/ZeroDevConnector.js +45 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.88.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.3...v4.88.4) (2026-06-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **wagmi-connector:** instrument ConnectorAlreadyConnectedError to quantify SyncDynamicWagmi race DYNT-549 ([#11513](https://github.com/dynamic-labs/dynamic-auth/issues/11513)) ([00a3278](https://github.com/dynamic-labs/dynamic-auth/commit/00a3278197fc8d8442e64af7373fc4f20e4e5a69)), closes [#11131](https://github.com/dynamic-labs/dynamic-auth/issues/11131) [#11496](https://github.com/dynamic-labs/dynamic-auth/issues/11496)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **ci:** show unreleased changes in bump-version release review summary ([#11484](https://github.com/dynamic-labs/dynamic-auth/issues/11484)) ([3e1c3d1](https://github.com/dynamic-labs/dynamic-auth/commit/3e1c3d12d66e0d94cb430d66ccfbffe3abdbd6ba))
|
|
13
|
+
* **release:** surface perf and revert commits in generated changelog ([#11507](https://github.com/dynamic-labs/dynamic-auth/issues/11507)) ([8efa0d9](https://github.com/dynamic-labs/dynamic-auth/commit/8efa0d95ab320480fcaf970a24bba35892b0fc99))
|
|
14
|
+
* remediate critical shell-quote vulnerability (CVE-2026-9277) + bump @dynamic-labs-sdk/client to 1.8.1 ([#11527](https://github.com/dynamic-labs/dynamic-auth/issues/11527)) ([c056df6](https://github.com/dynamic-labs/dynamic-auth/commit/c056df653f99992c9b333078ba13651e61826ab5))
|
|
15
|
+
* remediate high-severity vite vulnerability (CVE-2024-52011) ([#11509](https://github.com/dynamic-labs/dynamic-auth/issues/11509)) ([7c43b4e](https://github.com/dynamic-labs/dynamic-auth/commit/7c43b4e736c68da7de8789f1d44964778306abbf))
|
|
16
|
+
* support plain EOA transactions for 7702 smart wallets via viem extension ([#11525](https://github.com/dynamic-labs/dynamic-auth/issues/11525)) ([ce8542f](https://github.com/dynamic-labs/dynamic-auth/commit/ce8542fa40b4227759bcf2ca243b4bc313018b50))
|
|
17
|
+
* **wagmi-connector:** propagate external wagmi disconnect to Dynamic via handleLogOut ([#11496](https://github.com/dynamic-labs/dynamic-auth/issues/11496)) ([1b19565](https://github.com/dynamic-labs/dynamic-auth/commit/1b195657b9210da233480dda143fb92b39998962))
|
|
18
|
+
|
|
19
|
+
### [4.88.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.2...v4.88.3) (2026-06-09)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **ethereum:** bump @walletconnect/ethereum-provider to 2.23.2 ([#11497](https://github.com/dynamic-labs/dynamic-auth/issues/11497)) ([fb42c38](https://github.com/dynamic-labs/dynamic-auth/commit/fb42c3877f55d2dfaa3a3a46f8178a6b4a0e55d0))
|
|
25
|
+
* persist OTP verification state in sessionStorage to survive webview remounts ([#11499](https://github.com/dynamic-labs/dynamic-auth/issues/11499)) ([aa330df](https://github.com/dynamic-labs/dynamic-auth/commit/aa330dfc41e8fc81b823cce08b7c9b93588fc52c))
|
|
26
|
+
|
|
2
27
|
### [4.88.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.1...v4.88.2) (2026-06-06)
|
|
3
28
|
|
|
4
29
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "4.88.
|
|
3
|
+
"version": "4.88.4",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"@zerodev/ecdsa-validator": "5.4.9",
|
|
23
23
|
"@zerodev/multi-chain-ecdsa-validator": "5.4.5",
|
|
24
24
|
"@zerodev/sdk": "5.5.7",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.88.
|
|
26
|
-
"@dynamic-labs/ethereum-aa-core": "4.88.
|
|
27
|
-
"@dynamic-labs/ethereum-core": "4.88.
|
|
28
|
-
"@dynamic-labs/logger": "4.88.
|
|
29
|
-
"@dynamic-labs/types": "4.88.
|
|
30
|
-
"@dynamic-labs/utils": "4.88.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.88.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.88.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.88.4",
|
|
26
|
+
"@dynamic-labs/ethereum-aa-core": "4.88.4",
|
|
27
|
+
"@dynamic-labs/ethereum-core": "4.88.4",
|
|
28
|
+
"@dynamic-labs/logger": "4.88.4",
|
|
29
|
+
"@dynamic-labs/types": "4.88.4",
|
|
30
|
+
"@dynamic-labs/utils": "4.88.4",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.88.4",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.88.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.45.3"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -695,6 +695,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
695
695
|
}
|
|
696
696
|
signAndSendUserOperationWithWaas(provider, userOperation) {
|
|
697
697
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
698
|
+
if (!userOperation) {
|
|
699
|
+
throw new utils.DynamicError('Failed to prepare user operation for transaction');
|
|
700
|
+
}
|
|
698
701
|
const chainId = Number(this.lastUsedChainId);
|
|
699
702
|
const hash = accountAbstraction.getUserOperationHash({
|
|
700
703
|
chainId: chainId,
|
|
@@ -718,61 +721,62 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
718
721
|
}
|
|
719
722
|
getCurrentUserOperation(transaction) {
|
|
720
723
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
721
|
-
var _a
|
|
724
|
+
var _a;
|
|
722
725
|
const key = `${transaction.from}-${transaction.to}-${transaction.data}`;
|
|
723
726
|
if (this.userOperationCache[key]) {
|
|
724
727
|
return this.userOperationCache[key];
|
|
725
728
|
}
|
|
729
|
+
const { kernelClientWithSponsorship } = this;
|
|
730
|
+
if (!kernelClientWithSponsorship) {
|
|
731
|
+
throw new utils.DynamicError('No kernel client with sponsorship found');
|
|
732
|
+
}
|
|
733
|
+
const value = BigInt((_a = transaction.value) !== null && _a !== void 0 ? _a : 0);
|
|
734
|
+
const callData = yield kernelClientWithSponsorship.account.encodeCalls([
|
|
735
|
+
{
|
|
736
|
+
data: transaction.data ? transaction.data : '0x',
|
|
737
|
+
to: transaction.to,
|
|
738
|
+
value,
|
|
739
|
+
},
|
|
740
|
+
]);
|
|
741
|
+
let sponsorResult;
|
|
742
|
+
let unsponsoredResult;
|
|
726
743
|
try {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
const value = BigInt((_a = transaction.value) !== null && _a !== void 0 ? _a : 0);
|
|
732
|
-
const callData = yield kernelClientWithSponsorship.account.encodeCalls([
|
|
733
|
-
{
|
|
734
|
-
data: transaction.data ? transaction.data : '0x',
|
|
735
|
-
to: transaction.to,
|
|
736
|
-
value,
|
|
737
|
-
},
|
|
738
|
-
]);
|
|
739
|
-
let sponsorResult;
|
|
740
|
-
let unsponsoredResult;
|
|
741
|
-
try {
|
|
742
|
-
sponsorResult = yield kernelClientWithSponsorship.prepareUserOperation({
|
|
743
|
-
callData,
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
catch (err) {
|
|
747
|
-
logger.logger.debug('[ZeroDevConnector] Sponsored UserOp Attempt Failed:', err);
|
|
748
|
-
unsponsoredResult = yield ((_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.prepareUserOperation({
|
|
749
|
-
callData,
|
|
750
|
-
}));
|
|
751
|
-
}
|
|
752
|
-
// Cache the result
|
|
753
|
-
this.userOperationCache[key] = {
|
|
754
|
-
sponsored: (sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) !== '0x',
|
|
755
|
-
userOperation: sponsorResult !== null && sponsorResult !== void 0 ? sponsorResult : unsponsoredResult,
|
|
756
|
-
};
|
|
757
|
-
if ((sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) === '0x')
|
|
758
|
-
return { sponsored: false, userOperation: sponsorResult };
|
|
759
|
-
return sponsorResult
|
|
760
|
-
? { sponsored: true, userOperation: sponsorResult }
|
|
761
|
-
: { sponsored: false, userOperation: unsponsoredResult };
|
|
744
|
+
sponsorResult = yield kernelClientWithSponsorship.prepareUserOperation({
|
|
745
|
+
callData,
|
|
746
|
+
});
|
|
762
747
|
}
|
|
763
748
|
catch (err) {
|
|
764
|
-
logger.logger.debug('[ZeroDevConnector]
|
|
765
|
-
|
|
749
|
+
logger.logger.debug('[ZeroDevConnector] Sponsored UserOp Attempt Failed:', err);
|
|
750
|
+
const { kernelClient } = this;
|
|
751
|
+
if (!kernelClient) {
|
|
752
|
+
throw err;
|
|
753
|
+
}
|
|
754
|
+
unsponsoredResult = yield kernelClient.prepareUserOperation({
|
|
755
|
+
callData,
|
|
756
|
+
});
|
|
766
757
|
}
|
|
758
|
+
// Cache the result
|
|
759
|
+
this.userOperationCache[key] = {
|
|
760
|
+
sponsored: (sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) !== '0x',
|
|
761
|
+
userOperation: sponsorResult !== null && sponsorResult !== void 0 ? sponsorResult : unsponsoredResult,
|
|
762
|
+
};
|
|
763
|
+
if ((sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) === '0x')
|
|
764
|
+
return { sponsored: false, userOperation: sponsorResult };
|
|
765
|
+
return sponsorResult
|
|
766
|
+
? { sponsored: true, userOperation: sponsorResult }
|
|
767
|
+
: { sponsored: false, userOperation: unsponsoredResult };
|
|
767
768
|
});
|
|
768
769
|
}
|
|
769
770
|
canSponsorTransactionGas(transaction) {
|
|
770
771
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
771
|
-
|
|
772
|
-
|
|
772
|
+
try {
|
|
773
|
+
const { sponsored } = yield this.getCurrentUserOperation(transaction);
|
|
774
|
+
return sponsored;
|
|
775
|
+
}
|
|
776
|
+
catch (err) {
|
|
777
|
+
logger.logger.debug('[ZeroDevConnector] Error in getCurrentUserOperation:', err);
|
|
773
778
|
return false;
|
|
774
779
|
}
|
|
775
|
-
return sponsored;
|
|
776
780
|
});
|
|
777
781
|
}
|
|
778
782
|
getBalance(address) {
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -691,6 +691,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
691
691
|
}
|
|
692
692
|
signAndSendUserOperationWithWaas(provider, userOperation) {
|
|
693
693
|
return __awaiter(this, void 0, void 0, function* () {
|
|
694
|
+
if (!userOperation) {
|
|
695
|
+
throw new DynamicError('Failed to prepare user operation for transaction');
|
|
696
|
+
}
|
|
694
697
|
const chainId = Number(this.lastUsedChainId);
|
|
695
698
|
const hash = getUserOperationHash({
|
|
696
699
|
chainId: chainId,
|
|
@@ -714,61 +717,62 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
714
717
|
}
|
|
715
718
|
getCurrentUserOperation(transaction) {
|
|
716
719
|
return __awaiter(this, void 0, void 0, function* () {
|
|
717
|
-
var _a
|
|
720
|
+
var _a;
|
|
718
721
|
const key = `${transaction.from}-${transaction.to}-${transaction.data}`;
|
|
719
722
|
if (this.userOperationCache[key]) {
|
|
720
723
|
return this.userOperationCache[key];
|
|
721
724
|
}
|
|
725
|
+
const { kernelClientWithSponsorship } = this;
|
|
726
|
+
if (!kernelClientWithSponsorship) {
|
|
727
|
+
throw new DynamicError('No kernel client with sponsorship found');
|
|
728
|
+
}
|
|
729
|
+
const value = BigInt((_a = transaction.value) !== null && _a !== void 0 ? _a : 0);
|
|
730
|
+
const callData = yield kernelClientWithSponsorship.account.encodeCalls([
|
|
731
|
+
{
|
|
732
|
+
data: transaction.data ? transaction.data : '0x',
|
|
733
|
+
to: transaction.to,
|
|
734
|
+
value,
|
|
735
|
+
},
|
|
736
|
+
]);
|
|
737
|
+
let sponsorResult;
|
|
738
|
+
let unsponsoredResult;
|
|
722
739
|
try {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
727
|
-
const value = BigInt((_a = transaction.value) !== null && _a !== void 0 ? _a : 0);
|
|
728
|
-
const callData = yield kernelClientWithSponsorship.account.encodeCalls([
|
|
729
|
-
{
|
|
730
|
-
data: transaction.data ? transaction.data : '0x',
|
|
731
|
-
to: transaction.to,
|
|
732
|
-
value,
|
|
733
|
-
},
|
|
734
|
-
]);
|
|
735
|
-
let sponsorResult;
|
|
736
|
-
let unsponsoredResult;
|
|
737
|
-
try {
|
|
738
|
-
sponsorResult = yield kernelClientWithSponsorship.prepareUserOperation({
|
|
739
|
-
callData,
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
catch (err) {
|
|
743
|
-
logger.debug('[ZeroDevConnector] Sponsored UserOp Attempt Failed:', err);
|
|
744
|
-
unsponsoredResult = yield ((_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.prepareUserOperation({
|
|
745
|
-
callData,
|
|
746
|
-
}));
|
|
747
|
-
}
|
|
748
|
-
// Cache the result
|
|
749
|
-
this.userOperationCache[key] = {
|
|
750
|
-
sponsored: (sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) !== '0x',
|
|
751
|
-
userOperation: sponsorResult !== null && sponsorResult !== void 0 ? sponsorResult : unsponsoredResult,
|
|
752
|
-
};
|
|
753
|
-
if ((sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) === '0x')
|
|
754
|
-
return { sponsored: false, userOperation: sponsorResult };
|
|
755
|
-
return sponsorResult
|
|
756
|
-
? { sponsored: true, userOperation: sponsorResult }
|
|
757
|
-
: { sponsored: false, userOperation: unsponsoredResult };
|
|
740
|
+
sponsorResult = yield kernelClientWithSponsorship.prepareUserOperation({
|
|
741
|
+
callData,
|
|
742
|
+
});
|
|
758
743
|
}
|
|
759
744
|
catch (err) {
|
|
760
|
-
logger.debug('[ZeroDevConnector]
|
|
761
|
-
|
|
745
|
+
logger.debug('[ZeroDevConnector] Sponsored UserOp Attempt Failed:', err);
|
|
746
|
+
const { kernelClient } = this;
|
|
747
|
+
if (!kernelClient) {
|
|
748
|
+
throw err;
|
|
749
|
+
}
|
|
750
|
+
unsponsoredResult = yield kernelClient.prepareUserOperation({
|
|
751
|
+
callData,
|
|
752
|
+
});
|
|
762
753
|
}
|
|
754
|
+
// Cache the result
|
|
755
|
+
this.userOperationCache[key] = {
|
|
756
|
+
sponsored: (sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) !== '0x',
|
|
757
|
+
userOperation: sponsorResult !== null && sponsorResult !== void 0 ? sponsorResult : unsponsoredResult,
|
|
758
|
+
};
|
|
759
|
+
if ((sponsorResult === null || sponsorResult === void 0 ? void 0 : sponsorResult.paymasterAndData) === '0x')
|
|
760
|
+
return { sponsored: false, userOperation: sponsorResult };
|
|
761
|
+
return sponsorResult
|
|
762
|
+
? { sponsored: true, userOperation: sponsorResult }
|
|
763
|
+
: { sponsored: false, userOperation: unsponsoredResult };
|
|
763
764
|
});
|
|
764
765
|
}
|
|
765
766
|
canSponsorTransactionGas(transaction) {
|
|
766
767
|
return __awaiter(this, void 0, void 0, function* () {
|
|
767
|
-
|
|
768
|
-
|
|
768
|
+
try {
|
|
769
|
+
const { sponsored } = yield this.getCurrentUserOperation(transaction);
|
|
770
|
+
return sponsored;
|
|
771
|
+
}
|
|
772
|
+
catch (err) {
|
|
773
|
+
logger.debug('[ZeroDevConnector] Error in getCurrentUserOperation:', err);
|
|
769
774
|
return false;
|
|
770
775
|
}
|
|
771
|
-
return sponsored;
|
|
772
776
|
});
|
|
773
777
|
}
|
|
774
778
|
getBalance(address) {
|