@dynamic-labs/ethereum-aa 1.3.0 → 1.4.0

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,29 @@
1
1
 
2
+ ## [1.4.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.3.1...v1.4.0) (2024-03-21)
3
+
4
+
5
+ ### Features
6
+
7
+ * add sign-in with farcaster ([#5059](https://github.com/dynamic-labs/DynamicAuth/issues/5059)) ([83245aa](https://github.com/dynamic-labs/DynamicAuth/commit/83245aa9f973ca349abcbaccf5d150b4a31beb0e)), closes [#4947](https://github.com/dynamic-labs/DynamicAuth/issues/4947)
8
+ * add prop to hide embedded wallet transaction UIs ([#4928](https://github.com/dynamic-labs/DynamicAuth/issues/4928)) ([b0ad954](https://github.com/dynamic-labs/DynamicAuth/commit/b0ad95494ebf991e61f09a23999c3526498f2db9)), closes [#4924](https://github.com/dynamic-labs/DynamicAuth/issues/4924)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * multiple wallet improvements
14
+ * multiple ui/ux improvements
15
+ * miscellaneous copy and localization updates
16
+ * add missing css variables for DynamicConnectButton
17
+
18
+ ### [1.3.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.3.0...v1.3.1) (2024-03-08)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([#4905](https://github.com/dynamic-labs/DynamicAuth/issues/4905)) ([0f4e79f](https://github.com/dynamic-labs/DynamicAuth/commit/0f4e79ff36f8a3ef63c59bb9f80429cdefbe7307))
24
+ * update btckit network conversion for signpsbt to use correct network ([#4882](https://github.com/dynamic-labs/DynamicAuth/issues/4882)) ([3c14f55](https://github.com/dynamic-labs/DynamicAuth/commit/3c14f55f6e37718a095752d0e04bfbac45fee75c))
25
+ * better auth state handling when logged in with disabled wallets ([#4862](https://github.com/dynamic-labs/DynamicAuth/issues/4862)) ([8cc2a1c](https://github.com/dynamic-labs/DynamicAuth/commit/8cc2a1c4f31cf6acb61d814a3410c5e77da21c50))
26
+
2
27
  ## [1.3.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.2.0...v1.3.0) (2024-03-05)
3
28
 
4
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@zerodev/sdk": "^4.1.5",
30
- "@dynamic-labs/sdk-api": "0.0.363",
31
- "@dynamic-labs/logger": "1.3.0",
32
- "@dynamic-labs/types": "1.3.0",
33
- "@dynamic-labs/utils": "1.3.0",
34
- "@dynamic-labs/viem-utils": "1.3.0",
35
- "@dynamic-labs/wallet-book": "1.3.0",
36
- "@dynamic-labs/wallet-connector-core": "1.3.0"
30
+ "@dynamic-labs/sdk-api": "0.0.387",
31
+ "@dynamic-labs/logger": "1.4.0",
32
+ "@dynamic-labs/types": "1.4.0",
33
+ "@dynamic-labs/utils": "1.4.0",
34
+ "@dynamic-labs/viem-utils": "1.4.0",
35
+ "@dynamic-labs/wallet-book": "1.4.0",
36
+ "@dynamic-labs/wallet-connector-core": "1.4.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "viem": "^1.19.13 || ^2.2.0"
@@ -157,12 +157,13 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
157
157
  });
158
158
  return transport;
159
159
  }
160
- getWalletClient() {
160
+ getWalletClient(chainId) {
161
161
  const provider = this.zeroDevProvider;
162
162
  if (!provider)
163
163
  throw new utils.DynamicError('No provider');
164
164
  const transport = this.getTransport(provider);
165
165
  const walletClient = viem.createWalletClient({
166
+ chain: chainId ? viemUtils.chainsMap[chainId] : undefined,
166
167
  transport,
167
168
  });
168
169
  return walletClient;
@@ -41,7 +41,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IAc
41
41
  getConnectedAccounts(): Promise<string[]>;
42
42
  getNetwork(): Promise<number | undefined>;
43
43
  private getTransport;
44
- getWalletClient(): WalletClient | undefined;
44
+ getWalletClient(chainId?: string): WalletClient | undefined;
45
45
  getPublicClient(): Promise<void | PublicClient | undefined>;
46
46
  getSigner(): Promise<WalletClient | undefined>;
47
47
  canSponsorTransactionGas(transaction: RpcTransactionRequest): Promise<boolean>;
@@ -2,7 +2,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { ECDSAProvider, convertWalletClientToAccountSigner } from '@zerodev/sdk';
3
3
  import { custom, createWalletClient, isHex, fromHex, formatEther } from 'viem';
4
4
  import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
5
- import { confirmationTransport, unFormatTransaction } from '@dynamic-labs/viem-utils';
5
+ import { confirmationTransport, chainsMap, unFormatTransaction } from '@dynamic-labs/viem-utils';
6
6
  import { parseEvmNetworks, DynamicError, DeferredPromise, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError, InsufficientFundsError } from '@dynamic-labs/utils';
7
7
  import { logger } from './utils/logger.js';
8
8
 
@@ -153,12 +153,13 @@ class ZeroDevConnector extends WalletConnectorBase {
153
153
  });
154
154
  return transport;
155
155
  }
156
- getWalletClient() {
156
+ getWalletClient(chainId) {
157
157
  const provider = this.zeroDevProvider;
158
158
  if (!provider)
159
159
  throw new DynamicError('No provider');
160
160
  const transport = this.getTransport(provider);
161
161
  const walletClient = createWalletClient({
162
+ chain: chainId ? chainsMap[chainId] : undefined,
162
163
  transport,
163
164
  });
164
165
  return walletClient;