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

The package that gives access to an [Extension](/react-native/reference/package-references/client#extension-method)
that allows integrating Sui blockchain functionality to our [client](/react-native/reference/client).

## Functions

### `SuiExtension` method

```typescript theme={"system"}
SuiExtension(): Extension<ISuiExtension>
```

A method that, when passed to the client instance, injects the following modules into it:

#### `sui` module

Provides methods to create Sui client and signer for Sui wallets.

<Info>
  The reference types below are simplified for the sake of readability. See the
  [type specification](#isuiextension-type) for details.
</Info>

| Property         | Type                                                       | Description                                                                                                          |
| ---------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `getSigner`      | `(props: { wallet: Wallet }) => ISuiSigner`                | Returns an object that can be used to prompt the user for message and transaction signing.                           |
| `getNetworkUrl`  | `(props: { walletId: string }) => Promise<string>`         | Returns the Sui fullnode URL for the network the wallet is connected to. Especially useful for creating Sui clients. |
| `getNetworkName` | `(props: { walletId: string }) => Promise<SuiNetworkName>` | Returns the name of the network the wallet is connected to.                                                          |

## Types

### `ISuiExtension` type

Type of the Sui extension.

```typescript theme={"system"}
import { Transaction } from '@mysten/sui/transactions'
import { type Wallet } from '@dynamic-labs/client'

type SuiNetworkName = 'mainnet' | 'testnet' | 'devnet'

type ISuiSigner = {
  signTransaction(transaction: Transaction): Promise<{ signature: string }>
  signMessage(message: string): Promise<{ signature: string }>
}

type ISuiExtension = {
  sui: {
    getSigner: (props: { wallet: Wallet }) => ISuiSigner
    getNetworkUrl: (props: { walletId: string }) => Promise<string>
    getNetworkName: (props: { walletId: string }) => Promise<SuiNetworkName>
  }
}
```
