> ## 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 transaction or user operation to execute onchain. Polls the orchestrator until the intent reaches a terminal state; on failure an IntentFailedError is thrown, whose context carries operations and, where a settlement layer returned the funds, refunds — a refunded intent is still a failed one, so that error is where the refund surfaces. An intent that carried a HyperCore action also carries hyperCore there, which tells a refused trade (safe to retry) from a partial one (check the account first).

Method on an account instance returned by [`createAccount`](/wallets/custom-signer/sdk-reference/rhinestone-sdk/create-account).

## Usage

```ts theme={null}
const output = await account.waitForExecution(result)
```

## Parameters

<ParamField path="result" type="TransactionResult | UserOperationResult" required>
  The result returned by a submit/send call
</ParamField>

## Returns

<ResponseField name="result" type="TransactionStatus | UserOperationReceipt">
  The per-chain operation status (for intents) or a UserOp receipt
</ResponseField>
