@dynamic-labs/ethereum-aa 3.6.0 → 3.6.2

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,21 @@
1
1
 
2
+ ### [3.6.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.6.1...v3.6.2) (2024-11-13)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **client:** convert the wallet when using wallets.embedded.getWallet ([#7434](https://github.com/dynamic-labs/DynamicAuth/issues/7434)) ([4f77a2a](https://github.com/dynamic-labs/DynamicAuth/commit/4f77a2ae0eb615a3fe2281ce43bc03d3e8bdbab1))
8
+ * issue with SollanaWalletConnectorWithConfig embedded wallets ([#7406](https://github.com/dynamic-labs/DynamicAuth/issues/7406)) ([d2008f6](https://github.com/dynamic-labs/DynamicAuth/commit/d2008f6052f9b53b009ed86fad83f1278429f762))
9
+ * refresh blockhash for solana embedded and use confirmed commitment ([#7429](https://github.com/dynamic-labs/DynamicAuth/issues/7429)) ([7d1674d](https://github.com/dynamic-labs/DynamicAuth/commit/7d1674dd4a2ea6c79e7d552353f0fd1b45375e37))
10
+
11
+ ### [3.6.1](https://github.com/dynamic-labs/DynamicAuth/compare/v3.6.0...v3.6.1) (2024-11-08)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * when confirmation ui disabled for solana signall and signTransaction, it was returning a string instead of a transaction ([#7404](https://github.com/dynamic-labs/DynamicAuth/issues/7404)) ([9c17d83](https://github.com/dynamic-labs/DynamicAuth/commit/9c17d83e808f576bd319892b9726e5692534b31d))
17
+ * solana sign transaction was throwing with destination not found for embedded wallets ([#7394](https://github.com/dynamic-labs/DynamicAuth/issues/7394)) ([5bc21cd](https://github.com/dynamic-labs/DynamicAuth/commit/5bc21cdc2aee3dd70fc455e54e586d695392702b))
18
+
2
19
  ## [3.6.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.5.1...v3.6.0) (2024-11-07)
3
20
 
4
21
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.6.0";
6
+ var version = "3.6.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "3.6.0";
2
+ var version = "3.6.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "3.6.0",
3
+ "version": "3.6.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -26,18 +26,18 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.559",
29
+ "@dynamic-labs/sdk-api-core": "0.0.563",
30
30
  "@zerodev/ecdsa-validator": "5.3.1",
31
31
  "@zerodev/multi-chain-validator": "5.3.3",
32
32
  "@zerodev/sdk": "5.3.4",
33
33
  "permissionless": "^0.1.20",
34
- "@dynamic-labs/assert-package-version": "3.6.0",
35
- "@dynamic-labs/ethereum-core": "3.6.0",
36
- "@dynamic-labs/logger": "3.6.0",
37
- "@dynamic-labs/types": "3.6.0",
38
- "@dynamic-labs/utils": "3.6.0",
39
- "@dynamic-labs/wallet-book": "3.6.0",
40
- "@dynamic-labs/wallet-connector-core": "3.6.0"
34
+ "@dynamic-labs/assert-package-version": "3.6.2",
35
+ "@dynamic-labs/ethereum-core": "3.6.2",
36
+ "@dynamic-labs/logger": "3.6.2",
37
+ "@dynamic-labs/types": "3.6.2",
38
+ "@dynamic-labs/utils": "3.6.2",
39
+ "@dynamic-labs/wallet-book": "3.6.2",
40
+ "@dynamic-labs/wallet-connector-core": "3.6.2"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "viem": "^2.7.6"
@@ -118,19 +118,30 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
118
118
  });
119
119
  }
120
120
  registerEoa(_a) {
121
- return _tslib.__awaiter(this, arguments, void 0, function* ({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector = false, }) {
121
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector = false, ecdsaProviderType, kernelVersion, entryPointVersion, }) {
122
+ const properties = {
123
+ ecdsaProviderType,
124
+ entryPointVersion,
125
+ kernelVersion,
126
+ };
122
127
  this.eoaConnectorMap[smartWalletAddress] = {
123
128
  eoaAddress,
124
129
  eoaConnector,
130
+ properties,
125
131
  };
126
132
  // if this is the primary wallet, set the eoa connector and kernel clients
127
133
  if (shouldSetEoaConnector && this.eoaAddress !== eoaAddress) {
128
- yield this.setEoaConnector(eoaAddress, eoaConnector);
134
+ yield this.setEoaConnector({
135
+ connector: eoaConnector,
136
+ eoaAddress,
137
+ properties,
138
+ });
129
139
  }
130
140
  });
131
141
  }
132
- setEoaConnector(eoaAddress, connector) {
133
- return _tslib.__awaiter(this, void 0, void 0, function* () {
142
+ setEoaConnector(_a) {
143
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ eoaAddress, connector, properties, }) {
144
+ var _b;
134
145
  if (!connector) {
135
146
  logger.logger.error('No EOA connector provided');
136
147
  return;
@@ -138,6 +149,16 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
138
149
  this.kernelClientDeferredPromise = new utils.DeferredPromise();
139
150
  this.eoaConnector = connector;
140
151
  this.eoaAddress = eoaAddress;
152
+ if (properties) {
153
+ this.ecdsaProviderType =
154
+ (_b = properties.ecdsaProviderType) !== null && _b !== void 0 ? _b : this.ecdsaProviderType;
155
+ this.entryPoint = properties.entryPointVersion
156
+ ? getEntryPoint.getEntryPoint(properties.entryPointVersion)
157
+ : this.entryPoint;
158
+ this.kernelVersion = properties.entryPointVersion
159
+ ? getKernelVersion.getKernelVersion(properties.kernelVersion, this.entryPoint)
160
+ : this.kernelVersion;
161
+ }
141
162
  if (ethereumCore.isEthWalletConnector(this.eoaConnector) &&
142
163
  !this.eoaConnector.getActiveAccount()) {
143
164
  yield this.eoaConnector.getConnectedAccounts();
@@ -419,9 +440,13 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
419
440
  if (!eoa) {
420
441
  throw new utils.DynamicError('No EOA connector');
421
442
  }
422
- const { eoaAddress, eoaConnector } = eoa;
443
+ const { eoaAddress, eoaConnector, properties } = eoa;
423
444
  yield eoaConnector.validateActiveWallet(eoaAddress);
424
- yield this.setEoaConnector(eoaAddress, eoaConnector);
445
+ yield this.setEoaConnector({
446
+ connector: eoaConnector,
447
+ eoaAddress,
448
+ properties,
449
+ });
425
450
  });
426
451
  }
427
452
  }
@@ -5,7 +5,7 @@ import { type Chain as ViemChain } from 'viem/chains';
5
5
  import { EntryPoint } from 'permissionless/types';
6
6
  import { KERNEL_VERSION_TYPE } from '@zerodev/sdk/types';
7
7
  import { EthereumWallet } from '@dynamic-labs/ethereum-core';
8
- import { Provider, ProviderEnum, ProviderMultichainAccountAbstractionProviders } from '@dynamic-labs/sdk-api-core';
8
+ import { EcdsaValidatorOptions, Provider, ProviderEntryPointVersionEnum, ProviderEnum, ProviderKernelVersionEnum, ProviderMultichainAccountAbstractionProviders } from '@dynamic-labs/sdk-api-core';
9
9
  import { Chain, IAccountAbstractionWalletConnector, ISendBalanceWalletConnector, InternalWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
10
10
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
11
11
  import { EvmNetwork, GenericNetwork, IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
@@ -78,11 +78,14 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
78
78
  withSponsorship?: boolean;
79
79
  }): KernelClient | undefined;
80
80
  endSession(): Promise<void>;
81
- registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, }: {
81
+ registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, ecdsaProviderType, kernelVersion, entryPointVersion, }: {
82
82
  smartWalletAddress: string;
83
83
  eoaAddress: string;
84
84
  eoaConnector: InternalWalletConnector;
85
85
  shouldSetEoaConnector: boolean;
86
+ ecdsaProviderType?: EcdsaValidatorOptions;
87
+ kernelVersion?: ProviderKernelVersionEnum;
88
+ entryPointVersion?: ProviderEntryPointVersionEnum;
86
89
  }): Promise<void>;
87
90
  private setEoaConnector;
88
91
  private warnIfProjectChainNotEnabled;
@@ -114,19 +114,30 @@ class ZeroDevConnector extends WalletConnectorBase {
114
114
  });
115
115
  }
116
116
  registerEoa(_a) {
117
- return __awaiter(this, arguments, void 0, function* ({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector = false, }) {
117
+ return __awaiter(this, arguments, void 0, function* ({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector = false, ecdsaProviderType, kernelVersion, entryPointVersion, }) {
118
+ const properties = {
119
+ ecdsaProviderType,
120
+ entryPointVersion,
121
+ kernelVersion,
122
+ };
118
123
  this.eoaConnectorMap[smartWalletAddress] = {
119
124
  eoaAddress,
120
125
  eoaConnector,
126
+ properties,
121
127
  };
122
128
  // if this is the primary wallet, set the eoa connector and kernel clients
123
129
  if (shouldSetEoaConnector && this.eoaAddress !== eoaAddress) {
124
- yield this.setEoaConnector(eoaAddress, eoaConnector);
130
+ yield this.setEoaConnector({
131
+ connector: eoaConnector,
132
+ eoaAddress,
133
+ properties,
134
+ });
125
135
  }
126
136
  });
127
137
  }
128
- setEoaConnector(eoaAddress, connector) {
129
- return __awaiter(this, void 0, void 0, function* () {
138
+ setEoaConnector(_a) {
139
+ return __awaiter(this, arguments, void 0, function* ({ eoaAddress, connector, properties, }) {
140
+ var _b;
130
141
  if (!connector) {
131
142
  logger.error('No EOA connector provided');
132
143
  return;
@@ -134,6 +145,16 @@ class ZeroDevConnector extends WalletConnectorBase {
134
145
  this.kernelClientDeferredPromise = new DeferredPromise();
135
146
  this.eoaConnector = connector;
136
147
  this.eoaAddress = eoaAddress;
148
+ if (properties) {
149
+ this.ecdsaProviderType =
150
+ (_b = properties.ecdsaProviderType) !== null && _b !== void 0 ? _b : this.ecdsaProviderType;
151
+ this.entryPoint = properties.entryPointVersion
152
+ ? getEntryPoint(properties.entryPointVersion)
153
+ : this.entryPoint;
154
+ this.kernelVersion = properties.entryPointVersion
155
+ ? getKernelVersion(properties.kernelVersion, this.entryPoint)
156
+ : this.kernelVersion;
157
+ }
137
158
  if (isEthWalletConnector(this.eoaConnector) &&
138
159
  !this.eoaConnector.getActiveAccount()) {
139
160
  yield this.eoaConnector.getConnectedAccounts();
@@ -415,9 +436,13 @@ class ZeroDevConnector extends WalletConnectorBase {
415
436
  if (!eoa) {
416
437
  throw new DynamicError('No EOA connector');
417
438
  }
418
- const { eoaAddress, eoaConnector } = eoa;
439
+ const { eoaAddress, eoaConnector, properties } = eoa;
419
440
  yield eoaConnector.validateActiveWallet(eoaAddress);
420
- yield this.setEoaConnector(eoaAddress, eoaConnector);
441
+ yield this.setEoaConnector({
442
+ connector: eoaConnector,
443
+ eoaAddress,
444
+ properties,
445
+ });
421
446
  });
422
447
  }
423
448
  }