@dynamic-labs/ethereum-aa 4.14.0 → 4.15.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 +22 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/ZeroDevConnector.cjs +7 -6
- package/src/ZeroDevConnector.js +8 -7
- package/src/utils/index.d.ts +1 -0
- package/src/utils/isEVMAuthorizationCapable.cjs +8 -0
- package/src/utils/isEVMAuthorizationCapable.d.ts +6 -0
- package/src/utils/isEVMAuthorizationCapable.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.15.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.14.0...v4.15.0) (2025-04-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add end session override for waas sui connector ([#8602](https://github.com/dynamic-labs/dynamic-auth/issues/8602)) ([6c9e6fd](https://github.com/dynamic-labs/dynamic-auth/commit/6c9e6fda4581a4e3b9e1544f22d6e5f03723d928))
|
|
8
|
+
* add presets and demo fixes ([#8609](https://github.com/dynamic-labs/dynamic-auth/issues/8609)) ([2201914](https://github.com/dynamic-labs/dynamic-auth/commit/2201914d2029ff0b67dfc2c6e696f728f32f57b3))
|
|
9
|
+
* add ShareConfig component with modal and styling ([74aff97](https://github.com/dynamic-labs/dynamic-auth/commit/74aff97689c9e7c9abc892c1deac4d748b498909))
|
|
10
|
+
* add wallet actions section and update UI components ([#8598](https://github.com/dynamic-labs/dynamic-auth/issues/8598)) ([d6170b7](https://github.com/dynamic-labs/dynamic-auth/commit/d6170b7f6abd963e6a081541e2c674b7141f1c15))
|
|
11
|
+
* dynamic waas to sign 7702 authorization ([#8603](https://github.com/dynamic-labs/dynamic-auth/issues/8603)) ([74e1722](https://github.com/dynamic-labs/dynamic-auth/commit/74e1722f417aab621f4062093e109dc45cf542ea))
|
|
12
|
+
* add signMessage feature to global wallet client ([#8563](https://github.com/dynamic-labs/dynamic-auth/issues/8563)) ([c3f9734](https://github.com/dynamic-labs/dynamic-auth/commit/c3f9734c097f5c9b88c35e0f642632f261e40fe7))
|
|
13
|
+
* allow displaying custom links in the global wallet profile dropdown menu ([#8617](https://github.com/dynamic-labs/dynamic-auth/issues/8617)) ([5fb956c](https://github.com/dynamic-labs/dynamic-auth/commit/5fb956c0c2b681fece56104b330a0e90fc8fb936))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add default base api url for dynamic waas config on connector initialization ([#8604](https://github.com/dynamic-labs/dynamic-auth/issues/8604)) ([6218a7e](https://github.com/dynamic-labs/dynamic-auth/commit/6218a7edda4feb9028be548acfe8eff64578f0a0))
|
|
19
|
+
* enables caching for sprite.svg ([#8610](https://github.com/dynamic-labs/dynamic-auth/issues/8610)) ([decdb69](https://github.com/dynamic-labs/dynamic-auth/commit/decdb69b4df8bc2d97ee579fa423e9682ab1720b))
|
|
20
|
+
* change mobile experience to redirect ([#8003](https://github.com/dynamic-labs/dynamic-auth/issues/8003)) ([2e8a1d8](https://github.com/dynamic-labs/dynamic-auth/commit/2e8a1d8b54f54386e1abc9f4e6e5e9acf859e5fa))
|
|
21
|
+
* optimize wallet finder when performing eth and sol operations in global wallet popup ([#8564](https://github.com/dynamic-labs/dynamic-auth/issues/8564)) ([2eaf424](https://github.com/dynamic-labs/dynamic-auth/commit/2eaf4244d4aa1b1cc5c6e32574db10ab34f8ed80))
|
|
22
|
+
* loading state for v3 connect-only embedded wallet generation ([#8600](https://github.com/dynamic-labs/dynamic-auth/issues/8600)) ([af34d16](https://github.com/dynamic-labs/dynamic-auth/commit/af34d168a765aa82867116541e73c59672ab2341))
|
|
23
|
+
|
|
2
24
|
## [4.14.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.13.0...v4.14.0) (2025-04-25)
|
|
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/ethereum-aa",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
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",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.660",
|
|
22
22
|
"@zerodev/ecdsa-validator": "5.4.4",
|
|
23
23
|
"@zerodev/multi-chain-ecdsa-validator": "5.4.3",
|
|
24
24
|
"@zerodev/sdk": "5.4.26",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
26
|
-
"@dynamic-labs/ethereum-aa-core": "4.
|
|
27
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
28
|
-
"@dynamic-labs/logger": "4.
|
|
29
|
-
"@dynamic-labs/types": "4.
|
|
30
|
-
"@dynamic-labs/utils": "4.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.15.0",
|
|
26
|
+
"@dynamic-labs/ethereum-aa-core": "4.15.0",
|
|
27
|
+
"@dynamic-labs/ethereum-core": "4.15.0",
|
|
28
|
+
"@dynamic-labs/logger": "4.15.0",
|
|
29
|
+
"@dynamic-labs/types": "4.15.0",
|
|
30
|
+
"@dynamic-labs/utils": "4.15.0",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.15.0",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.15.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.21.60"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -17,6 +17,7 @@ var createEcdsaKernelAccountClient = require('./utils/createEcdsaKernelAccountCl
|
|
|
17
17
|
var getEcdsaValidator = require('./utils/getEcdsaValidator.cjs');
|
|
18
18
|
var getEntryPoint = require('./utils/getEntryPoint.cjs');
|
|
19
19
|
var getKernelVersion = require('./utils/getKernelVersion.cjs');
|
|
20
|
+
var isEVMAuthorizationCapable = require('./utils/isEVMAuthorizationCapable.cjs');
|
|
20
21
|
|
|
21
22
|
class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
22
23
|
constructor(opts) {
|
|
@@ -159,11 +160,11 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
159
160
|
}
|
|
160
161
|
getOrCreateAuthorization() {
|
|
161
162
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
var _a
|
|
163
|
+
var _a;
|
|
163
164
|
if (!this.eoaConnector)
|
|
164
165
|
throw new utils.DynamicError('No EOA connector');
|
|
165
|
-
if (!
|
|
166
|
-
throw new utils.DynamicError('
|
|
166
|
+
if (!isEVMAuthorizationCapable.isEVMAuthorizationCapable(this.eoaConnector)) {
|
|
167
|
+
throw new utils.DynamicError('Connector does not support EVM authorization');
|
|
167
168
|
}
|
|
168
169
|
const ZERODEV_AUTHORIZATION = 'zerodev_authorization';
|
|
169
170
|
try {
|
|
@@ -172,10 +173,10 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
172
173
|
return storedAuthorization;
|
|
173
174
|
}
|
|
174
175
|
const kernelVersion = constants$1.KERNEL_V3_3_BETA;
|
|
175
|
-
const authorization = yield
|
|
176
|
-
contractAddress: (
|
|
176
|
+
const authorization = yield this.eoaConnector.experimental_signAuthorization({
|
|
177
|
+
contractAddress: (_a = ZeroDevConnector.kernelDelegationAddress) !== null && _a !== void 0 ? _a : constants$1.KernelVersionToAddressesMap[kernelVersion]
|
|
177
178
|
.accountImplementationAddress,
|
|
178
|
-
})
|
|
179
|
+
});
|
|
179
180
|
if (authorization) {
|
|
180
181
|
const serializedAuth = Object.entries(authorization).reduce((acc, [key, value]) => {
|
|
181
182
|
acc[key] = typeof value === 'bigint' ? value.toString() : value;
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -4,7 +4,7 @@ import { publicActions, custom, createWalletClient, toHex, formatEther } from 'v
|
|
|
4
4
|
import { toAccount } from 'viem/accounts';
|
|
5
5
|
import { KERNEL_V3_3_BETA, KernelVersionToAddressesMap, getEntryPoint as getEntryPoint$1 } from '@zerodev/sdk/constants';
|
|
6
6
|
import { EthereumWallet, isEthWalletConnector, chainsMap, confirmationTransport, unFormatTransaction } from '@dynamic-labs/ethereum-core';
|
|
7
|
-
import { eventListenerHandlers
|
|
7
|
+
import { eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import { parseEvmNetworks, StorageService, DynamicError, DeferredPromise, parseChainId, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError, InsufficientFundsError } from '@dynamic-labs/utils';
|
|
9
9
|
import { AccountAbstractionBaseConnector } from '@dynamic-labs/ethereum-aa-core';
|
|
10
10
|
import { ZERO_DEV_LAST_USED_CHAIN_ID_KEY } from './constants.js';
|
|
@@ -13,6 +13,7 @@ import { createEcdsaKernelAccountClientWith7702, createEcdsaKernelAccountClient
|
|
|
13
13
|
import { getEcdsaValidator } from './utils/getEcdsaValidator.js';
|
|
14
14
|
import { getEntryPoint } from './utils/getEntryPoint.js';
|
|
15
15
|
import { getKernelVersion } from './utils/getKernelVersion.js';
|
|
16
|
+
import { isEVMAuthorizationCapable } from './utils/isEVMAuthorizationCapable.js';
|
|
16
17
|
|
|
17
18
|
class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
18
19
|
constructor(opts) {
|
|
@@ -155,11 +156,11 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
155
156
|
}
|
|
156
157
|
getOrCreateAuthorization() {
|
|
157
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
var _a
|
|
159
|
+
var _a;
|
|
159
160
|
if (!this.eoaConnector)
|
|
160
161
|
throw new DynamicError('No EOA connector');
|
|
161
|
-
if (!
|
|
162
|
-
throw new DynamicError('
|
|
162
|
+
if (!isEVMAuthorizationCapable(this.eoaConnector)) {
|
|
163
|
+
throw new DynamicError('Connector does not support EVM authorization');
|
|
163
164
|
}
|
|
164
165
|
const ZERODEV_AUTHORIZATION = 'zerodev_authorization';
|
|
165
166
|
try {
|
|
@@ -168,10 +169,10 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
168
169
|
return storedAuthorization;
|
|
169
170
|
}
|
|
170
171
|
const kernelVersion = KERNEL_V3_3_BETA;
|
|
171
|
-
const authorization = yield
|
|
172
|
-
contractAddress: (
|
|
172
|
+
const authorization = yield this.eoaConnector.experimental_signAuthorization({
|
|
173
|
+
contractAddress: (_a = ZeroDevConnector.kernelDelegationAddress) !== null && _a !== void 0 ? _a : KernelVersionToAddressesMap[kernelVersion]
|
|
173
174
|
.accountImplementationAddress,
|
|
174
|
-
})
|
|
175
|
+
});
|
|
175
176
|
if (authorization) {
|
|
176
177
|
const serializedAuth = Object.entries(authorization).reduce((acc, [key, value]) => {
|
|
177
178
|
acc[key] = typeof value === 'bigint' ? value.toString() : value;
|
package/src/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InternalWalletConnector, EVMAuthorizationParameters, EVMAuthorizationResult } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
type EVMAuthorizationCapableConnector = InternalWalletConnector & {
|
|
3
|
+
experimental_signAuthorization: (params: EVMAuthorizationParameters) => Promise<EVMAuthorizationResult>;
|
|
4
|
+
};
|
|
5
|
+
export declare const isEVMAuthorizationCapable: (connector: InternalWalletConnector) => connector is EVMAuthorizationCapableConnector;
|
|
6
|
+
export {};
|