# sendUserOperation | @aa-sdk/core

> Overview of the sendUserOperation function from @aa-sdk/core

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

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

```ts
function sendUserOperation<
  TTransport,
  TChain,
  TAccount,
  TContext,
  TEntryPointVersion,
>(client_, args): Promise<SendUserOperationResult<TEntryPointVersion>>;
```

Defined in: [aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts#L39)

Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline.

## Example

```ts
import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";

const account = await toSmartContractAccount(...);
const result = await createSmartAccountClient(...).sendUserOperation({
 uo: {
   target: "0x...",
   data: "0x...", // or "0x",
   value: 0n, // optional
 }
});
```

## Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TTransport` *extends* [`Transport`](https://viem.sh)
      </td>

      <td>
        [`Transport`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* `undefined` | [`Chain`](https://viem.sh)
      </td>

      <td>
        `undefined` | [`Chain`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TAccount` *extends*
        | `undefined`
        | [`SmartContractAccount`](../type-aliases/SmartContractAccount)
      </td>

      <td>
        | `undefined`
        | [`SmartContractAccount`](../type-aliases/SmartContractAccount)
      </td>
    </tr>

    <tr>
      <td>
        `TContext` *extends*
        | `undefined`
        | [`UserOperationContext`](../type-aliases/UserOperationContext)
      </td>

      <td>
        | `undefined`
        | [`UserOperationContext`](../type-aliases/UserOperationContext)
      </td>
    </tr>

    <tr>
      <td>
        `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>
      </td>

      <td>
        [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`>
      </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>
        `client_`
      </td>

      <td>
        [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`>
      </td>

      <td>
        the smart account client to use for RPC requests
      </td>
    </tr>

    <tr>
      <td>
        `args`
      </td>

      <td>
        `any`
      </td>

      <td>
        contains the UO or batch to send, context, overrides, and account if not hoisted on the client
      </td>
    </tr>

  </tbody>
</table>

## Returns

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

a Promise containing the result of the user operation