@dynamic-labs/ethereum-aa 2.2.4 → 2.2.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 +20 -0
- package/package.json +8 -8
- package/src/ZeroDevConnector.cjs +6 -1
- package/src/ZeroDevConnector.d.ts +4 -2
- package/src/ZeroDevConnector.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.2.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.5...v2.2.6) (2024-06-26)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* prevent unneccessary magiceden solana popups ([#6158](https://github.com/dynamic-labs/DynamicAuth/issues/6158)) ([#6171](https://github.com/dynamic-labs/DynamicAuth/issues/6171)) ([cc24d13](https://github.com/dynamic-labs/DynamicAuth/commit/cc24d135b059b4a235752f57a9d25ac0e5b2e307))
|
|
8
|
+
* expose gas sponsorship kernel client from zerodev connector
|
|
9
|
+
|
|
10
|
+
### [2.2.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.4...v2.2.5) (2024-06-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add multi asset ([#6142](https://github.com/dynamic-labs/DynamicAuth/issues/6142)) ([273230f](https://github.com/dynamic-labs/DynamicAuth/commit/273230f48e25b3e7f690443ec41ae07dd585fb86)), closes [#5608](https://github.com/dynamic-labs/DynamicAuth/issues/5608) [#5655](https://github.com/dynamic-labs/DynamicAuth/issues/5655) [#5643](https://github.com/dynamic-labs/DynamicAuth/issues/5643) [#5673](https://github.com/dynamic-labs/DynamicAuth/issues/5673) [#5762](https://github.com/dynamic-labs/DynamicAuth/issues/5762) [#5766](https://github.com/dynamic-labs/DynamicAuth/issues/5766) [#5777](https://github.com/dynamic-labs/DynamicAuth/issues/5777)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* clear expiresAt from local storage on logout ([#6110](https://github.com/dynamic-labs/DynamicAuth/issues/6110)) ([#6129](https://github.com/dynamic-labs/DynamicAuth/issues/6129)) ([45adda9](https://github.com/dynamic-labs/DynamicAuth/commit/45adda95a4419ac22e19a8f3636a4539208bdb74))
|
|
21
|
+
|
|
2
22
|
### [2.2.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.3...v2.2.4) (2024-06-21)
|
|
3
23
|
|
|
4
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@zerodev/ecdsa-validator": "5.2.3",
|
|
31
31
|
"@zerodev/sdk": "5.2.8",
|
|
32
32
|
"permissionless": "0.1.20",
|
|
33
|
-
"@dynamic-labs/ethereum": "2.2.
|
|
34
|
-
"@dynamic-labs/logger": "2.2.
|
|
35
|
-
"@dynamic-labs/types": "2.2.
|
|
36
|
-
"@dynamic-labs/utils": "2.2.
|
|
37
|
-
"@dynamic-labs/viem-utils": "2.2.
|
|
38
|
-
"@dynamic-labs/wallet-book": "2.2.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "2.2.
|
|
33
|
+
"@dynamic-labs/ethereum": "2.2.6",
|
|
34
|
+
"@dynamic-labs/logger": "2.2.6",
|
|
35
|
+
"@dynamic-labs/types": "2.2.6",
|
|
36
|
+
"@dynamic-labs/utils": "2.2.6",
|
|
37
|
+
"@dynamic-labs/viem-utils": "2.2.6",
|
|
38
|
+
"@dynamic-labs/wallet-book": "2.2.6",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "2.2.6"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"viem": "^2.7.6"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -48,7 +48,10 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
48
48
|
getEOAConnector() {
|
|
49
49
|
return this.eoaConnector;
|
|
50
50
|
}
|
|
51
|
-
getAccountAbstractionProvider() {
|
|
51
|
+
getAccountAbstractionProvider({ withSponsorship, } = {}) {
|
|
52
|
+
if (withSponsorship && this.kernelClientWithSponsorship) {
|
|
53
|
+
return this.kernelClientWithSponsorship;
|
|
54
|
+
}
|
|
52
55
|
return this.kernelClient;
|
|
53
56
|
}
|
|
54
57
|
endSession() {
|
|
@@ -86,6 +89,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
86
89
|
return original(...args);
|
|
87
90
|
});
|
|
88
91
|
this.kernelClient = kernelClient;
|
|
92
|
+
// set the provider with sponsorship enabled
|
|
93
|
+
yield this.getKernelClientWithSponsorshipValidation();
|
|
89
94
|
yield this.checkIsProjectChainEnabled();
|
|
90
95
|
this.kernelClientDeferredPromise.resolve();
|
|
91
96
|
});
|
|
@@ -22,7 +22,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
22
22
|
projectId: string;
|
|
23
23
|
kernelClient: KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint>> | undefined;
|
|
24
24
|
eoaConnector: WalletConnector | undefined;
|
|
25
|
-
|
|
25
|
+
kernelClientWithSponsorship: KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint>> | undefined;
|
|
26
26
|
connectedChain: Chain;
|
|
27
27
|
supportedChains: Chain[];
|
|
28
28
|
evmNetworks: EvmNetwork[];
|
|
@@ -48,7 +48,9 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
48
48
|
private _walletUiUtils;
|
|
49
49
|
constructor(opts: ZeroDevConnectorProps);
|
|
50
50
|
getEOAConnector(): WalletConnector | undefined;
|
|
51
|
-
getAccountAbstractionProvider(
|
|
51
|
+
getAccountAbstractionProvider({ withSponsorship, }?: {
|
|
52
|
+
withSponsorship?: boolean;
|
|
53
|
+
}): KernelAccountClient<EntryPoint> | undefined;
|
|
52
54
|
endSession(): Promise<void>;
|
|
53
55
|
setEoaConnector(connector: WalletConnector): Promise<void>;
|
|
54
56
|
private checkIsProjectChainEnabled;
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -44,7 +44,10 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
44
44
|
getEOAConnector() {
|
|
45
45
|
return this.eoaConnector;
|
|
46
46
|
}
|
|
47
|
-
getAccountAbstractionProvider() {
|
|
47
|
+
getAccountAbstractionProvider({ withSponsorship, } = {}) {
|
|
48
|
+
if (withSponsorship && this.kernelClientWithSponsorship) {
|
|
49
|
+
return this.kernelClientWithSponsorship;
|
|
50
|
+
}
|
|
48
51
|
return this.kernelClient;
|
|
49
52
|
}
|
|
50
53
|
endSession() {
|
|
@@ -82,6 +85,8 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
82
85
|
return original(...args);
|
|
83
86
|
});
|
|
84
87
|
this.kernelClient = kernelClient;
|
|
88
|
+
// set the provider with sponsorship enabled
|
|
89
|
+
yield this.getKernelClientWithSponsorshipValidation();
|
|
85
90
|
yield this.checkIsProjectChainEnabled();
|
|
86
91
|
this.kernelClientDeferredPromise.resolve();
|
|
87
92
|
});
|