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

# Sui Wallets

> [card] Recommended: JavaScript SDK for React Native
>
> While this SDK is still supported, we recommend using newer [JavaScript SDK](https://docs.dynamic.xyz/docs/javascript/reference/react-native-quickstart.md), which is optimized for React Native, but also comes with a host of other benefits.

## Checking if a Wallet is a Sui Wallet

```ts dynamicClient.ts theme={"system"}
import { createClient } from '@dynamic-labs/legacy-client'
import { SuiExtension } from '@dynamic-labs/legacy-sui-extension'

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

```ts checkSuiWallet.ts theme={"system"}
import { isSuiWallet } from '@dynamic-labs/sui';
import { dynamicClient } from './dynamicClient';

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

## Fetch Client

```ts createClient.ts theme={"system"}
import { createClient } from '@dynamic-labs/legacy-client'
import { SuiExtension } from '@dynamic-labs/legacy-sui-extension'

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

```ts fetchClientAndSigner.ts theme={"system"}
import { dynamicClient } from './dynamicClient';
import { SuiClient } from '@mysten/sui.js/client'

const wallet = dynamicClient.wallets.primary

if (!wallet) {
  throw new Error('This wallet is not found');
}

const networkUrl = await dynamicClient.sui.getNetworkUrl({ walletId: wallet.id })
const suiClient = new SuiClient({ url: networkUrl })
const signer = dynamicClient.sui.getSigner({ wallet })
```

## Fetch Network

```ts React Native theme={"system"}
    import { dynamicClient } from '<path to client file>';
    import { SuiClient } from '@mysten/sui.js/client'

    const wallet = dynamicClient.wallets.primary

    if (!wallet) {
      throw new Error('This wallet is not found');
    }

    const networkUrl = await dynamicClient.sui.getNetworkUrl({ walletId: wallet.id })
    const networkName = await dynamicClient.sui.getNetworkName({ walletId: wallet.id })


## Resources

[SuiClient](https://sdk.mystenlabs.com/typedoc/classes/_mysten_sui.client.SuiClient.html)
[WalletAccount](https://docs.sui.io/standards/wallet-standard#managing-wallets)

## Examples

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

- [Send a Sui Transaction](/react-native/wallets/using-wallets/sui/send-sui-transaction)
```


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