# useSolanaTransaction | @account-kit/react

> Overview of the useSolanaTransaction 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 useSolanaTransaction(opts): SolanaTransaction;
```

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

This is the hook that will be used to send a transaction. It will prioritize external
connected Solana wallets, falling back to the internal signer when not connected.
Supports sponsorship for both external wallets and internal signers.

## Example

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

const { mutate } = useSolanaTransaction({
  policyId: "<policyId>",
});

mutate({
  transfer: {
    amount: 0,
    toAddress: "<toAddress>",
  },
});
```

## 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>
        `SolanaTransactionHookParams`
      </td>

      <td>
        Options for the hook to get setup, The transaction is required.
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`SolanaTransaction`](../interfaces/SolanaTransaction)

The transaction hook.