@dynamic-labs/ethereum-aa 4.11.2 → 4.12.1
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 +20 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -9
- package/src/AccountAbstractionConnector.cjs +29 -0
- package/src/AccountAbstractionConnector.d.ts +6 -2
- package/src/AccountAbstractionConnector.js +30 -1
- package/src/ZKsyncConnector.cjs +526 -0
- package/src/ZKsyncConnector.d.ts +17228 -0
- package/src/ZKsyncConnector.js +522 -0
- package/src/ZeroDevConnector.cjs +1 -25
- package/src/ZeroDevConnector.d.ts +2 -7662
- package/src/ZeroDevConnector.js +2 -26
- package/src/index.cjs +11 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +10 -1
- package/src/utils/abi.cjs +88 -0
- package/src/utils/abi.d.ts +102 -0
- package/src/utils/abi.js +84 -0
- package/src/utils/index.d.ts +1 -0
- package/src/utils/isZKsyncConnector.cjs +8 -0
- package/src/utils/isZKsyncConnector.d.ts +3 -0
- package/src/utils/isZKsyncConnector.js +4 -0
- package/src/utils/zksync/deployment.cjs +97 -0
- package/src/utils/zksync/deployment.d.ts +37 -0
- package/src/utils/zksync/deployment.js +91 -0
- package/src/utils/zksync/getSalt.cjs +10 -0
- package/src/utils/zksync/getSalt.d.ts +1 -0
- package/src/utils/zksync/getSalt.js +6 -0
- package/src/utils/zksync/index.d.ts +4 -0
- package/src/utils/zksync/network.cjs +17 -0
- package/src/utils/zksync/network.d.ts +2 -0
- package/src/utils/zksync/network.js +13 -0
- package/src/utils/zksync/passkeys.cjs +41 -0
- package/src/utils/zksync/passkeys.d.ts +9 -0
- package/src/utils/zksync/passkeys.js +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.12.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.0...v4.12.1) (2025-04-15)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add dedicated sui wallet client for waas to override transactions ([#8539](https://github.com/dynamic-labs/dynamic-auth/issues/8539)) ([b37b336](https://github.com/dynamic-labs/dynamic-auth/commit/b37b336060dbfd2ad621c86ae78bd07d44a5fe1e))
|
|
8
|
+
|
|
9
|
+
## [4.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.11.2...v4.12.0) (2025-04-14)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add sui sign transaction to waas-sui connector ([#8528](https://github.com/dynamic-labs/dynamic-auth/issues/8528)) ([7dfd806](https://github.com/dynamic-labs/dynamic-auth/commit/7dfd8063ac92d2ec6eb2de71a3ed2946a9f89fe3))
|
|
15
|
+
* implement zksync account abstraction connector ([#8318](https://github.com/dynamic-labs/dynamic-auth/issues/8318)) ([e80b42f](https://github.com/dynamic-labs/dynamic-auth/commit/e80b42f9067450348b0ff02c5b682653353cdcb9))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* only define primary wallet when it is done verifying ([#8521](https://github.com/dynamic-labs/dynamic-auth/issues/8521)) ([34f6058](https://github.com/dynamic-labs/dynamic-auth/commit/34f605817c91cc1b131b4de876609e231703f8b4))
|
|
21
|
+
|
|
2
22
|
### [4.11.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.11.1...v4.11.2) (2025-04-11)
|
|
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/ethereum-aa",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.1",
|
|
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,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.658",
|
|
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
|
-
"
|
|
26
|
-
"@dynamic-labs/
|
|
27
|
-
"@dynamic-labs/
|
|
28
|
-
"@dynamic-labs/
|
|
29
|
-
"@dynamic-labs/
|
|
30
|
-
"@dynamic-labs/
|
|
31
|
-
"@dynamic-labs/wallet-
|
|
25
|
+
"zksync-sso": "0.0.0-beta.14",
|
|
26
|
+
"@dynamic-labs/assert-package-version": "4.12.1",
|
|
27
|
+
"@dynamic-labs/ethereum-core": "4.12.1",
|
|
28
|
+
"@dynamic-labs/logger": "4.12.1",
|
|
29
|
+
"@dynamic-labs/types": "4.12.1",
|
|
30
|
+
"@dynamic-labs/utils": "4.12.1",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.12.1",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.12.1"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"viem": "^2.21.55"
|
|
@@ -46,6 +46,14 @@ class AccountAbstractionConnector extends walletConnectorCore.WalletConnectorBas
|
|
|
46
46
|
getEnabledNetworks() {
|
|
47
47
|
return this.evmNetworks;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Gets the signer for the current wallet
|
|
51
|
+
*/
|
|
52
|
+
getSigner() {
|
|
53
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return this.getWalletClient();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
49
57
|
/**
|
|
50
58
|
* Gets the balance for an address
|
|
51
59
|
*/
|
|
@@ -70,6 +78,27 @@ class AccountAbstractionConnector extends walletConnectorCore.WalletConnectorBas
|
|
|
70
78
|
}
|
|
71
79
|
});
|
|
72
80
|
}
|
|
81
|
+
createUiTransaction(from) {
|
|
82
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
yield this.validateActiveWallet(from);
|
|
84
|
+
const walletClient = this.getWalletClient();
|
|
85
|
+
const publicClient = yield this.getPublicClient();
|
|
86
|
+
if (!publicClient || !walletClient) {
|
|
87
|
+
throw new utils.DynamicError('No public client available');
|
|
88
|
+
}
|
|
89
|
+
return ethereumCore.createViemUiTransaction({
|
|
90
|
+
from,
|
|
91
|
+
publicClient: publicClient,
|
|
92
|
+
walletClient: walletClient,
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getBlockExplorerUrlsForCurrentNetwork() {
|
|
97
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
return (_b = (_a = this.eoaConnector) === null || _a === void 0 ? void 0 : _a.getBlockExplorerUrlsForCurrentNetwork()) !== null && _b !== void 0 ? _b : [];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
73
102
|
}
|
|
74
103
|
|
|
75
104
|
exports.AccountAbstractionConnector = AccountAbstractionConnector;
|
|
@@ -9,7 +9,6 @@ export type AccountAbstractionConnectorProps = {
|
|
|
9
9
|
evmNetworks: GenericNetwork[];
|
|
10
10
|
};
|
|
11
11
|
export declare abstract class AccountAbstractionConnector extends WalletConnectorBase<typeof EthereumWallet> {
|
|
12
|
-
abstract clientId: string;
|
|
13
12
|
abstract eoaConnector: InternalWalletConnector | undefined;
|
|
14
13
|
abstract eoaAddress: string | undefined;
|
|
15
14
|
protected _walletUiUtils: WalletUiUtils<InternalWalletConnector>;
|
|
@@ -37,6 +36,10 @@ export declare abstract class AccountAbstractionConnector extends WalletConnecto
|
|
|
37
36
|
* Gets the enabled networks
|
|
38
37
|
*/
|
|
39
38
|
getEnabledNetworks(): GenericNetwork[];
|
|
39
|
+
/**
|
|
40
|
+
* Gets the signer for the current wallet
|
|
41
|
+
*/
|
|
42
|
+
getSigner(): Promise<unknown>;
|
|
40
43
|
/**
|
|
41
44
|
* Gets the balance for an address
|
|
42
45
|
*/
|
|
@@ -51,7 +54,8 @@ export declare abstract class AccountAbstractionConnector extends WalletConnecto
|
|
|
51
54
|
value?: bigint;
|
|
52
55
|
data?: string;
|
|
53
56
|
}): Promise<boolean>;
|
|
54
|
-
|
|
57
|
+
createUiTransaction(from: string): Promise<IUITransaction>;
|
|
58
|
+
getBlockExplorerUrlsForCurrentNetwork(): Promise<string[]>;
|
|
55
59
|
abstract getAccountAbstractionProvider<T>({ withSponsorship, }: {
|
|
56
60
|
withSponsorship: boolean;
|
|
57
61
|
}): Promise<T>;
|
|
@@ -3,7 +3,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
|
|
|
3
3
|
import { formatEther } from 'viem';
|
|
4
4
|
import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
-
import { EthereumWallet } from '@dynamic-labs/ethereum-core';
|
|
6
|
+
import { EthereumWallet, createViemUiTransaction } from '@dynamic-labs/ethereum-core';
|
|
7
7
|
|
|
8
8
|
class AccountAbstractionConnector extends WalletConnectorBase {
|
|
9
9
|
constructor(opts) {
|
|
@@ -42,6 +42,14 @@ class AccountAbstractionConnector extends WalletConnectorBase {
|
|
|
42
42
|
getEnabledNetworks() {
|
|
43
43
|
return this.evmNetworks;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Gets the signer for the current wallet
|
|
47
|
+
*/
|
|
48
|
+
getSigner() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return this.getWalletClient();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
45
53
|
/**
|
|
46
54
|
* Gets the balance for an address
|
|
47
55
|
*/
|
|
@@ -66,6 +74,27 @@ class AccountAbstractionConnector extends WalletConnectorBase {
|
|
|
66
74
|
}
|
|
67
75
|
});
|
|
68
76
|
}
|
|
77
|
+
createUiTransaction(from) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
yield this.validateActiveWallet(from);
|
|
80
|
+
const walletClient = this.getWalletClient();
|
|
81
|
+
const publicClient = yield this.getPublicClient();
|
|
82
|
+
if (!publicClient || !walletClient) {
|
|
83
|
+
throw new DynamicError('No public client available');
|
|
84
|
+
}
|
|
85
|
+
return createViemUiTransaction({
|
|
86
|
+
from,
|
|
87
|
+
publicClient: publicClient,
|
|
88
|
+
walletClient: walletClient,
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
getBlockExplorerUrlsForCurrentNetwork() {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
var _a, _b;
|
|
95
|
+
return (_b = (_a = this.eoaConnector) === null || _a === void 0 ? void 0 : _a.getBlockExplorerUrlsForCurrentNetwork()) !== null && _b !== void 0 ? _b : [];
|
|
96
|
+
});
|
|
97
|
+
}
|
|
69
98
|
}
|
|
70
99
|
|
|
71
100
|
export { AccountAbstractionConnector };
|