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

# Adding Solana Extensions

> To interact with the Solana wallets, you need to add the appropriate extensions

Make sure you enable SVM chain in the [Dynamic dashboard](https://app.dynamic.xyz/dashboard/chains-and-networks#solana).

## Installation

```bash theme={"system"}
npm install @dynamic-labs-sdk/solana
```

## Default Solana extension

If you wish to support the standard Solana wallets and Dynamic embedded wallets,
you can add the default Solana extension to your client using the `addSolanaExtension` method.

```javascript theme={"system"}
import { createDynamicClient } from '@dynamic-labs-sdk/client';
import { addSolanaExtension } from '@dynamic-labs-sdk/solana';

const dynamicClient = createDynamicClient({
  ...
});

addSolanaExtension();

```

## Standalone Solana extensions

If you want to be more granular, you can add the standalone Solana extensions individually to your client.

### Solana Wallets Standard extension

```javascript theme={"system"}
import { addSolanaWalletStandardExtension } from '@dynamic-labs-sdk/solana/walletStandard';

const dynamicClient = createDynamicClient({
  ...
});

// this will add support for wallets that implement the Solana Wallets Standard
addSolanaWalletStandardExtension();

```

### WAAS Solana extension

```javascript theme={"system"}
import { addWaasSolanaExtension } from '@dynamic-labs-sdk/solana/waas';

const dynamicClient = createDynamicClient({
  ...
});

// this will add support for Dynamic embedded Solana wallets only
addWaasSolanaExtension();

```

### Phantom redirect extension

Adds support for connecting to [Phantom](https://phantom.app) on mobile via deep link redirects.
This is **not included** in `addSolanaExtension` and must be added separately. It is intended for
mobile web apps where users open your app inside a mobile browser and need to interact with their
Phantom wallet.

```javascript theme={"system"}
import { addPhantomRedirectSolanaExtension } from '@dynamic-labs-sdk/solana/phantom-redirect';

const dynamicClient = createDynamicClient({
  ...
});

// must be called on every page load, passing the current URL so the extension
// can detect and complete any in-progress Phantom redirect
addPhantomRedirectSolanaExtension({ url: new URL(window.location.href) });

```

See [Phantom Redirect Extension](/javascript/reference/solana/phantom-redirect-extension) for full
setup details and how the redirect flow works.

## Combining extensions

You can combine as many extensions as you want to support all the wallets you want to support.

```javascript theme={"system"}
import { addSolanaWalletStandardExtension } from '@dynamic-labs-sdk/solana/walletStandard';
import { addWaasSolanaExtension } from '@dynamic-labs-sdk/solana/waas';

const dynamicClient = createDynamicClient({
  ...
});

addSolanaWalletStandardExtension();
addWaasSolanaExtension();

```

## React

In React, register extensions at module level in the same file where you create the client — not inside components. This runs once when the module is first imported.

```tsx theme={"system"}
// dynamicClient.ts
import { createDynamicClient } from '@dynamic-labs-sdk/client';
import { addSolanaWalletStandardExtension } from '@dynamic-labs-sdk/solana/walletStandard';
import { addWaasSolanaExtension } from '@dynamic-labs-sdk/solana/waas';

export const dynamicClient = createDynamicClient({
  environmentId: 'YOUR_ENVIRONMENT_ID',
});

addSolanaWalletStandardExtension();
addWaasSolanaExtension();
```
