@dynamic-labs/ethereum 3.0.0-alpha.4 → 3.0.0-alpha.5

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.
@@ -1,8 +1,8 @@
1
1
  'use client'
2
2
  import { __rest, __awaiter } from '../../_virtual/_tslib.js';
3
3
  import { toHex, toBytes, createWalletClient, custom } from 'viem';
4
- import { eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
5
4
  import { chainsMap } from '@dynamic-labs/viem-utils';
5
+ import { eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
6
6
  import { EthWalletConnector } from '../EthWalletConnector.js';
7
7
  import { getCoinbaseProvider } from './helpers.js';
8
8
 
@@ -85,7 +85,7 @@ class EthProviderHelper {
85
85
  }
86
86
  return viem.createWalletClient({
87
87
  account: this.connector.getActiveAccount(),
88
- chain: chainId ? viemUtils.chainsMap[chainId] : undefined,
88
+ chain: chainId ? viemUtils.chainsMap[chainId] : this.connector.getActiveChain(),
89
89
  transport: viem.custom(provider),
90
90
  });
91
91
  }
@@ -1,4 +1,4 @@
1
- import { Hex, WalletClient } from 'viem';
1
+ import { Hex, WalletClient, Account, Transport, Chain as ViemChain } from 'viem';
2
2
  import { ProviderCondition, WalletConnector } from '@dynamic-labs/wallet-connector-core';
3
3
  import { WalletSchema } from '@dynamic-labs/wallet-book';
4
4
  import { IEthereum, ExtensionLocator } from './types';
@@ -22,6 +22,10 @@ export declare class EthProviderHelper {
22
22
  features: string[];
23
23
  name: string;
24
24
  } | undefined;
25
+ walletStandardLocators?: {
26
+ name: string;
27
+ locator: string;
28
+ }[] | undefined;
25
29
  windowLocations?: string[] | undefined;
26
30
  } | undefined;
27
31
  installedProviders(): IEthereum[];
@@ -29,7 +33,7 @@ export declare class EthProviderHelper {
29
33
  eip6963ProviderLookup(rdns: string): IEthereum | undefined;
30
34
  isInstalledHelper(): boolean;
31
35
  findProvider(): IEthereum | undefined;
32
- findWalletClient(chainId?: string): WalletClient | undefined;
36
+ findWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
33
37
  getAddress(): Promise<Hex | undefined>;
34
38
  getAddressWithProvider(client: WalletClient): Promise<Hex | undefined>;
35
39
  signMessage(messageToSign: string): Promise<string | undefined>;
@@ -81,7 +81,7 @@ class EthProviderHelper {
81
81
  }
82
82
  return createWalletClient({
83
83
  account: this.connector.getActiveAccount(),
84
- chain: chainId ? chainsMap[chainId] : undefined,
84
+ chain: chainId ? chainsMap[chainId] : this.connector.getActiveChain(),
85
85
  transport: custom(provider),
86
86
  });
87
87
  }
@@ -1,4 +1,4 @@
1
- import { WalletClient } from 'viem';
1
+ import { WalletClient, Transport, Account, Chain as ViemChain } from 'viem';
2
2
  import { Chain } from '@dynamic-labs/wallet-connector-core';
3
3
  import { EvmNetwork } from '@dynamic-labs/types';
4
4
  import { WalletSchema } from '@dynamic-labs/wallet-book';
@@ -14,7 +14,7 @@ declare abstract class InjectedWalletBase extends EthWalletConnector {
14
14
  getEthProviderHelper(): EthProviderHelper | undefined;
15
15
  getMobileOrInstalledWallet(): InjectedWalletBase;
16
16
  setupEventListeners(): void;
17
- getWalletClient(chainId?: string): WalletClient | undefined;
17
+ getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
18
18
  isInstalledOnBrowser(): boolean;
19
19
  getAddress(): Promise<string | undefined>;
20
20
  connect(): Promise<void>;