@dynamic-labs/ethereum-aa 4.20.10 → 4.20.11
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 +13 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/ZeroDevConnector.cjs +18 -8
- package/src/ZeroDevConnector.d.ts +1 -0
- package/src/ZeroDevConnector.js +18 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.20.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.10...v4.20.11) (2025-07-01)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add signed typed data to waas ([#9050](https://github.com/dynamic-labs/dynamic-auth/issues/9050)) ([19c8fea](https://github.com/dynamic-labs/dynamic-auth/commit/19c8fea2e5448e027cbec2f6158d32247dfcd321))
|
|
8
|
+
* pass jwt to waas operations ([#8981](https://github.com/dynamic-labs/dynamic-auth/issues/8981)) ([6b63394](https://github.com/dynamic-labs/dynamic-auth/commit/6b63394a1a724c2a1499a3d1ff13078d2314b10e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* 7702 signature for undeployed contracts ([#9052](https://github.com/dynamic-labs/dynamic-auth/issues/9052)) ([7052149](https://github.com/dynamic-labs/dynamic-auth/commit/7052149aae53524a0ac2bdad0b7ddf68e3c86189))
|
|
14
|
+
|
|
2
15
|
### [4.20.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.9...v4.20.10) (2025-06-30)
|
|
3
16
|
|
|
4
17
|
|
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.20.
|
|
3
|
+
"version": "4.20.11",
|
|
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.4.36",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.20.
|
|
26
|
-
"@dynamic-labs/ethereum-aa-core": "4.20.
|
|
27
|
-
"@dynamic-labs/ethereum-core": "4.20.
|
|
28
|
-
"@dynamic-labs/logger": "4.20.
|
|
29
|
-
"@dynamic-labs/types": "4.20.
|
|
30
|
-
"@dynamic-labs/utils": "4.20.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.20.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.20.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.20.11",
|
|
26
|
+
"@dynamic-labs/ethereum-aa-core": "4.20.11",
|
|
27
|
+
"@dynamic-labs/ethereum-core": "4.20.11",
|
|
28
|
+
"@dynamic-labs/logger": "4.20.11",
|
|
29
|
+
"@dynamic-labs/types": "4.20.11",
|
|
30
|
+
"@dynamic-labs/utils": "4.20.11",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.20.11",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.20.11"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.28.4"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -415,9 +415,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
415
415
|
getAccounts: () => _tslib.__awaiter(this, void 0, void 0, function* () { return [provider.account.address]; }),
|
|
416
416
|
onPersonalSign: (_a) => _tslib.__awaiter(this, [_a], void 0, function* ({ message }) {
|
|
417
417
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
418
|
-
return
|
|
419
|
-
message,
|
|
420
|
-
});
|
|
418
|
+
return this.internalSignMessage(message);
|
|
421
419
|
}),
|
|
422
420
|
onSendTransaction: (_b) => _tslib.__awaiter(this, [_b], void 0, function* ({ transaction }) {
|
|
423
421
|
try {
|
|
@@ -623,11 +621,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
623
621
|
}
|
|
624
622
|
signMessage(messageToSign) {
|
|
625
623
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
626
|
-
|
|
627
|
-
// https://docs.zerodev.app/sdk/core-api/sign-and-verify#signing-messages
|
|
628
|
-
if (!client)
|
|
629
|
-
throw new Error('Error fetching signer');
|
|
630
|
-
return client.signMessage({ message: messageToSign });
|
|
624
|
+
return this.internalSignMessage(messageToSign);
|
|
631
625
|
});
|
|
632
626
|
}
|
|
633
627
|
signMessageForChain(messageToSign, chainId) {
|
|
@@ -640,6 +634,22 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
640
634
|
return client.signMessage({ message: messageToSign });
|
|
641
635
|
});
|
|
642
636
|
}
|
|
637
|
+
internalSignMessage(messageToSign) {
|
|
638
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
639
|
+
var _a, _b;
|
|
640
|
+
if (!this.kernelClient) {
|
|
641
|
+
throw new utils.DynamicError('Error fetching signer');
|
|
642
|
+
}
|
|
643
|
+
if (!this.shouldUseEIP7702Mode) {
|
|
644
|
+
return this.kernelClient.signMessage({ message: messageToSign });
|
|
645
|
+
}
|
|
646
|
+
const isDeployed = yield ((_a = this.kernelClient.account) === null || _a === void 0 ? void 0 : _a.isDeployed());
|
|
647
|
+
if (!isDeployed) {
|
|
648
|
+
return (yield ((_b = this.eoaConnector) === null || _b === void 0 ? void 0 : _b.signMessage(messageToSign)));
|
|
649
|
+
}
|
|
650
|
+
return this.kernelClient.signMessage({ message: messageToSign });
|
|
651
|
+
});
|
|
652
|
+
}
|
|
643
653
|
validateActiveWallet(expectedAddress) {
|
|
644
654
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
645
655
|
if (this.shouldUseEIP7702Mode) {
|
|
@@ -177,6 +177,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
|
|
|
177
177
|
getBalance(address: string): Promise<string | undefined>;
|
|
178
178
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
179
179
|
signMessageForChain(messageToSign: string, chainId: string): Promise<string | undefined>;
|
|
180
|
+
private internalSignMessage;
|
|
180
181
|
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
181
182
|
isAtomicSupported(chainId?: number): Promise<boolean>;
|
|
182
183
|
isPaymasterServiceSupported(chainId?: number): Promise<boolean>;
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -411,9 +411,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
411
411
|
getAccounts: () => __awaiter(this, void 0, void 0, function* () { return [provider.account.address]; }),
|
|
412
412
|
onPersonalSign: (_a) => __awaiter(this, [_a], void 0, function* ({ message }) {
|
|
413
413
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
414
|
-
return
|
|
415
|
-
message,
|
|
416
|
-
});
|
|
414
|
+
return this.internalSignMessage(message);
|
|
417
415
|
}),
|
|
418
416
|
onSendTransaction: (_b) => __awaiter(this, [_b], void 0, function* ({ transaction }) {
|
|
419
417
|
try {
|
|
@@ -619,11 +617,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
619
617
|
}
|
|
620
618
|
signMessage(messageToSign) {
|
|
621
619
|
return __awaiter(this, void 0, void 0, function* () {
|
|
622
|
-
|
|
623
|
-
// https://docs.zerodev.app/sdk/core-api/sign-and-verify#signing-messages
|
|
624
|
-
if (!client)
|
|
625
|
-
throw new Error('Error fetching signer');
|
|
626
|
-
return client.signMessage({ message: messageToSign });
|
|
620
|
+
return this.internalSignMessage(messageToSign);
|
|
627
621
|
});
|
|
628
622
|
}
|
|
629
623
|
signMessageForChain(messageToSign, chainId) {
|
|
@@ -636,6 +630,22 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
636
630
|
return client.signMessage({ message: messageToSign });
|
|
637
631
|
});
|
|
638
632
|
}
|
|
633
|
+
internalSignMessage(messageToSign) {
|
|
634
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
635
|
+
var _a, _b;
|
|
636
|
+
if (!this.kernelClient) {
|
|
637
|
+
throw new DynamicError('Error fetching signer');
|
|
638
|
+
}
|
|
639
|
+
if (!this.shouldUseEIP7702Mode) {
|
|
640
|
+
return this.kernelClient.signMessage({ message: messageToSign });
|
|
641
|
+
}
|
|
642
|
+
const isDeployed = yield ((_a = this.kernelClient.account) === null || _a === void 0 ? void 0 : _a.isDeployed());
|
|
643
|
+
if (!isDeployed) {
|
|
644
|
+
return (yield ((_b = this.eoaConnector) === null || _b === void 0 ? void 0 : _b.signMessage(messageToSign)));
|
|
645
|
+
}
|
|
646
|
+
return this.kernelClient.signMessage({ message: messageToSign });
|
|
647
|
+
});
|
|
648
|
+
}
|
|
639
649
|
validateActiveWallet(expectedAddress) {
|
|
640
650
|
return __awaiter(this, void 0, void 0, function* () {
|
|
641
651
|
if (this.shouldUseEIP7702Mode) {
|