@dynamic-labs/ethereum-aa 2.0.0-alpha.30 → 2.0.0-alpha.32
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 +15 -0
- package/package.json +10 -9
- package/src/ZeroDevConnector.cjs +10 -0
- package/src/ZeroDevConnector.js +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
|
|
3
|
+
|
|
4
|
+
## [2.0.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-04-11)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* support adding email for recovery to existing embedded wallet ([#5128](https://github.com/dynamic-labs/DynamicAuth/issues/5128)) ([477fd81](https://github.com/dynamic-labs/DynamicAuth/commit/477fd81ac00864284d9d2183c0b8c078a0a23a2b))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* issue where customer also tries to use i18n.init ([#5267](https://github.com/dynamic-labs/DynamicAuth/issues/5267)) ([7f81f1e](https://github.com/dynamic-labs/DynamicAuth/commit/7f81f1e010fbc6408f6a5d6a37608235e947befa))
|
|
15
|
+
* smart wallet not loading correctly upon refresh when using non-embedded eoa wallet ([#5301](https://github.com/dynamic-labs/DynamicAuth/issues/5301)) ([e957317](https://github.com/dynamic-labs/DynamicAuth/commit/e9573173f6209773a0be5f4af37323f2be8d7906))
|
|
16
|
+
|
|
2
17
|
## [2.0.0-alpha.30](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2024-04-11)
|
|
3
18
|
|
|
4
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.32",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,17 +26,18 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
30
|
-
"@dynamic-labs/
|
|
31
|
-
"@dynamic-labs/
|
|
32
|
-
"@dynamic-labs/
|
|
33
|
-
"@dynamic-labs/
|
|
34
|
-
"@dynamic-labs/
|
|
35
|
-
"@dynamic-labs/wallet-
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.418",
|
|
30
|
+
"@dynamic-labs/ethereum": "2.0.0-alpha.32",
|
|
31
|
+
"@dynamic-labs/logger": "2.0.0-alpha.32",
|
|
32
|
+
"@dynamic-labs/types": "2.0.0-alpha.32",
|
|
33
|
+
"@dynamic-labs/utils": "2.0.0-alpha.32",
|
|
34
|
+
"@dynamic-labs/viem-utils": "2.0.0-alpha.32",
|
|
35
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.32",
|
|
36
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.32"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@zerodev/presets": "^5.1.4",
|
|
39
|
-
"@zerodev/sdk": "^5.
|
|
40
|
+
"@zerodev/sdk": "^5.2.0",
|
|
40
41
|
"permissionless": "^0.0.34",
|
|
41
42
|
"viem": "^2.7.6"
|
|
42
43
|
}
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -9,6 +9,7 @@ var permissionless = require('permissionless');
|
|
|
9
9
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
10
10
|
var viemUtils = require('@dynamic-labs/viem-utils');
|
|
11
11
|
var utils = require('@dynamic-labs/utils');
|
|
12
|
+
var ethereum = require('@dynamic-labs/ethereum');
|
|
12
13
|
var fetchChain = require('./utils/fetchChain.cjs');
|
|
13
14
|
var logger = require('./utils/logger.cjs');
|
|
14
15
|
|
|
@@ -50,10 +51,19 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
50
51
|
}
|
|
51
52
|
setEoaConnector(connector) {
|
|
52
53
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
if (!connector) {
|
|
55
|
+
logger.logger.error('No EOA connector provided');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
53
58
|
this.kernelClientDeferredPromise = new utils.DeferredPromise();
|
|
54
59
|
this.eoaConnector = connector;
|
|
60
|
+
if (ethereum.isEthWalletConnector(this.eoaConnector) &&
|
|
61
|
+
!this.eoaConnector.getActiveAccount()) {
|
|
62
|
+
yield this.eoaConnector.getConnectedAccounts();
|
|
63
|
+
}
|
|
55
64
|
const signer = yield this.eoaConnector.getSigner();
|
|
56
65
|
if (!(signer === null || signer === void 0 ? void 0 : signer.account)) {
|
|
66
|
+
logger.logger.error('No signer account found');
|
|
57
67
|
return;
|
|
58
68
|
}
|
|
59
69
|
const kernelClient = yield presets.createEcdsaKernelAccountClient({
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -5,6 +5,7 @@ import { walletClientToSmartAccountSigner } from 'permissionless';
|
|
|
5
5
|
import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import { confirmationTransport, chainsMap, unFormatTransaction, createViemUiTransaction } from '@dynamic-labs/viem-utils';
|
|
7
7
|
import { parseEvmNetworks, DynamicError, DeferredPromise, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError, InsufficientFundsError } from '@dynamic-labs/utils';
|
|
8
|
+
import { isEthWalletConnector } from '@dynamic-labs/ethereum';
|
|
8
9
|
import { cachedChainIdKey, fetchChain } from './utils/fetchChain.js';
|
|
9
10
|
import { logger } from './utils/logger.js';
|
|
10
11
|
|
|
@@ -46,10 +47,19 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
46
47
|
}
|
|
47
48
|
setEoaConnector(connector) {
|
|
48
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
if (!connector) {
|
|
51
|
+
logger.error('No EOA connector provided');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
49
54
|
this.kernelClientDeferredPromise = new DeferredPromise();
|
|
50
55
|
this.eoaConnector = connector;
|
|
56
|
+
if (isEthWalletConnector(this.eoaConnector) &&
|
|
57
|
+
!this.eoaConnector.getActiveAccount()) {
|
|
58
|
+
yield this.eoaConnector.getConnectedAccounts();
|
|
59
|
+
}
|
|
51
60
|
const signer = yield this.eoaConnector.getSigner();
|
|
52
61
|
if (!(signer === null || signer === void 0 ? void 0 : signer.account)) {
|
|
62
|
+
logger.error('No signer account found');
|
|
53
63
|
return;
|
|
54
64
|
}
|
|
55
65
|
const kernelClient = yield createEcdsaKernelAccountClient({
|