> **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.

# useEstimateConduit

React hook that estimates the output of a conduit operation.

## Import

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

## Usage

```tsx
import { useEstimateConduit } from '@railnetorg/railnet-sdk/react'
import { ConduitMode, EstimationType } from '@railnetorg/railnet-sdk'

function Estimate() {
  const { data, isLoading } = useEstimateConduit({
    conduit: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
    asset: { asset: '0x6B175474E89094C44Da98b954EedeAC495271d0F', value: 1000000000000000000n },
    mode: ConduitMode.DEPOSIT,
    estimationType: EstimationType.OUTPUT,
  })

  if (isLoading) return <div>Loading...</div>

  return (
    <div>
      {data?.map((a, i) => (
        <p key={i}>{a.asset}: {a.value.toString()}</p>
      ))}
    </div>
  )
}
```

## Returns

```ts
UseQueryResult<Asset, ReadContractErrorType>
```

Returns a single [`Asset`](/types/Asset).

The query is automatically disabled when no public client is available.

## Parameters

### conduit

* **Type:** `Address`

The address of the conduit contract.

### asset

* **Type:** `Asset`

The input asset for the estimation. See [`Asset`](/types/Asset).

### mode

* **Type:** `ConduitMode`

The mode for the estimation. See [`Enums`](/types/Enums).

### estimationType

* **Type:** `EstimationType`

The type of estimation. See [`Enums`](/types/Enums).

### enabled (optional)

* **Type:** `boolean`
* **Default:** `true`

Whether the query should be enabled.
