@dynamic-labs/zerodev-extension 4.32.1 → 4.34.0
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,24 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.34.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.33.0...v4.34.0) (2025-09-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add getMultichainBalances to react-native ([#9593](https://github.com/dynamic-labs/dynamic-auth/issues/9593)) ([2e482c3](https://github.com/dynamic-labs/dynamic-auth/commit/2e482c3a3d17e4570173c3ca6e27d83c9fac7265))
|
|
8
|
+
|
|
9
|
+
## [4.33.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.32.1...v4.33.0) (2025-09-26)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add support for signAndExecuteTransactionBlock and signTransactionBlock legacy sui features ([#9574](https://github.com/dynamic-labs/dynamic-auth/issues/9574)) ([316481f](https://github.com/dynamic-labs/dynamic-auth/commit/316481f9255ccc8873d267e85932df3b9d58184b))
|
|
15
|
+
* add viem account for waas wallets ([#9518](https://github.com/dynamic-labs/dynamic-auth/issues/9518)) ([39b6314](https://github.com/dynamic-labs/dynamic-auth/commit/39b631489a5fc38bf8077a91f7dd36d517e42512))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* unable to use backup codes to delete totp method on dynamics ui ([#9575](https://github.com/dynamic-labs/dynamic-auth/issues/9575)) ([db55161](https://github.com/dynamic-labs/dynamic-auth/commit/db5516191103ba00f3d993db28ec0df630e066b0))
|
|
21
|
+
|
|
2
22
|
### [4.32.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.32.0...v4.32.1) (2025-09-25)
|
|
3
23
|
|
|
4
24
|
|
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.
|
|
3
|
+
"version": "4.34.0",
|
|
4
4
|
"main": "./src/index.cjs",
|
|
5
5
|
"module": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -18,13 +18,13 @@
|
|
|
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.
|
|
22
|
-
"@dynamic-labs/client": "4.
|
|
23
|
-
"@dynamic-labs/ethereum-aa": "4.
|
|
24
|
-
"@dynamic-labs/logger": "4.
|
|
25
|
-
"@dynamic-labs/message-transport": "4.
|
|
26
|
-
"@dynamic-labs/viem-extension": "4.
|
|
27
|
-
"@dynamic-labs/webview-messages": "4.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.34.0",
|
|
22
|
+
"@dynamic-labs/client": "4.34.0",
|
|
23
|
+
"@dynamic-labs/ethereum-aa": "4.34.0",
|
|
24
|
+
"@dynamic-labs/logger": "4.34.0",
|
|
25
|
+
"@dynamic-labs/message-transport": "4.34.0",
|
|
26
|
+
"@dynamic-labs/viem-extension": "4.34.0",
|
|
27
|
+
"@dynamic-labs/webview-messages": "4.34.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"viem": "^2.28.4"
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
7
|
var constants = require('@zerodev/sdk/constants');
|
|
8
|
-
var accounts = require('viem/accounts');
|
|
9
8
|
var client = require('@dynamic-labs/client');
|
|
10
9
|
var ethereumAa = require('@dynamic-labs/ethereum-aa');
|
|
11
10
|
var messageTransport = require('@dynamic-labs/message-transport');
|
|
@@ -22,7 +21,6 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
22
21
|
throw new Error('ViemExtension is required to use ZeroDevExtension');
|
|
23
22
|
}
|
|
24
23
|
const zeroDevRequestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
25
|
-
const viemRequestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
26
24
|
const createWalletClientHelper = (wallet, chainId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
27
25
|
const eoaWallet = yield client$1.wallets.accountAbstraction.getEOAWallet({
|
|
28
26
|
wallet,
|
|
@@ -31,35 +29,18 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
31
29
|
throw new Error('EOA wallet not found');
|
|
32
30
|
}
|
|
33
31
|
return client$1.viem.createWalletClient({
|
|
34
|
-
account: accounts.toAccount({
|
|
35
|
-
address: eoaWallet.address,
|
|
36
|
-
signAuthorization: (parameters) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
-
var _a;
|
|
38
|
-
const result = yield viemRequestChannel.request('viem_signAuthorization', eoaWallet.id, parameters);
|
|
39
|
-
return Object.assign(Object.assign({}, result), { yParity: (_a = result.yParity) !== null && _a !== void 0 ? _a : 0 });
|
|
40
|
-
}),
|
|
41
|
-
signMessage: (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ message }) {
|
|
42
|
-
return viemRequestChannel.request('viem_signMessage', eoaWallet.id, message);
|
|
43
|
-
}),
|
|
44
|
-
signTransaction: (transaction) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
-
return viemRequestChannel.request('viem_signTransaction', eoaWallet.id, transaction);
|
|
46
|
-
}),
|
|
47
|
-
signTypedData: (typedData) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
-
return viemRequestChannel.request('viem_signTypedData', eoaWallet.id, typedData);
|
|
49
|
-
}),
|
|
50
|
-
}),
|
|
51
32
|
chain: chainId ? getChainById.getChainById(chainId) : undefined,
|
|
52
33
|
wallet: eoaWallet,
|
|
53
34
|
});
|
|
54
35
|
});
|
|
55
36
|
return {
|
|
56
37
|
zeroDev: {
|
|
57
|
-
createKernelClient: (
|
|
58
|
-
var
|
|
38
|
+
createKernelClient: (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ wallet, chainId, bundlerProvider, bundlerRpc, paymasterRpc, paymaster, }) {
|
|
39
|
+
var _b, _c, _d;
|
|
59
40
|
try {
|
|
60
41
|
const walletClient = yield createWalletClientHelper(wallet, chainId);
|
|
61
42
|
const accountSettings = yield zeroDevRequestChannel.request('getKernelAccountSettings', { chainId, wallet });
|
|
62
|
-
const zerodevWalletProperties = (
|
|
43
|
+
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;
|
|
63
44
|
const walletEntryPoint = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.entryPointVersion)
|
|
64
45
|
? ethereumAa.getEntryPoint(zerodevWalletProperties.entryPointVersion)
|
|
65
46
|
: undefined;
|
|
@@ -87,14 +68,14 @@ const ZeroDevExtension = () => (client$1, core) => {
|
|
|
87
68
|
if (accountSettings.enableEIP7702) {
|
|
88
69
|
return ethereumAa.createEcdsaKernelAccountClientWith7702(Object.assign(Object.assign({}, params), { kernelVersion: constants.KERNEL_V3_3 }));
|
|
89
70
|
}
|
|
90
|
-
return ethereumAa.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: ethereumAa.getEcdsaValidator((
|
|
71
|
+
return ethereumAa.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: ethereumAa.getEcdsaValidator((_d = accountSettings.ecdsaProviderType) !== null && _d !== void 0 ? _d : undefined) }));
|
|
91
72
|
}
|
|
92
73
|
catch (error) {
|
|
93
74
|
logger.logger.error(error);
|
|
94
75
|
throw error;
|
|
95
76
|
}
|
|
96
77
|
}),
|
|
97
|
-
createWalletClient: (
|
|
78
|
+
createWalletClient: (_e) => _tslib.__awaiter(void 0, [_e], void 0, function* ({ wallet, chainId }) {
|
|
98
79
|
try {
|
|
99
80
|
return yield createWalletClientHelper(wallet, chainId);
|
|
100
81
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { KERNEL_V3_3 } from '@zerodev/sdk/constants';
|
|
4
|
-
import { toAccount } from 'viem/accounts';
|
|
5
4
|
import { hasExtension, baseClientExtensionName } from '@dynamic-labs/client';
|
|
6
5
|
import { getEntryPoint, getKernelVersion, PaymasterTypeEnum, createEcdsaKernelAccountClientWith7702, createEcdsaKernelAccountClient, getEcdsaValidator } from '@dynamic-labs/ethereum-aa';
|
|
7
6
|
import { createRequestChannel } from '@dynamic-labs/message-transport';
|
|
@@ -18,7 +17,6 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
18
17
|
throw new Error('ViemExtension is required to use ZeroDevExtension');
|
|
19
18
|
}
|
|
20
19
|
const zeroDevRequestChannel = createRequestChannel(core.messageTransport);
|
|
21
|
-
const viemRequestChannel = createRequestChannel(core.messageTransport);
|
|
22
20
|
const createWalletClientHelper = (wallet, chainId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
21
|
const eoaWallet = yield client.wallets.accountAbstraction.getEOAWallet({
|
|
24
22
|
wallet,
|
|
@@ -27,35 +25,18 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
27
25
|
throw new Error('EOA wallet not found');
|
|
28
26
|
}
|
|
29
27
|
return client.viem.createWalletClient({
|
|
30
|
-
account: toAccount({
|
|
31
|
-
address: eoaWallet.address,
|
|
32
|
-
signAuthorization: (parameters) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
-
var _a;
|
|
34
|
-
const result = yield viemRequestChannel.request('viem_signAuthorization', eoaWallet.id, parameters);
|
|
35
|
-
return Object.assign(Object.assign({}, result), { yParity: (_a = result.yParity) !== null && _a !== void 0 ? _a : 0 });
|
|
36
|
-
}),
|
|
37
|
-
signMessage: (_b) => __awaiter(void 0, [_b], void 0, function* ({ message }) {
|
|
38
|
-
return viemRequestChannel.request('viem_signMessage', eoaWallet.id, message);
|
|
39
|
-
}),
|
|
40
|
-
signTransaction: (transaction) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
-
return viemRequestChannel.request('viem_signTransaction', eoaWallet.id, transaction);
|
|
42
|
-
}),
|
|
43
|
-
signTypedData: (typedData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
-
return viemRequestChannel.request('viem_signTypedData', eoaWallet.id, typedData);
|
|
45
|
-
}),
|
|
46
|
-
}),
|
|
47
28
|
chain: chainId ? getChainById(chainId) : undefined,
|
|
48
29
|
wallet: eoaWallet,
|
|
49
30
|
});
|
|
50
31
|
});
|
|
51
32
|
return {
|
|
52
33
|
zeroDev: {
|
|
53
|
-
createKernelClient: (
|
|
54
|
-
var
|
|
34
|
+
createKernelClient: (_a) => __awaiter(void 0, [_a], void 0, function* ({ wallet, chainId, bundlerProvider, bundlerRpc, paymasterRpc, paymaster, }) {
|
|
35
|
+
var _b, _c, _d;
|
|
55
36
|
try {
|
|
56
37
|
const walletClient = yield createWalletClientHelper(wallet, chainId);
|
|
57
38
|
const accountSettings = yield zeroDevRequestChannel.request('getKernelAccountSettings', { chainId, wallet });
|
|
58
|
-
const zerodevWalletProperties = (
|
|
39
|
+
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;
|
|
59
40
|
const walletEntryPoint = (zerodevWalletProperties === null || zerodevWalletProperties === void 0 ? void 0 : zerodevWalletProperties.entryPointVersion)
|
|
60
41
|
? getEntryPoint(zerodevWalletProperties.entryPointVersion)
|
|
61
42
|
: undefined;
|
|
@@ -83,14 +64,14 @@ const ZeroDevExtension = () => (client, core) => {
|
|
|
83
64
|
if (accountSettings.enableEIP7702) {
|
|
84
65
|
return createEcdsaKernelAccountClientWith7702(Object.assign(Object.assign({}, params), { kernelVersion: KERNEL_V3_3 }));
|
|
85
66
|
}
|
|
86
|
-
return createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator((
|
|
67
|
+
return createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator((_d = accountSettings.ecdsaProviderType) !== null && _d !== void 0 ? _d : undefined) }));
|
|
87
68
|
}
|
|
88
69
|
catch (error) {
|
|
89
70
|
logger.error(error);
|
|
90
71
|
throw error;
|
|
91
72
|
}
|
|
92
73
|
}),
|
|
93
|
-
createWalletClient: (
|
|
74
|
+
createWalletClient: (_e) => __awaiter(void 0, [_e], void 0, function* ({ wallet, chainId }) {
|
|
94
75
|
try {
|
|
95
76
|
return yield createWalletClientHelper(wallet, chainId);
|
|
96
77
|
}
|