# useSolanaSignMessage | @account-kit/react

> Overview of the useSolanaSignMessage hook from @account-kit/react

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useSolanaSignMessage(opts): SolanaSignedMessage;
```

Defined in: [account-kit/react/src/hooks/useSolanaSignMessage.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSolanaSignMessage.ts#L65)

This is the hook that will be used to sign a message. It will prioritize external
connected Solana wallets, falling back to the internal signer when not connected.

## Example

```ts twoslash
import { useSolanaSignMessage } from "@account-kit/react";

const {
  isPending: isSigningMessage,
  mutate: signHello,
  data: signature,
  reset,
} = useSolanaSignMessage({});

signHello({ message: "Hello" });
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `opts`
      </td>

      <td>
        `UseSolanaSignMessageParams`
      </td>

      <td>
        Options for the hook to get setup.
      </td>
    </tr>

  </tbody>
</table>

## Returns

`SolanaSignedMessage`

This should be hook mutations plus a few more. Used to get the end result of the signing and the callbacks.