> ## 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.

# Using Solana Wallets

## Checking if a wallet is a Solana wallet

```ts React Native theme={"system"}
    import { isSolanaWallet } from '@dynamic-labs/solana';
    import { dynamicClient } from '<path to client file>';

    const wallet = dynamicClient.wallets.primary;
    if (!wallet || !isSolanaWallet(wallet)) {
      throw new Error('This wallet is not a Solana wallet');
    }

    const connection = dynamicClient.solana.getConnection();
```

## Get Connection

<CodeGroup>
  ```ts dynamicClient.ts theme={"system"}
  import { createClient } from '@dynamic-labs/client'
  import { SolanaExtension } from '@dynamic-labs/solana-extension'

  export const dynamicClient = createClient({
    environmentId: 'YOUR-ENVIRONMENT-ID',
  }).extend(SolanaExtension())
  ```

  ```ts getConnection.ts theme={"system"}
  import { dynamicClient } from './dynamicClient';
  import { isSolanaWallet } from '@dynamic-labs/solana';

  if (!isSolanaWallet(wallet)) {
    throw new Error('This wallet is not a Solana wallet');
  }

  const connection = dynamicClient.solana.getConnection({
    commitment: 'singleGossip',
  })
  ```
</CodeGroup>

## Get Signer

<CodeGroup>
  ```ts dynamicClient.ts theme={"system"}
  import { createClient } from '@dynamic-labs/client'
  import { SolanaExtension } from '@dynamic-labs/solana-extension'

  export const dynamicClient = createClient({
    environmentId: 'YOUR-ENVIRONMENT-ID',
  }).extend(SolanaExtension())
  ```

  ```ts getSigner.ts theme={"system"}
  import { dynamicClient } from './dynamicClient';
  import { isSolanaWallet } from '@dynamic-labs/solana';

  if (!isSolanaWallet(wallet)) {
    throw new Error('This wallet is not a Solana wallet');
  }

  const signer = dynamicClient.solana.getSigner({ wallet })
  ```
</CodeGroup>

## Custom connection options

To override the default Web3.js Connection settings (e.g. commitment, RPC URLs), pass options to the client's Solana extension: `dynamicClient.solana.getConnection({ commitment: 'confirmed', ... })` (see [Get Connection](#get-connection) above).

## Examples

You can find examples of how to interact with Solana wallets in the examples section:

* [Send a Legacy Solana Transaction](/react-native/wallets/using-wallets/solana/send-legacy-solana-transaction).
* [Send a Versioned Solana Transaction](/react-native/wallets/using-wallets/solana/send-versioned-solana-transaction).
