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

# Using Solana Wallets

<Card title="Recommended: JavaScript SDK for React Native" icon="react" color="#4779FE">
  While this SDK is still supported, we recommend using newer [JavaScript SDK](/docs/javascript/reference/react-native-quickstart), which is optimized for React Native, but also comes with a host of other benefits.
</Card>

## 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
    import { createClient } from '@dynamic-labs/legacy-client'
    import { SolanaExtension } from '@dynamic-labs/legacy-solana-extension'

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

    ```ts getConnection.ts
    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
      import { createClient } from '@dynamic-labs/legacy-client'
      import { SolanaExtension } from '@dynamic-labs/legacy-solana-extension'

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

      ```ts getSigner.ts
      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](/docs/react-native/wallets/using-wallets/solana/send-legacy-solana-transaction).
- [Send a Versioned Solana Transaction](/docs/react-native/wallets/using-wallets/solana/send-versioned-solana-transaction).
````
