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

# signTransactionBlock (Sui)

# signTransactionBlock

> **Deprecated:** This function is deprecated. Use [signTransaction](https://docs.dynamic.xyz/docs/javascript/reference/sui/sign-transaction.md) instead.

Signs a Sui transaction block without executing it.

## Usage

```javascript theme={"system"}
import { signTransactionBlock, isSuiWalletAccount } from "@dynamic-labs-sdk/sui";
import { getPrimaryWalletAccount } from "@dynamic-labs-sdk/client";
import { Transaction } from "@mysten/sui/transactions";

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isSuiWalletAccount(walletAccount)) {
  const tx = new Transaction();
  tx.transferObjects(
    [tx.object("0x...")],
    tx.pure.address(recipientAddress)
  );

  const result = await signTransactionBlock({
    transactionBlock: tx,
    walletAccount,
  });

  console.log("Signature:", result.signature);
}
```

## Parameters

| Parameter | Type | Description |
| - | - | - |
| `transactionBlock` | `Transaction` | The Sui transaction block to sign |
| `walletAccount` | `SuiWalletAccount` | The wallet account to sign the transaction with |
| `client` | `DynamicClient` (optional) | The Dynamic client instance. Only required when using multiple clients. |

## Returns

`Promise<SuiSignTransactionBlockResult>` - A promise that resolves to an object containing the signature and transaction block bytes.

## Errors

| Error | Description |
| - | - |
| `NotSuiProviderError` | Thrown if the wallet account's provider is not a Sui provider |
| `MethodNotImplementedError` | Thrown if the wallet provider does not implement this method |

## Related functions

* [signTransaction](https://docs.dynamic.xyz/docs/javascript/reference/sui/sign-transaction.md) - The recommended replacement for this function
* [signAndExecuteTransactionBlock](https://docs.dynamic.xyz/docs/javascript/reference/sui/sign-and-execute-transaction-block.md) - Sign and execute a transaction block


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