# waitForUserOperationTransaction | @aa-sdk/core

> Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached.

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

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

```ts
const waitForUserOperationTransaction: <TTransport, TChain>(
  client,
  args,
) => Promise<Hex>;
```

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

Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached.

## Example

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

// smart account client is already extended with waitForUserOperationTransaction
const client = createSmartAccountClient(...);
const result = await client.waitForUserOperationTransaction({
 hash: "0x...",
 retries: {...} // optional param to configure the retry amounts
});
```

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

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

      <td>
        ‐
      </td>
    </tr>

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

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

      <td>
        The parameters for the transaction to wait for
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<[`Hex`](https://viem.sh)>

A promise that resolves to the transaction hash when the transaction is confirmed