> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# waitForExecution

> Wait for a submitted intent to reach a terminal state.

On failure, `IntentFailedError.context` carries grouped `operations` and
optional `refunds`. HyperCore evidence is an `EXECUTION` item inside
`operations[].items[]`; inspect its `result`, not a `context.hyperCore`
field. Completed settlement does not imply trade success. A refusal may
follow accepted actions, and a partial outcome may have placed orders.
Inspect settlement, balances, positions and refunds before any retry;
never assume replaying the whole intent is safe.

`intentResult` comes from `submitTransaction`. The example logs offchain
evidence separately from onchain transaction references, also on failure.

Method on an account instance returned by [`createAccount`](/wallets/custom-signer/sdk-reference/rhinestone-sdk/create-account). Requires a managed EVM account; unavailable on receiver-only and standalone Solana accounts.

## Usage

### Intent result

Wait for a submitted intent to reach a terminal state.

On failure, `IntentFailedError.context` carries grouped `operations` and
optional `refunds`. HyperCore evidence is an `EXECUTION` item inside
`operations[].items[]`; inspect its `result`, not a `context.hyperCore`
field. Completed settlement does not imply trade success. A refusal may
follow accepted actions, and a partial outcome may have placed orders.
Inspect settlement, balances, positions and refunds before any retry;
never assume replaying the whole intent is safe.

`intentResult` comes from `submitTransaction`. The example logs offchain
evidence separately from onchain transaction references, also on failure.

```ts theme={null}
import { IntentFailedError } from '@rhinestone/sdk/errors'

try {
  const status = await account.waitForExecution(intentResult)
  for (const group of status.operations) {
    for (const item of group.items) {
      if (item.type === 'EXECUTION') console.log(item.result)
    }
  }
} catch (error) {
  if (!(error instanceof IntentFailedError)) throw error
  console.log(error.context.operations, error.context.refunds)
}
```

#### Parameters

<ParamField path="result" type="TransactionResult" required>
  The submitted intent result
</ParamField>

#### Returns

<ResponseField name="result" type="TransactionStatus">
  The intent status with grouped per-chain operations
</ResponseField>

### UserOperation receipt

Wait for a submitted UserOperation receipt.

`userOperationResult` comes from `submitUserOperation` or `sendUserOperation`.
An unsuccessful execution can still return a receipt; inspect `success`
rather than expecting every execution failure to reject.

```ts theme={null}
const receipt = await account.waitForExecution(userOperationResult)
console.log(receipt.success)
```

#### Parameters

<ParamField path="result" type="UserOperationResult" required>
  The submitted UserOperation result
</ParamField>

#### Returns

<ResponseField name="result" type="UserOperationReceipt">
  The bundler's UserOperation receipt, including its success flag
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.