@dynamic-labs/ethereum-aa 4.9.4 → 4.9.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 +28 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/ZeroDevConnector.cjs +9 -8
- package/src/ZeroDevConnector.d.ts +3 -1
- package/src/ZeroDevConnector.js +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.9.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.5...v4.9.6) (2025-03-21)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add initial sui support ([#8317](https://github.com/dynamic-labs/dynamic-auth/issues/8317)) ([88c0234](https://github.com/dynamic-labs/dynamic-auth/commit/88c023483bad5736f38cb313b035279460f6e256))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* allow metmask sdk to retry connection ([#8322](https://github.com/dynamic-labs/dynamic-auth/issues/8322)) ([603ed99](https://github.com/dynamic-labs/dynamic-auth/commit/603ed99de3b5d90ac4f5eabcdcd3b2e90863298f))
|
|
13
|
+
* css for profile page without embedded wallets ([#8339](https://github.com/dynamic-labs/dynamic-auth/issues/8339)) ([7f696e9](https://github.com/dynamic-labs/dynamic-auth/commit/7f696e9986ddd899d140640f9af7cfd2dcd7c37a))
|
|
14
|
+
* ensure metamask connector can get display uri for multiple connections ([#8324](https://github.com/dynamic-labs/dynamic-auth/issues/8324)) ([1d95f08](https://github.com/dynamic-labs/dynamic-auth/commit/1d95f089589779e8ef078b80bd84fa0754179696))
|
|
15
|
+
* pass HttpTransportConfig to WalletClient, not just PublicClient ([#8333](https://github.com/dynamic-labs/dynamic-auth/issues/8333)) ([a0ddd10](https://github.com/dynamic-labs/dynamic-auth/commit/a0ddd10f1df57555cf0a3ed777f5d354eb140582))
|
|
16
|
+
|
|
17
|
+
### [4.9.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.4...v4.9.5) (2025-03-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add support for AA to Global Wallet ([#8294](https://github.com/dynamic-labs/dynamic-auth/issues/8294)) ([173dfb9](https://github.com/dynamic-labs/dynamic-auth/commit/173dfb9c00e4307feec6ab11913f1a80310885eb))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* Remove the usage of random uuid in Global Wallet ([#8314](https://github.com/dynamic-labs/dynamic-auth/issues/8314)) ([79a7a64](https://github.com/dynamic-labs/dynamic-auth/commit/79a7a640b9ce470051a3c877ea46e8d4c94ea542))
|
|
28
|
+
* Fix UI when token balance is 0 ([#8299](https://github.com/dynamic-labs/dynamic-auth/issues/8299)) ([e8a2eca](https://github.com/dynamic-labs/dynamic-auth/commit/e8a2eca9876d914db738557a74751537eee2e129))
|
|
29
|
+
|
|
2
30
|
### [4.9.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.3...v4.9.4) (2025-03-17)
|
|
3
31
|
|
|
4
32
|
|
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.9.
|
|
3
|
+
"version": "4.9.6",
|
|
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,17 +18,17 @@
|
|
|
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.644",
|
|
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.9.
|
|
26
|
-
"@dynamic-labs/ethereum-core": "4.9.
|
|
27
|
-
"@dynamic-labs/logger": "4.9.
|
|
28
|
-
"@dynamic-labs/types": "4.9.
|
|
29
|
-
"@dynamic-labs/utils": "4.9.
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.9.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.9.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.9.6",
|
|
26
|
+
"@dynamic-labs/ethereum-core": "4.9.6",
|
|
27
|
+
"@dynamic-labs/logger": "4.9.6",
|
|
28
|
+
"@dynamic-labs/types": "4.9.6",
|
|
29
|
+
"@dynamic-labs/utils": "4.9.6",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.9.6",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.9.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"viem": "^2.21.55"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -19,7 +19,7 @@ var getKernelVersion = require('./utils/getKernelVersion.cjs');
|
|
|
19
19
|
|
|
20
20
|
class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
21
21
|
constructor(opts) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
23
23
|
super(opts);
|
|
24
24
|
// provider map maintains the kernel clients per chain
|
|
25
25
|
this.providerMap = {};
|
|
@@ -41,14 +41,15 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
41
41
|
name: 'ZeroDev',
|
|
42
42
|
};
|
|
43
43
|
this._walletUiUtils = opts.walletUiUtils;
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
44
|
+
this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
|
|
45
|
+
this.enableEIP7702Mode = (_c = (_b = opts.apiProviders.zerodev) === null || _b === void 0 ? void 0 : _b.enableEIP7702) !== null && _c !== void 0 ? _c : false;
|
|
46
|
+
this.entryPoint = getEntryPoint.getEntryPoint((_d = opts.apiProviders.zerodev) === null || _d === void 0 ? void 0 : _d.entryPointVersion);
|
|
47
|
+
this.kernelVersion = getKernelVersion.getKernelVersion((_e = opts.apiProviders.zerodev) === null || _e === void 0 ? void 0 : _e.kernelVersion, this.entryPoint);
|
|
47
48
|
this.enableKernelV3Migration =
|
|
48
|
-
(
|
|
49
|
+
(_g = (_f = opts.apiProviders.zerodev) === null || _f === void 0 ? void 0 : _f.enableKernelV3Migration) !== null && _g !== void 0 ? _g : false;
|
|
49
50
|
// this is the list of providers from the api that are used for multi-chain account abstraction
|
|
50
51
|
this.providersFromApi =
|
|
51
|
-
((
|
|
52
|
+
((_h = opts.apiProviders.zerodev) === null || _h === void 0 ? void 0 : _h.multichainAccountAbstractionProviders) || [];
|
|
52
53
|
const enabledZerodevNetworks = this.providersFromApi.map((provider) => provider.chain);
|
|
53
54
|
this.evmNetworks = utils.parseEvmNetworks(opts.evmNetworks).filter((network) => enabledZerodevNetworks.includes(network.chainId.toString()));
|
|
54
55
|
const [defaultProvider] = this.providersFromApi;
|
|
@@ -57,7 +58,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
57
58
|
throw new Error('Missing ZeroDev project ID provided. Add your ZeroDev project id to your project configuration via the Dynamic Labs dashboard.');
|
|
58
59
|
}
|
|
59
60
|
this.defaultChainId = defaultProvider === null || defaultProvider === void 0 ? void 0 : defaultProvider.chain;
|
|
60
|
-
this.ecdsaProviderType = (
|
|
61
|
+
this.ecdsaProviderType = (_j = opts.apiProviders.zerodev) === null || _j === void 0 ? void 0 : _j.ecdsaProviderType;
|
|
61
62
|
}
|
|
62
63
|
get currentNetworkProvider() {
|
|
63
64
|
// check if the last used chain id is in the provider map
|
|
@@ -398,7 +399,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
398
399
|
});
|
|
399
400
|
}),
|
|
400
401
|
provider: provider.extend(viem.publicActions),
|
|
401
|
-
transport: viem.custom(provider),
|
|
402
|
+
transport: viem.custom(provider, this.providersConfig.httpTransportConfig),
|
|
402
403
|
// TODO: remove this. We should not be passing references to wallet connectors
|
|
403
404
|
walletConnector: this,
|
|
404
405
|
walletUiUtils: this._walletUiUtils,
|
|
@@ -4,7 +4,7 @@ import { Account, Client, PublicClient, RpcSchema, Transport, WalletClient } fro
|
|
|
4
4
|
import { SignAuthorizationReturnType } from 'viem/accounts';
|
|
5
5
|
import { type Chain as ViemChain } from 'viem/chains';
|
|
6
6
|
import { EntryPointType, KERNEL_VERSION_TYPE } from '@zerodev/sdk/types';
|
|
7
|
-
import { EthereumWallet } from '@dynamic-labs/ethereum-core';
|
|
7
|
+
import { EthereumWallet, RegisterEvmProvidersConfig } from '@dynamic-labs/ethereum-core';
|
|
8
8
|
import { EcdsaValidatorOptions, Provider, ProviderEntryPointVersionEnum, ProviderEnum, ProviderKernelVersionEnum, ProviderMultichainAccountAbstractionProviders } from '@dynamic-labs/sdk-api-core';
|
|
9
9
|
import { Chain, IZeroDevConnector, InternalWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
10
10
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
@@ -20,6 +20,7 @@ type ZeroDevConnectorProps = {
|
|
|
20
20
|
bundlerProvider: BundlerProvider | undefined;
|
|
21
21
|
enableEIP7702?: boolean;
|
|
22
22
|
authorization?: SignAuthorizationReturnType;
|
|
23
|
+
providersConfig?: RegisterEvmProvidersConfig;
|
|
23
24
|
};
|
|
24
25
|
type KernelClient = KernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>;
|
|
25
26
|
export declare class ZeroDevConnector extends WalletConnectorBase<typeof EthereumWallet> implements IZeroDevConnector {
|
|
@@ -32,6 +33,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
|
|
|
32
33
|
connectedChain: Chain;
|
|
33
34
|
supportedChains: Chain[];
|
|
34
35
|
evmNetworks: EvmNetwork[];
|
|
36
|
+
providersConfig: RegisterEvmProvidersConfig;
|
|
35
37
|
private isGasSponsorshipDisabled;
|
|
36
38
|
isEmbeddedWallet: boolean;
|
|
37
39
|
entryPoint: EntryPointType<EntryPointVersion>;
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -15,7 +15,7 @@ import { getKernelVersion } from './utils/getKernelVersion.js';
|
|
|
15
15
|
|
|
16
16
|
class ZeroDevConnector extends WalletConnectorBase {
|
|
17
17
|
constructor(opts) {
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
19
19
|
super(opts);
|
|
20
20
|
// provider map maintains the kernel clients per chain
|
|
21
21
|
this.providerMap = {};
|
|
@@ -37,14 +37,15 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
37
37
|
name: 'ZeroDev',
|
|
38
38
|
};
|
|
39
39
|
this._walletUiUtils = opts.walletUiUtils;
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
40
|
+
this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
|
|
41
|
+
this.enableEIP7702Mode = (_c = (_b = opts.apiProviders.zerodev) === null || _b === void 0 ? void 0 : _b.enableEIP7702) !== null && _c !== void 0 ? _c : false;
|
|
42
|
+
this.entryPoint = getEntryPoint((_d = opts.apiProviders.zerodev) === null || _d === void 0 ? void 0 : _d.entryPointVersion);
|
|
43
|
+
this.kernelVersion = getKernelVersion((_e = opts.apiProviders.zerodev) === null || _e === void 0 ? void 0 : _e.kernelVersion, this.entryPoint);
|
|
43
44
|
this.enableKernelV3Migration =
|
|
44
|
-
(
|
|
45
|
+
(_g = (_f = opts.apiProviders.zerodev) === null || _f === void 0 ? void 0 : _f.enableKernelV3Migration) !== null && _g !== void 0 ? _g : false;
|
|
45
46
|
// this is the list of providers from the api that are used for multi-chain account abstraction
|
|
46
47
|
this.providersFromApi =
|
|
47
|
-
((
|
|
48
|
+
((_h = opts.apiProviders.zerodev) === null || _h === void 0 ? void 0 : _h.multichainAccountAbstractionProviders) || [];
|
|
48
49
|
const enabledZerodevNetworks = this.providersFromApi.map((provider) => provider.chain);
|
|
49
50
|
this.evmNetworks = parseEvmNetworks(opts.evmNetworks).filter((network) => enabledZerodevNetworks.includes(network.chainId.toString()));
|
|
50
51
|
const [defaultProvider] = this.providersFromApi;
|
|
@@ -53,7 +54,7 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
53
54
|
throw new Error('Missing ZeroDev project ID provided. Add your ZeroDev project id to your project configuration via the Dynamic Labs dashboard.');
|
|
54
55
|
}
|
|
55
56
|
this.defaultChainId = defaultProvider === null || defaultProvider === void 0 ? void 0 : defaultProvider.chain;
|
|
56
|
-
this.ecdsaProviderType = (
|
|
57
|
+
this.ecdsaProviderType = (_j = opts.apiProviders.zerodev) === null || _j === void 0 ? void 0 : _j.ecdsaProviderType;
|
|
57
58
|
}
|
|
58
59
|
get currentNetworkProvider() {
|
|
59
60
|
// check if the last used chain id is in the provider map
|
|
@@ -394,7 +395,7 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
394
395
|
});
|
|
395
396
|
}),
|
|
396
397
|
provider: provider.extend(publicActions),
|
|
397
|
-
transport: custom(provider),
|
|
398
|
+
transport: custom(provider, this.providersConfig.httpTransportConfig),
|
|
398
399
|
// TODO: remove this. We should not be passing references to wallet connectors
|
|
399
400
|
walletConnector: this,
|
|
400
401
|
walletUiUtils: this._walletUiUtils,
|