# sendTransaction | @aa-sdk/core

> Overview of the sendTransaction 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 sendTransaction<
  TChain,
  TAccount,
  TChainOverride,
  TContext,
  TEntryPointVersion,
>(client_, args, overrides?, context?): Promise<`0x${string}`>;
```

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

Sends a transaction using the provided client, arguments, optional overrides, and context.
This sends a UO and then waits for it to be mined

## Example

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

// smart account client is already extended with sendTransaction
const client = createSmartAccountClient(...);
const result = await client.sendTransaction({
 to: "0x...",
 data: "0x...", // or "0x",
 value: 0n, // optional
 account, // only required if the client above is not connected to an account
});
```

## Type Parameters

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

  <tbody>
    <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>
        `TChainOverride` *extends* `undefined` | [`Chain`](https://viem.sh)
      </td>

      <td>
        `undefined` | [`Chain`](https://viem.sh)
      </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)\<[`Transport`](https://viem.sh), `TChain`, `TAccount`>
      </td>

      <td>
        The client to send the transaction through
      </td>
    </tr>

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

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

      <td>
        The parameters required to send the transaction
      </td>
    </tr>

    <tr>
      <td>
        `overrides?`
      </td>

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

      <td>
        Optional overrides for the user operation
      </td>
    </tr>

    <tr>
      <td>
        `context?`
      </td>

      <td>
        `TContext`
      </td>

      <td>
        Optional context for the user operation
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to a hex string representing the transaction hash