> For the complete documentation index, see [llms.txt](https://docs.crosscurve.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.crosscurve.fi/developer-documentation/integration-guide-old/simplified-integration-with-sdk/method-options.md).

# Method options

#### Execute Options

```typescript
const result = await sdk.executeQuote(quote, {
  signer,                    // Required: ChainSigner adapter
  recipient: '0x...',        // Optional: override recipient (default: signer address)
  autoRecover: true,         // Auto-handle recovery on failure
  onStatusChange: (s) => {}, // Status callback during polling

  // Gas overrides (optional)
  gasLimit: 500000n,
  gasPrice: 1000000000n,           // Legacy transactions
  maxFeePerGas: 2000000000n,       // EIP-1559
  maxPriorityFeePerGas: 100000000n,
  nonce: 42,
});
```

#### Tracking Options

```typescript
// Track CrossCurve transaction by requestId
const status = await sdk.trackTransaction(result.requestId);

// Track external bridge by tx hash
const status = await sdk.trackTransaction(txHash, {
  provider: 'rubic',           // 'rubic' | 'bungee'
  bridgeId: result.bridgeId,   // For Rubic routes
  chainId: 42161,              // Source chain
});
```

### Recovery

CrossCurve routes support three recovery types when transactions fail:

| Type              | Trigger                           | Action                          |
| ----------------- | --------------------------------- | ------------------------------- |
| **Emergency**     | Destination chain emergency state | Withdraw funds on source chain  |
| **Retry**         | Delivery failed, retry available  | Re-attempt destination delivery |
| **Inconsistency** | Price deviation detected          | Re-route with new quote         |

With `autoRecover: true`, recovery is handled automatically. For manual recovery:

```typescript
const status = await sdk.trackTransaction(requestId);

if (status.recovery?.available) {
  const result = await sdk.recover(requestId, {
    signer,
    slippage: 1,  // Required for inconsistency recovery
  });
}
```

### Error Handling

```typescript
import {
  // API errors
  ApiError,
  NetworkError,
  ValidationError,

  // Transaction errors
  TransactionError,
  InvalidQuoteError,
  InsufficientBalanceError,
  SlippageExceededError,

  // Recovery errors
  RecoveryUnavailableError,
  TimeoutError,

  // Rate limiting
  CircuitBreakerError,
  RateLimitError,
  ConfigurationError,
} from 'crosscurve-sdk';

try {
  await sdk.executeQuote(quote, { signer });
} catch (error) {
  if (error instanceof CircuitBreakerError) {
    console.log(`${error.service} API circuit open, retry after ${error.resetMs}ms`);
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.crosscurve.fi/developer-documentation/integration-guide-old/simplified-integration-with-sdk/method-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
