# useSendCalls | @account-kit/react

> Overview of the useSendCalls 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 useSendCalls<TEntryPointVersion>(
  params,
): UseSendCallsResult<TEntryPointVersion>;
```

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

Hook for sending calls to a smart account or EOA wallet.

This hook provides functionality to execute calls on a smart account using Account Abstraction,
or fall back to regular EOA transactions when connected to an EOA wallet. It handles the complete
flow of preparing, signing, and sending calls.

\<Note>
If using this hook with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden
from the user. It is recommended to use the `usePrepareCalls` hook instead to manually handle the permit signature.
\</Note>

## Example

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

const { sendCalls, sendCallsAsync, isSendingCalls, error } = useSendCalls();

// Send a single call
await sendCallsAsync({
  calls: [
    {
      to: "0x...",
      data: "0x...",
      value: "0x0",
    },
  ],
});

// Send multiple calls (smart account only)
await sendCallsAsync({
  calls: [
    { to: "0x...", data: "0x..." },
    { to: "0x...", data: "0x..." },
  ],
});
```

## Remarks

- When connected to an EOA wallet, only single calls are supported (batch execution is not allowed)
- For smart accounts, the returned `ids` are the prepared call IDs
- For EOA wallets, the returned `ids` are transaction hashes

## Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TEntryPointVersion` *extends* keyof `EntryPointRegistryBase`\<`unknown`>
      </td>

      <td>
        keyof `EntryPointRegistryBase`\<`unknown`>
      </td>

      <td>
        The entry point version to use for user operations (defaults to EntryPointVersion)
      </td>
    </tr>

  </tbody>
</table>

## Parameters

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

  <tbody>
    <tr>
      <td>
        `params`
      </td>

      <td>
        [`UseSendCallsParams`](../type-aliases/UseSendCallsParams)
      </td>

      <td>
        Configuration parameters for the hook
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`UseSendCallsResult`](../type-aliases/UseSendCallsResult)\<`TEntryPointVersion`>

An object containing:

- `sendCalls`: Function to send calls synchronously (returns void)
- `sendCallsAsync`: Async function to send calls (returns Promise)
- `sendCallsResult`: The result of the last successful call execution
- `isSendingCalls`: Boolean indicating if calls are currently being sent
- `error`: Error from the last failed call execution, if any