> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://sdk.railnet.org/api/mcp` to find what you need.

# estimateConduitQueryOptions

Query options for estimating a conduit operation.

## Import

```ts
import { estimateConduitQueryOptions } from '@railnetorg/railnet-sdk/react'
```

## Usage

```ts
import { useQuery } from '@tanstack/react-query'
import { usePublicClient } from 'wagmi'
import { estimateConduitQueryOptions } from '@railnetorg/railnet-sdk/react'
import { ConduitMode, EstimationType } from '@railnetorg/railnet-sdk'

function Estimate() {
  const client = usePublicClient()

  const { data } = useQuery(
    estimateConduitQueryOptions(client, {
      conduit: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
      asset: { asset: '0x...', value: 1000000000000000000n },
      mode: ConduitMode.DEPOSIT,
      estimationType: EstimationType.OUTPUT,
    }),
  )
}
```

## Returns

```ts
QueryOptions<Asset, ReadContractErrorType, Asset, EstimateConduitQueryKey>
```

Options object containing `queryFn` and `queryKey`.

## Parameters

### client

* **Type:** `Client<Transport, Chain | undefined> | undefined`

A viem public client.

### parameters

#### conduit

* **Type:** `Address`

The address of the conduit contract.

#### asset

* **Type:** `Asset`

The input asset for the estimation.

#### mode

* **Type:** `ConduitMode`

The mode for the estimation.

#### estimationType

* **Type:** `EstimationType`

The type of estimation.

## Query Key

```ts
['railnet', 'estimateConduit', { conduit, asset, mode, estimationType }] as const
```

You can use `estimateConduitQueryKey` to construct the query key manually:

```ts
import { estimateConduitQueryKey } from '@railnetorg/railnet-sdk/react'
```
