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

# Ens.toCoinType

:::info
`Ens.toCoinType` is a re-export of ox's [`Ens.toCoinType`](https://oxlib.sh/api/Ens/toCoinType). Refer to the ox documentation for the full reference.
:::

Converts a chain ID to an ENSIP-9 compliant coin type.

## Imports

```ts
import { Ens } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Ens } from 'viem/utils'

Ens.toCoinType(10n)
// @log: 2147483658n
```

## Definition

```ts
function toCoinType(
  chainId: bigint,
): bigint
```

## Parameters

### chainId

* **Type:** `bigint`

Chain ID to convert.

## Return Type

ENS coin type.

`bigint`
