> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WalletConnector

> This is Dynamic's abstraction over the wallet interface. This can be used to interact with the users wallet.

> [card] Recommended: JavaScript SDK with React Hooks
>
> For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](https://docs.dynamic.xyz/docs/javascript/reference/react-quickstart.md) to get started.

| Field | Description |
| - | - |
| fetchPublicAddress: Promise\<string \| undefined> | A method to fetch the public address (alternatively the address could be fetched from useDynamicContext's user object) |
| getPublicClient(): Viem Public Client \| undefined | The provider should be used for read only actions on the block chain.Ethereum - A [Viem Public Client](https://viem.sh/docs/clients/public.html) SOLANA -[solana/web3js.Connection](https://solana-labs.github.io/solana-web3.js/classes/Connection.html) |
| getWalletClient() : Promise\<Viem Wallet Client\| Solana Wallet>\\ | Representation of the signer (the wallet) for actions that require signatures with the private key.Ethereum - [Viem Wallet Client](https://viem.sh/docs/clients/wallet.html), Solana - The active wallet |
| name: string | The wallet name |
| signMessage(messageToSign: string): Promise\<string \| undefined> | A method to sign a message |
| supportedChains: Chain\[] | The chains that the wallet supports |
| getDeepLink(): string | A method to get a deep link to a wallet for mobile |
| getAccountAbstraction(): Smart Wallet Provider | A method to get the smart wallet provider for more advanced usage |
| supportsNetworkSwitching(): boolean | Whether the connector supports network switching. |
| switchNetwork(\{ networkChainId, networkName }: \{ networkChainId?: number; networkName?: string; }): Promise\<void> | Switch to another network by provider either the network name or chain id specified in the list of EvmNetwork |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.