@dynamic-labs/zerodev-extension 4.20.4 → 4.20.6
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
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.20.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.5...v4.20.6) (2025-06-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* parse input to eth_signTypedData_v4 with global wallets ([#8964](https://github.com/dynamic-labs/dynamic-auth/issues/8964)) ([6035b5a](https://github.com/dynamic-labs/dynamic-auth/commit/6035b5afcb3af44833e5f9dd9f423b865c06e729))
|
|
8
|
+
* utilize wallet zerodev properties when available in react native ([#8974](https://github.com/dynamic-labs/dynamic-auth/issues/8974)) ([a2390b3](https://github.com/dynamic-labs/dynamic-auth/commit/a2390b367999fd7bfc4e142c1b4ea8d5fab0eece))
|
|
9
|
+
|
|
10
|
+
### [4.20.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.4...v4.20.5) (2025-06-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add mpc methods to RN ([#8952](https://github.com/dynamic-labs/dynamic-auth/issues/8952)) ([67383fc](https://github.com/dynamic-labs/dynamic-auth/commit/67383fcd92bc88875d65b520bd1951822a0d7d43))
|
|
16
|
+
* manually create v3 wallets on RN ([#8947](https://github.com/dynamic-labs/dynamic-auth/issues/8947)) ([d534b44](https://github.com/dynamic-labs/dynamic-auth/commit/d534b44bec28302791f789bd762ae5940ef00f58))
|
|
17
|
+
* update Bitget wallet logo with new SVG design ([#8961](https://github.com/dynamic-labs/dynamic-auth/issues/8961)) ([c47aaa6](https://github.com/dynamic-labs/dynamic-auth/commit/c47aaa6e3ee388831ca62f7e8b913cd15e57060f))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* clean user op cache on network switch ([#8966](https://github.com/dynamic-labs/dynamic-auth/issues/8966)) ([d1783d3](https://github.com/dynamic-labs/dynamic-auth/commit/d1783d3bd627e7c31dd3433385218767e69a4fbc))
|
|
23
|
+
|
|
2
24
|
### [4.20.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.3...v4.20.4) (2025-06-13)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/zerodev-extension",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.6",
|
|
4
4
|
"main": "./src/index.cjs",
|
|
5
5
|
"module": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
17
|
+
"@dynamic-labs/sdk-api-core": "0.0.688",
|
|
18
18
|
"@zerodev/sdk": "5.4.36",
|
|
19
19
|
"@zerodev/multi-chain-ecdsa-validator": "5.4.5",
|
|
20
20
|
"@zerodev/ecdsa-validator": "5.4.9",
|
|
21
|
-
"@dynamic-labs/assert-package-version": "4.20.
|
|
22
|
-
"@dynamic-labs/client": "4.20.
|
|
23
|
-
"@dynamic-labs/ethereum-aa": "4.20.
|
|
24
|
-
"@dynamic-labs/logger": "4.20.
|
|
25
|
-
"@dynamic-labs/message-transport": "4.20.
|
|
26
|
-
"@dynamic-labs/viem-extension": "4.20.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.20.6",
|
|
22
|
+
"@dynamic-labs/client": "4.20.6",
|
|
23
|
+
"@dynamic-labs/ethereum-aa": "4.20.6",
|
|
24
|
+
"@dynamic-labs/logger": "4.20.6",
|
|
25
|
+
"@dynamic-labs/message-transport": "4.20.6",
|
|
26
|
+
"@dynamic-labs/viem-extension": "4.20.6"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"viem": "^2.28.4"
|
|
@@ -26,7 +26,7 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
26
26
|
return {
|
|
27
27
|
zeroDev: {
|
|
28
28
|
createKernelClient: (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ wallet, chainId, bundlerProvider, bundlerRpc, paymasterRpc, paymaster, }) {
|
|
29
|
-
var _b;
|
|
29
|
+
var _b, _c, _d;
|
|
30
30
|
try {
|
|
31
31
|
const eoaWallet = yield client$1.wallets.accountAbstraction.getEOAWallet({
|
|
32
32
|
wallet,
|
|
@@ -38,11 +38,11 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
38
38
|
account: accounts.toAccount({
|
|
39
39
|
address: eoaWallet.address,
|
|
40
40
|
signAuthorization: (parameters) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
-
var
|
|
41
|
+
var _e;
|
|
42
42
|
const result = yield viemRequestChannel.request('viem_signAuthorization', eoaWallet.id, parameters);
|
|
43
|
-
return Object.assign(Object.assign({}, result), { yParity: (
|
|
43
|
+
return Object.assign(Object.assign({}, result), { yParity: (_e = result.yParity) !== null && _e !== void 0 ? _e : 0 });
|
|
44
44
|
}),
|
|
45
|
-
signMessage: (
|
|
45
|
+
signMessage: (_f) => _tslib.__awaiter(void 0, [_f], void 0, function* ({ message }) {
|
|
46
46
|
return viemRequestChannel.request('viem_signMessage', eoaWallet.id, message);
|
|
47
47
|
}),
|
|
48
48
|
signTransaction: (transaction) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -56,13 +56,25 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
56
56
|
wallet: eoaWallet,
|
|
57
57
|
});
|
|
58
58
|
const accountSettings = yield zeroDevRequestChannel.request('getKernelAccountSettings', { chainId, wallet });
|
|
59
|
+
const zerodevWalletProperties = (_c = (_b = client$1.auth.authenticatedUser) === null || _b === void 0 ? void 0 : _b.verifiedCredentials.find((credential) => credential.id === wallet.id)) === null || _c === void 0 ? void 0 : _c.walletProperties;
|
|
60
|
+
const walletEntryPoint = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.entryPointVersion)
|
|
61
|
+
? ethereumAa.getEntryPoint(zerodevWalletProperties.entryPointVersion)
|
|
62
|
+
: undefined;
|
|
63
|
+
let walletKernelVersion;
|
|
64
|
+
if (walletEntryPoint) {
|
|
65
|
+
walletKernelVersion = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.kernelVersion)
|
|
66
|
+
? ethereumAa.getKernelVersion(zerodevWalletProperties.kernelVersion, walletEntryPoint)
|
|
67
|
+
: undefined;
|
|
68
|
+
}
|
|
69
|
+
const kernelVersion = walletKernelVersion !== null && walletKernelVersion !== void 0 ? walletKernelVersion : accountSettings.kernelVersion;
|
|
70
|
+
const entryPoint = walletEntryPoint !== null && walletEntryPoint !== void 0 ? walletEntryPoint : accountSettings.entryPoint;
|
|
59
71
|
const params = {
|
|
60
|
-
apiKernelVersion:
|
|
72
|
+
apiKernelVersion: kernelVersion,
|
|
61
73
|
bundlerRpc,
|
|
62
74
|
chain: getChainById.getChainById(accountSettings.chainId),
|
|
63
75
|
enableKernelV3Migration: false,
|
|
64
|
-
entryPoint
|
|
65
|
-
kernelVersion
|
|
76
|
+
entryPoint,
|
|
77
|
+
kernelVersion,
|
|
66
78
|
paymaster: paymaster !== null && paymaster !== void 0 ? paymaster : ethereumAa.PaymasterTypeEnum.NONE,
|
|
67
79
|
paymasterRpc,
|
|
68
80
|
projectId: accountSettings.projectId,
|
|
@@ -72,7 +84,7 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
72
84
|
if (accountSettings.enableEIP7702) {
|
|
73
85
|
return ethereumAa.createEcdsaKernelAccountClientWith7702(Object.assign(Object.assign({}, params), { kernelVersion: constants.KERNEL_V3_3 }));
|
|
74
86
|
}
|
|
75
|
-
return ethereumAa.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: ethereumAa.getEcdsaValidator((
|
|
87
|
+
return ethereumAa.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: ethereumAa.getEcdsaValidator((_d = accountSettings.ecdsaProviderType) !== null && _d !== void 0 ? _d : undefined) }));
|
|
76
88
|
}
|
|
77
89
|
catch (error) {
|
|
78
90
|
logger.logger.error(error);
|
|
@@ -3,7 +3,7 @@ import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { KERNEL_V3_3 } from '@zerodev/sdk/constants';
|
|
4
4
|
import { toAccount } from 'viem/accounts';
|
|
5
5
|
import { hasExtension, baseClientExtensionName } from '@dynamic-labs/client';
|
|
6
|
-
import { PaymasterTypeEnum, createEcdsaKernelAccountClientWith7702, createEcdsaKernelAccountClient, getEcdsaValidator } from '@dynamic-labs/ethereum-aa';
|
|
6
|
+
import { getEntryPoint, getKernelVersion, PaymasterTypeEnum, createEcdsaKernelAccountClientWith7702, createEcdsaKernelAccountClient, getEcdsaValidator } from '@dynamic-labs/ethereum-aa';
|
|
7
7
|
import { createRequestChannel } from '@dynamic-labs/message-transport';
|
|
8
8
|
import { viemExtensionName } from '@dynamic-labs/viem-extension';
|
|
9
9
|
import { getChainById } from '../utils/getChainById/getChainById.js';
|
|
@@ -22,7 +22,7 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
22
22
|
return {
|
|
23
23
|
zeroDev: {
|
|
24
24
|
createKernelClient: (_a) => __awaiter(void 0, [_a], void 0, function* ({ wallet, chainId, bundlerProvider, bundlerRpc, paymasterRpc, paymaster, }) {
|
|
25
|
-
var _b;
|
|
25
|
+
var _b, _c, _d;
|
|
26
26
|
try {
|
|
27
27
|
const eoaWallet = yield client.wallets.accountAbstraction.getEOAWallet({
|
|
28
28
|
wallet,
|
|
@@ -34,11 +34,11 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
34
34
|
account: toAccount({
|
|
35
35
|
address: eoaWallet.address,
|
|
36
36
|
signAuthorization: (parameters) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
-
var
|
|
37
|
+
var _e;
|
|
38
38
|
const result = yield viemRequestChannel.request('viem_signAuthorization', eoaWallet.id, parameters);
|
|
39
|
-
return Object.assign(Object.assign({}, result), { yParity: (
|
|
39
|
+
return Object.assign(Object.assign({}, result), { yParity: (_e = result.yParity) !== null && _e !== void 0 ? _e : 0 });
|
|
40
40
|
}),
|
|
41
|
-
signMessage: (
|
|
41
|
+
signMessage: (_f) => __awaiter(void 0, [_f], void 0, function* ({ message }) {
|
|
42
42
|
return viemRequestChannel.request('viem_signMessage', eoaWallet.id, message);
|
|
43
43
|
}),
|
|
44
44
|
signTransaction: (transaction) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -52,13 +52,25 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
52
52
|
wallet: eoaWallet,
|
|
53
53
|
});
|
|
54
54
|
const accountSettings = yield zeroDevRequestChannel.request('getKernelAccountSettings', { chainId, wallet });
|
|
55
|
+
const zerodevWalletProperties = (_c = (_b = client.auth.authenticatedUser) === null || _b === void 0 ? void 0 : _b.verifiedCredentials.find((credential) => credential.id === wallet.id)) === null || _c === void 0 ? void 0 : _c.walletProperties;
|
|
56
|
+
const walletEntryPoint = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.entryPointVersion)
|
|
57
|
+
? getEntryPoint(zerodevWalletProperties.entryPointVersion)
|
|
58
|
+
: undefined;
|
|
59
|
+
let walletKernelVersion;
|
|
60
|
+
if (walletEntryPoint) {
|
|
61
|
+
walletKernelVersion = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.kernelVersion)
|
|
62
|
+
? getKernelVersion(zerodevWalletProperties.kernelVersion, walletEntryPoint)
|
|
63
|
+
: undefined;
|
|
64
|
+
}
|
|
65
|
+
const kernelVersion = walletKernelVersion !== null && walletKernelVersion !== void 0 ? walletKernelVersion : accountSettings.kernelVersion;
|
|
66
|
+
const entryPoint = walletEntryPoint !== null && walletEntryPoint !== void 0 ? walletEntryPoint : accountSettings.entryPoint;
|
|
55
67
|
const params = {
|
|
56
|
-
apiKernelVersion:
|
|
68
|
+
apiKernelVersion: kernelVersion,
|
|
57
69
|
bundlerRpc,
|
|
58
70
|
chain: getChainById(accountSettings.chainId),
|
|
59
71
|
enableKernelV3Migration: false,
|
|
60
|
-
entryPoint
|
|
61
|
-
kernelVersion
|
|
72
|
+
entryPoint,
|
|
73
|
+
kernelVersion,
|
|
62
74
|
paymaster: paymaster !== null && paymaster !== void 0 ? paymaster : PaymasterTypeEnum.NONE,
|
|
63
75
|
paymasterRpc,
|
|
64
76
|
projectId: accountSettings.projectId,
|
|
@@ -68,7 +80,7 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
68
80
|
if (accountSettings.enableEIP7702) {
|
|
69
81
|
return createEcdsaKernelAccountClientWith7702(Object.assign(Object.assign({}, params), { kernelVersion: KERNEL_V3_3 }));
|
|
70
82
|
}
|
|
71
|
-
return createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator((
|
|
83
|
+
return createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator((_d = accountSettings.ecdsaProviderType) !== null && _d !== void 0 ? _d : undefined) }));
|
|
72
84
|
}
|
|
73
85
|
catch (error) {
|
|
74
86
|
logger.error(error);
|