@dynamic-labs/ethereum-aa 3.9.0 → 3.9.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 +4 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/ZeroDevConnector.cjs +3 -5
- package/src/ZeroDevConnector.d.ts +5 -5
- package/src/ZeroDevConnector.js +3 -5
- package/src/utils/createEcsdaKernelAccountClient.cjs +1 -0
- package/src/utils/createEcsdaKernelAccountClient.d.ts +2 -2
- package/src/utils/createEcsdaKernelAccountClient.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
|
|
2
|
+
### [3.9.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.9.1...v3.9.2) (2024-12-11)
|
|
3
|
+
|
|
4
|
+
### [3.9.1](https://github.com/dynamic-labs/DynamicAuth/compare/v3.9.0...v3.9.1) (2024-12-09)
|
|
5
|
+
|
|
2
6
|
## [3.9.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.8.5...v3.9.0) (2024-12-04)
|
|
3
7
|
|
|
4
8
|
|
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": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@dynamic-labs/sdk-api-core": "0.0.570",
|
|
30
30
|
"@zerodev/ecdsa-validator": "5.3.1",
|
|
31
|
-
"@zerodev/multi-chain-validator": "5.3.
|
|
32
|
-
"@zerodev/sdk": "5.3.
|
|
33
|
-
"permissionless": "^0.1.
|
|
34
|
-
"@dynamic-labs/assert-package-version": "3.9.
|
|
35
|
-
"@dynamic-labs/ethereum-core": "3.9.
|
|
36
|
-
"@dynamic-labs/logger": "3.9.
|
|
37
|
-
"@dynamic-labs/types": "3.9.
|
|
38
|
-
"@dynamic-labs/utils": "3.9.
|
|
39
|
-
"@dynamic-labs/wallet-book": "3.9.
|
|
40
|
-
"@dynamic-labs/wallet-connector-core": "3.9.
|
|
31
|
+
"@zerodev/multi-chain-validator": "5.3.13",
|
|
32
|
+
"@zerodev/sdk": "5.3.26",
|
|
33
|
+
"permissionless": "^0.1.45",
|
|
34
|
+
"@dynamic-labs/assert-package-version": "3.9.2",
|
|
35
|
+
"@dynamic-labs/ethereum-core": "3.9.2",
|
|
36
|
+
"@dynamic-labs/logger": "3.9.2",
|
|
37
|
+
"@dynamic-labs/types": "3.9.2",
|
|
38
|
+
"@dynamic-labs/utils": "3.9.2",
|
|
39
|
+
"@dynamic-labs/wallet-book": "3.9.2",
|
|
40
|
+
"@dynamic-labs/wallet-connector-core": "3.9.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"viem": "^2.7.
|
|
43
|
+
"viem": "^2.7.12"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -294,7 +294,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
294
294
|
onPersonalSign: (_a) => _tslib.__awaiter(this, [_a], void 0, function* ({ message }) {
|
|
295
295
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
296
296
|
return provider.signMessage({
|
|
297
|
-
account: provider.account,
|
|
297
|
+
account: accounts.toAccount(provider.account.address),
|
|
298
298
|
message,
|
|
299
299
|
});
|
|
300
300
|
}),
|
|
@@ -325,7 +325,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
325
325
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
326
326
|
const signTypedData = JSON.parse(message);
|
|
327
327
|
return provider.signTypedData({
|
|
328
|
-
account: provider.account,
|
|
328
|
+
account: accounts.toAccount(provider.account.address),
|
|
329
329
|
domain: signTypedData.domain,
|
|
330
330
|
message: signTypedData.message,
|
|
331
331
|
primaryType: signTypedData.primaryType,
|
|
@@ -341,14 +341,12 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
341
341
|
return transport;
|
|
342
342
|
}
|
|
343
343
|
getWalletClient(chainId) {
|
|
344
|
-
var _a;
|
|
345
344
|
const provider = this.kernelClient;
|
|
346
345
|
if (!provider)
|
|
347
346
|
return undefined;
|
|
348
347
|
const transport = this.getTransport(provider);
|
|
349
|
-
const address = (_a = provider.account) === null || _a === void 0 ? void 0 : _a.address;
|
|
350
348
|
const walletClient = viem.createWalletClient({
|
|
351
|
-
account: address,
|
|
349
|
+
account: accounts.toAccount(provider.account.address),
|
|
352
350
|
chain: chainId ? ethereumCore.chainsMap[chainId] : provider.chain,
|
|
353
351
|
transport,
|
|
354
352
|
});
|
|
@@ -20,7 +20,7 @@ type ZeroDevConnectorProps = {
|
|
|
20
20
|
bundlerProvider: BundlerProvider | undefined;
|
|
21
21
|
};
|
|
22
22
|
type IZeroDevConnector = IAccountAbstractionWalletConnector & ISendBalanceWalletConnector;
|
|
23
|
-
type KernelClient = KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint>>;
|
|
23
|
+
type KernelClient = KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint, Transport, ViemChain>>;
|
|
24
24
|
export declare class ZeroDevConnector extends WalletConnectorBase<typeof EthereumWallet> implements IZeroDevConnector {
|
|
25
25
|
clientId: string;
|
|
26
26
|
eoaConnector: InternalWalletConnector | undefined;
|
|
@@ -2949,11 +2949,11 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
|
|
|
2949
2949
|
[x: `bytes31[${string}]`]: undefined;
|
|
2950
2950
|
[x: `bytes32[${string}]`]: undefined;
|
|
2951
2951
|
[x: `int[${string}]`]: undefined;
|
|
2952
|
+
[x: `int40[${string}]`]: undefined;
|
|
2952
2953
|
[x: `int8[${string}]`]: undefined;
|
|
2953
2954
|
[x: `int16[${string}]`]: undefined;
|
|
2954
2955
|
[x: `int24[${string}]`]: undefined;
|
|
2955
2956
|
[x: `int32[${string}]`]: undefined;
|
|
2956
|
-
[x: `int40[${string}]`]: undefined;
|
|
2957
2957
|
[x: `int48[${string}]`]: undefined;
|
|
2958
2958
|
[x: `int56[${string}]`]: undefined;
|
|
2959
2959
|
[x: `int64[${string}]`]: undefined;
|
|
@@ -2982,11 +2982,11 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
|
|
|
2982
2982
|
[x: `int248[${string}]`]: undefined;
|
|
2983
2983
|
[x: `int256[${string}]`]: undefined;
|
|
2984
2984
|
[x: `uint[${string}]`]: undefined;
|
|
2985
|
+
[x: `uint40[${string}]`]: undefined;
|
|
2985
2986
|
[x: `uint8[${string}]`]: undefined;
|
|
2986
2987
|
[x: `uint16[${string}]`]: undefined;
|
|
2987
2988
|
[x: `uint24[${string}]`]: undefined;
|
|
2988
2989
|
[x: `uint32[${string}]`]: undefined;
|
|
2989
|
-
[x: `uint40[${string}]`]: undefined;
|
|
2990
2990
|
[x: `uint48[${string}]`]: undefined;
|
|
2991
2991
|
[x: `uint56[${string}]`]: undefined;
|
|
2992
2992
|
[x: `uint64[${string}]`]: undefined;
|
|
@@ -3050,11 +3050,11 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
|
|
|
3050
3050
|
bytes30?: undefined;
|
|
3051
3051
|
bytes31?: undefined;
|
|
3052
3052
|
bytes32?: undefined;
|
|
3053
|
+
int40?: undefined;
|
|
3053
3054
|
int8?: undefined;
|
|
3054
3055
|
int16?: undefined;
|
|
3055
3056
|
int24?: undefined;
|
|
3056
3057
|
int32?: undefined;
|
|
3057
|
-
int40?: undefined;
|
|
3058
3058
|
int48?: undefined;
|
|
3059
3059
|
int56?: undefined;
|
|
3060
3060
|
int64?: undefined;
|
|
@@ -3082,11 +3082,11 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
|
|
|
3082
3082
|
int240?: undefined;
|
|
3083
3083
|
int248?: undefined;
|
|
3084
3084
|
int256?: undefined;
|
|
3085
|
+
uint40?: undefined;
|
|
3085
3086
|
uint8?: undefined;
|
|
3086
3087
|
uint16?: undefined;
|
|
3087
3088
|
uint24?: undefined;
|
|
3088
3089
|
uint32?: undefined;
|
|
3089
|
-
uint40?: undefined;
|
|
3090
3090
|
uint48?: undefined;
|
|
3091
3091
|
uint56?: undefined;
|
|
3092
3092
|
uint64?: undefined;
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -290,7 +290,7 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
290
290
|
onPersonalSign: (_a) => __awaiter(this, [_a], void 0, function* ({ message }) {
|
|
291
291
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
292
292
|
return provider.signMessage({
|
|
293
|
-
account: provider.account,
|
|
293
|
+
account: toAccount(provider.account.address),
|
|
294
294
|
message,
|
|
295
295
|
});
|
|
296
296
|
}),
|
|
@@ -321,7 +321,7 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
321
321
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
322
322
|
const signTypedData = JSON.parse(message);
|
|
323
323
|
return provider.signTypedData({
|
|
324
|
-
account: provider.account,
|
|
324
|
+
account: toAccount(provider.account.address),
|
|
325
325
|
domain: signTypedData.domain,
|
|
326
326
|
message: signTypedData.message,
|
|
327
327
|
primaryType: signTypedData.primaryType,
|
|
@@ -337,14 +337,12 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
337
337
|
return transport;
|
|
338
338
|
}
|
|
339
339
|
getWalletClient(chainId) {
|
|
340
|
-
var _a;
|
|
341
340
|
const provider = this.kernelClient;
|
|
342
341
|
if (!provider)
|
|
343
342
|
return undefined;
|
|
344
343
|
const transport = this.getTransport(provider);
|
|
345
|
-
const address = (_a = provider.account) === null || _a === void 0 ? void 0 : _a.address;
|
|
346
344
|
const walletClient = createWalletClient({
|
|
347
|
-
account: address,
|
|
345
|
+
account: toAccount(provider.account.address),
|
|
348
346
|
chain: chainId ? chainsMap[chainId] : provider.chain,
|
|
349
347
|
transport,
|
|
350
348
|
});
|
|
@@ -27,6 +27,7 @@ const createEcdsaKernelAccountClient = (_a) => _tslib.__awaiter(void 0, [_a], vo
|
|
|
27
27
|
const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
|
|
28
28
|
const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
|
|
29
29
|
const publicClient = viem.createPublicClient({
|
|
30
|
+
chain,
|
|
30
31
|
transport: viem.http(resolvedBundlerRpc),
|
|
31
32
|
});
|
|
32
33
|
const validator = yield ecdsaValidator(publicClient, {
|
|
@@ -2,7 +2,7 @@ import { KernelSmartAccount } from '@zerodev/sdk/accounts';
|
|
|
2
2
|
import { KernelAccountClient } from '@zerodev/sdk/clients';
|
|
3
3
|
import { SmartAccountSigner } from 'permissionless/accounts';
|
|
4
4
|
import { EntryPoint } from 'permissionless/types';
|
|
5
|
-
import { Address,
|
|
5
|
+
import { Address, Transport, Chain } from 'viem';
|
|
6
6
|
import { GetKernelVersion } from '@zerodev/sdk/types';
|
|
7
7
|
export type BundlerProvider = 'STACKUP' | 'PIMLICO' | 'ALCHEMY' | 'GELATO';
|
|
8
8
|
export type ERC20Paymaster = Address;
|
|
@@ -21,4 +21,4 @@ export declare const createEcdsaKernelAccountClient: <entryPoint extends EntryPo
|
|
|
21
21
|
index?: bigint;
|
|
22
22
|
kernelVersion: GetKernelVersion<entryPoint>;
|
|
23
23
|
ecdsaValidator: any;
|
|
24
|
-
}) => Promise<KernelAccountClient<entryPoint,
|
|
24
|
+
}) => Promise<KernelAccountClient<entryPoint, Transport, TChain, KernelSmartAccount<entryPoint, Transport, TChain>>>;
|
|
@@ -23,6 +23,7 @@ const createEcdsaKernelAccountClient = (_a) => __awaiter(void 0, [_a], void 0, f
|
|
|
23
23
|
const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
|
|
24
24
|
const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
|
|
25
25
|
const publicClient = createPublicClient({
|
|
26
|
+
chain,
|
|
26
27
|
transport: http(resolvedBundlerRpc),
|
|
27
28
|
});
|
|
28
29
|
const validator = yield ecdsaValidator(publicClient, {
|