---
title: wait
description: Wait for a protocol transaction receipt and decode SV3 events.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Confirms a hash and returns a typed receipt. Used by `pending.wait()` after [executePrepared](/developers/execute-prepared), or directly as `sv3.transactions.wait(hash)` when you already have a hash.

Mined reverts become `TransactionRevertedError` with a decoded `ProtocolRevertError` cause when the revert data is a protocol custom error.

## Import

```ts
import { createSv3Client } from "@repo/contract-client";
```

## Usage

```ts
const pending = await sv3.transactions.executePrepared(prepared);
const confirmed = await pending.wait();

confirmed.hash;
confirmed.receipt.status;
confirmed.events;
```

From a hash:

```ts
const confirmed = await sv3.transactions.wait(hash, { confirmations: 1 });
```

## Return Value

`Promise<{ hash, receipt, events }>`

| Field     | Meaning                                                      |
| --------- | ------------------------------------------------------------ |
| `hash`    | Transaction hash                                             |
| `receipt` | viem `TransactionReceipt`                                    |
| `events`  | Decoded protocol logs (`Bought`, `Sold`, `FloorRedeemed`, …) |

## Parameters

### hash

- **Type:** `Hex`

```ts
await sv3.transactions.wait("0x…");
```

### options.confirmations (optional)

- **Type:** `number`
- **Default:** client `defaultConfirmations` (`1`)

```ts
await sv3.transactions.wait(hash, { confirmations: 2 });
```

### options.timeoutMs (optional)

- **Type:** `number`

```ts
await sv3.transactions.wait(hash, { timeoutMs: 60_000 });
```

On `pending.wait()`, the same options are accepted.

## Error

| Error                      | When                                                      |
| -------------------------- | --------------------------------------------------------- |
| `TransactionRevertedError` | Receipt status reverted; `cause` is decoded when possible |

## Tips

- Prefer `pending.wait()` so you keep the simulation that was sent.
- Event names follow the interface ABI, not implementation-only logs.
